Re: MyProfile REST API.

On 10 Aug 2012, at 23:15, Andrei Sambra <andrei@fcns.eu> wrote:

> Greetings,
> 
> Today marks the first release of MyProfile REST API [1], which is supposed to be an interface between standard social web applications (i.e. MyProfile included), and linked data storage, especially SPARQL endpoints (i.e. Virtuoso).

Great news. I am sure you know about the Linked Data Profile submissions to the W3C by 
IBM 
  http://www.w3.org/Submission/2012/02/

and the working group that is developing this
   http://www.w3.org/2012/ldp/charter.html

I think having something like what you have working closely for TPAC Lyon 2012 would
be something they would love. The more implementations the better....

> 
> The API offers WebID authentication as well as WebID delegated authorization[2]. It will offer access control at the triple level very soon (a few weeks maximum). For now I'm just testing that I'm doing it right.
> 
> A very important feature of the API is that it serves data based on the desired Content-Type. This means if you specify in your request that you Accept: text/rdf+n3, then you will get the data back in that format.
> 
> The API currently supports viewing of user profiles (i.e. GET methods), as well as removing cached profiles (i.e. DELETE methods). Once I switch the Wall posts and Messages to full RDF storage (probably based on SIOC), I will also enable those resources.

YEs. I started on SIOC too. It looks like the LDP people went another way. It would be nice if we could all agree on the ontology here...

> 
> 
> Anyway, here is a quick example for viewing a user's profile:
> 
> The request:
> 
> HTTP/1.1 GET https://auth.my-profile.eu/profile/?webid=<urlencoded WebID>
> 
> With these extra header options:
> 
> Accept: text/rdf+n3
> On-Behalf-Of: https://my-profile.eu/people/deiu/card#me
> 
> Returns*:
> 
> <https://my-profile.eu/people/deiu/card#me>
>    a foaf:Person ;
>    foaf:name "Andrei Vlad Sambra" ;
>    foaf:givenName "Andrei Vlad" ;
>    . . .
> 
> *the returned profile matches the access control policies specific to the user on whose behalf the request is being made, and optionally the agent doing the request.
> 
> 
> Another example for deleting the cached copy of a profile:
> 
> The request:
> HTTP/1.1 DELETE https://auth.my-profile.eu/profile/cache/?webid=<urlencoded WebID>
> 
> Returns*:
> Successfully deleted profile https://my-profile.eu/people/deiu/card#me.
> 
> *for now, the operation will be performed only if the request is made by profile owner, or on his/her behalf (!)
> 
> Andrei
> 
> [1] https://auth.my-profile.eu/
> [2] http://www.w3.org/wiki/WebID/Authorization_Delegation
> 

Social Web Architect
http://bblfish.net/

Received on Saturday, 11 August 2012 19:52:35 UTC