WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi folks,
I'm taking CollectionSpace's REST API for a spin. I've got as far as
successfully requesting a list of objects. However, I'm not having any luck
creating an object. I've followed the example at
http://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Servicesbut
I'm getting this response:
HTTP
Status 405 -
type Status report
message
description The specified HTTP method is not allowed for the requested
resource ().
Here's the command line I'm using:
$ curl -X POST http://serveraddress:8180/cspace-services/collectionobjects/-i
-u username:password -H "Content-Type: multipart/mixed;
boundary=74592b13-e90b-49a3-a1bb-54f7341cc1ce" -T foo.xml
Foo.xml is exactly as shown in the wiki's example of a multipart payload for
create.
This is against the 1.3 release of CollectionSpace.
Has anything relevant changed since the wiki page was last updated (June
2010)? Am I missing something obvious?
thanks,
Joe
Joe,
I’ll see if I can reproduce this problem and get back to you soon.
Thanks,
Richard
CollectionSpace Services Team
From: talk-bounces@lists.collectionspace.org [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of Joe Slag
Sent: Friday, March 11, 2011 11:08 AM
To: talk@lists.collectionspace.org
Subject: [Talk] trouble creating an object via REST
Hi folks,
I'm taking CollectionSpace's REST API for a spin. I've got as far as successfully requesting a list of objects. However, I'm not having any luck creating an object. I've followed the example at
http://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services but I'm getting this response:
HTTP Status 405 -
_________________________________________________________________________________________________________
type Status report
message
description The specified HTTP method is not allowed for the requested resource ().
Here's the command line I'm using:
$ curl -X POST http://serveraddress:8180/cspace-services/collectionobjects/ -i -u username:password -H "Content-Type: multipart/mixed; boundary=74592b13-e90b-49a3-a1bb-54f7341cc1ce" -T foo.xml
Foo.xml is exactly as shown in the wiki's example of a multipart payload for create.
This is against the 1.3 release of CollectionSpace.
Has anything relevant changed since the wiki page was last updated (June 2010)? Am I missing something obvious?
thanks,
Joe
Hi Joe,
Thanks much for your interest in CollectionSpace!
On Fri, Mar 11, 2011 at 11:07 AM, Joe Slag joe@slagwerks.com wrote:
I'm taking CollectionSpace's REST API for a spin. I've got as far as
successfully requesting a list of objects. However, I'm not having any luck
creating an object. I've followed the example at
http://wiki.collectionspace.org/display/collectionspace/Using+cURL+as+a+Client+to+CollectionSpace+Services
but I'm getting this response:
...HTTP Status 405
Richard and I discovered that the URL paths in that document were
incorrect; that the trailing slashes after ".../collectionobjects/"
were yielding that '405 error'.
The wiki document you're referring to has just been updated to
reflect this, as well as to incorporate other updates. The examples
of cURL commands and payloads in that document have been tested to
work successfully with release 1.4 (on demo.collectionspace.org) and
with a near-final release 1.5:
Please try this again, at your convenience, with your 1.3 instance
of CollectionSpace, and let us know of your results.
Thank you!
Aron Roberts
Hi Aron and Richard,
Thanks for looking into this. I just tried removing the trailing slash as
you describe, and was able to successfully create an object on our 1.3
server.
cheers,
Joe
On Fri, Mar 11, 2011 at 5:04 PM, Aron Roberts aron@socrates.berkeley.eduwrote:
Hi Joe,
Thanks much for your interest in CollectionSpace!
On Fri, Mar 11, 2011 at 11:07 AM, Joe Slag joe@slagwerks.com wrote:
I'm taking CollectionSpace's REST API for a spin. I've got as far as
successfully requesting a list of objects. However, I'm not having any
luck
creating an object. I've followed the example at
but I'm getting this response:
...HTTP Status 405
Richard and I discovered that the URL paths in that document were
incorrect; that the trailing slashes after ".../collectionobjects/"
were yielding that '405 error'.
The wiki document you're referring to has just been updated to
reflect this, as well as to incorporate other updates. The examples
of cURL commands and payloads in that document have been tested to
work successfully with release 1.4 (on demo.collectionspace.org) and
with a near-final release 1.5:
Please try this again, at your convenience, with your 1.3 instance
of CollectionSpace, and let us know of your results.
Thank you!
Aron Roberts