Hi Edwin,

sorry! I made a beginners fault - I've trusted the framework and was pretty 
sure. 
Everything is working fine with the purgeDatastream method. The response format 
is JSON and contains a timestamp (exactly what's decribed in the WADL).

Sorry!
Steffen

________________________________________
Von: Edwin Shin [[email protected]]
Gesendet: Dienstag, 7. Juni 2011 16:38
Bis: [email protected]
Betreff: Re: [fcrepo-dev] REST API

Steffen,

See, for example:
https://github.com/mediashelf/fedora-client/blob/master/src/main/java/com/yourmediashelf/fedora/client/request/PurgeDatastream.java
http://mediashelf.github.com/fedora-client/xref-test/com/yourmediashelf/fedora/client/request/PurgeDatastreamIT.html

Here are the HTTP request & response for a successful delete:

1 * Client out-bound request
1 > DELETE 
http://localhost:8080/fedora/objects/test-rest:1/datastreams/testPurgeDatastream

1 * Client in-bound response
1 < 200
1 < Transfer-Encoding: chunked
1 < Date: Tue, 07 Jun 2011 14:33:51 GMT
1 < Set-Cookie: JSESSIONID=68492D3F1C49E8A4F04800502DA6860E; Path=/fedora
1 < Content-Type: application/json
1 < Server: Apache-Coyote/1.1
1 <
["2011-06-07T14:33:51.222Z"]


On 7 Jun 2011, at 7:37 AM, Wagner, Steffen wrote:

> Hi Edwin,
>
> I'm afraid there are some more features. A call of the method is responsed 
> with
>
> <h1>HTTP Status 406 - </h1><HR size="1" noshade="noshade"><p><b>type</b> 
> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The 
> resource identified by this request is only capable of generating responses 
> with characteristics not acceptable according to the request "accept" headers 
> ().</u>
>
> This happened with accept headers */* and application/json. I cannot imagine 
> that the method does not work in some way - could you give me a hint?
>
> Thanks
> Steffen
>
>
>
> -----Original Message-----
> From: Edwin Shin [mailto:[email protected]]
> Sent: Thursday, June 02, 2011 11:22 AM
> To: [email protected]
> Subject: Re: [fcrepo-dev] REST API
>
> As I recall purgeDatastream used to only return a 204 status code, no 
> payload. See https://jira.duraspace.org/browse/FCREPO-708
>
> Returning a JSON array of dates was intentional, so I suppose I would call 
> that a feature ;-)
>
> On 2 Jun 2011, at 8:59 AM, Stephen Bayliss wrote:
>
>> Hi Steffen
>>
>> This does indeed seem to be the case, there is not a single REST method that
>> equates to API-M getDatastreams.  Although as you say it is possible by
>> iterating each individual datastream.
>>
>> I have created a JIRA issue for this -
>> https://jira.duraspace.org/browse/FCREPO-951
>>
>> I haven't looked at the deleteDatastream return type, maybe someone else can
>> shed some light on that.
>>
>> Steve
>>
>>> -----Original Message-----
>>> From: Wagner, Steffen [mailto:[email protected]]
>>> Sent: 01 June 2011 14:16
>>> To: [email protected]
>>> Subject: [fcrepo-dev] REST API
>>>
>>>
>>> Hi,
>>>
>>> Currently we're switching from the API-A and API-M methods to
>>> the REST API and realized that the getDatastreams method has
>>> no implemented counterpart at REST. Retrieving that data in a
>>> loop over each single datastream would be a workaround with
>>> performance impact - that's why we try to avoid it.
>>>
>>> Is there another efficient way to get these data? Or is maybe
>>> the implementation of this method already on the way for Fedora 3.5?
>>>
>>> I haven't followed the REST API discussion, so I was a little
>>> bit confusion about the return type of the deleteDatastream
>>> Method, because the return type is JSON whereas all other
>>> methods return XML (wadl). Is it a bug or a feature?
>>>
>>> Many thanks,
>>> Steffen
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Simplify data backup and recovery for your virtual environment with vRanger.
>> Installation's a snap, and flexible recovery options mean your data is safe,
>> secure and there when you need it. Data protection magic?
>> Nope - It's vRanger. Get your free trial download today.
>> http://p.sf.net/sfu/quest-sfdev2dev
>> _______________________________________________
>> Fedora-commons-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
>
>
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Fedora-commons-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
>
>
> -------------------------------------------------------
>
> Fachinformationszentrum Karlsruhe, Gesellschaft für 
> wissenschaftlich-technische Information mbH.
> Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 
> 101892.
> Geschäftsführerin: Sabine Brünger-Weilandt.
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev_______________________________________________
> Fedora-commons-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische 
Information mbH. 
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 
101892. 
Geschäftsführerin: Sabine Brünger-Weilandt. 
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Fedora-commons-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers

Reply via email to