W3C home > Mailing lists > Public > public-rww@w3.org > August 2012

Re: MyProfile REST API.

From: Henry Story <henry.story@bblfish.net>
Date: Sun, 12 Aug 2012 13:35:12 +0200
Cc: Andrei Sambra <andrei@fcns.eu>, WebID <public-webid@w3.org>, public-rww <public-rww@w3.org>
Message-Id: <F1B44014-A631-48C1-A669-92C77FC29B00@bblfish.net>
To: Dominik Tomaszuk <ddooss@wp.pl>

On 12 Aug 2012, at 13:14, Dominik Tomaszuk <ddooss@wp.pl> wrote:

> On 12.08.2012 12:03, Henry Story wrote:
>> 
>> On 12 Aug 2012, at 11:56, Dominik Tomaszuk<ddooss@wp.pl>  wrote:
>> 
>>> On 12.08.2012 11:40, Andrei Sambra wrote:
>>>> On 08/12/2012 11:34 AM, Dominik Tomaszuk wrote:
>>>>> With message body? If yes, what type is the content?
>>>>> 
>>>> The content type doesn't really matter for successful requests, since
>>>> all you should care about is whether the request was successful or not.
>>>> 
>>>> I suppose I can use EARL for the cases where you require a boolean
>>>> answer, and the request is not successful (so you have the reason for
>>>> your failure).
>>> I suppose better than EARL is [1] and/or [2]. It will be nice if the content (including 200 and I guess 400) is an RDF graph.
>>> 
>>> 
>>> [1] http://www.w3.org/2011/content#
>>> [2] http://www.w3.org/2011/http#
>> 
>> Those vocabularies seem way to precise: ways of describing http itself. You don't want to describe HTTP, you want to send a message back explaining ( in machine readable form ) what went wrong if asked for it in RDF.
> I want rather to describe HTTP response, including status code in machine readable form.

I think the reason I misunderstood is because you do not specify *which* HTTP response you want to describe.

A) Is it the HTTP response itself that is returning a 400? Well there is no need to describe that response since HTTP already does that. The headers returned are at the top. To try to describe the same response with RDF would be to try to do SOAP in RDF again....
   Well now I look at it HTTP 400 means Bad Request. So perhaps here is a case where the response could try 
to describe what was wrong in the REQUEST using RDF.


B) Is it the HTTP headers of the responses to a Request for the WebID profile document which were made in order to verify the authenticity of the requestor, and that - for a 401 perhaps (Unauthorised) that would make sense if the http response made by the server to another server were the reason for the failure.

> 
>> So I think EARL is a lot closer to being right.
>> 
>> You may want to use those vocabs if say you wanted to write that you had trouble fetching remote graphs, and that is why you could not authenticate the user.... That is how they are meant to work with earl I think...
> You're right in the middle. I want message body of success or failure. EARL is rather for testing not for results, but of course you can describe message body in EARL.

I think you can explain what went wrong in earl. So that would be useful to add more details....


> 
> Dominik
> 
>> 
>> Henry
>> 
>>> 
>>> Dominik
>>> 
>>>> 
>>>> Andrei
>>>> 
>>>>> On 11.08.2012 22:42, Andrei Sambra wrote:
>>>>>> All successful requests return 200.
>>>>>> 
>>>>>> ----- Reply message -----
>>>>>> From: "Dominik Tomaszuk"<ddooss@wp.pl>
>>>>>> To: "Andrei Sambra"<andrei@fcns.eu>
>>>>>> Cc: "WebID"<public-webid@w3.org>, "public-rww"<public-rww@w3.org>
>>>>>> Subject: MyProfile REST API.
>>>>>> Date: Sat, Aug 11, 2012 22:15
>>>>>> 
>>>>>> 
>>>>>> Andrei,
>>>>>> 
>>>>>> On 10.08.2012 23:15, Andrei Sambra wrote:
>>>>>>> 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 (!)
>>>>>> What HTTP status code is returned when it is successful? 200 or 204?
>>>>>> 
>>>>>> Cheers,
>>>>>> Dominik
>>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> Social Web Architect
>> http://bblfish.net/
>> 
>> 
>> 
>> 
> 

Social Web Architect
http://bblfish.net/
Received on Sunday, 12 August 2012 11:35:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 12 August 2012 11:35:57 GMT