Skip to Content.
Sympa Menu

comanage-users - [comanage-users] API POSTs ignored

Subject: COmanage Users List

List archive

[comanage-users] API POSTs ignored


Chronological Thread 
  • From: Ray Plante <>
  • To:
  • Subject: [comanage-users] API POSTs ignored
  • Date: Tue, 20 Jan 2015 01:20:12 -0600 (CST)

Hi,

I'm trying out the REST API and I'm having trouble getting POSTS to
work. GET actions to the json interfaces seem to work fine (using
curl), but when try to add objects with a POST, nothing seems to
happen: I get a 200 response, but no changes are made to the database.

For example, here's an adaptation of the POST example in the Technical
Manual
(https://spaces.internet2.edu/display/COmanage/REST+API+Examples) that
I tried:

curl -vk -H 'Content-Type: application/json' -d '{
"RequestType":"Cous", "Version":"1.0", "Cous": [{"Version":"1.0",
"CoId":"1", "Name":"Hackers", "Description":"Hidden genius"}]}' -X
POST -u "user:pass" http://127.0.1.1/registry/cous.json

Here's what comes back:

< HTTP/1.1 200 OK
< Date: Tue, 20 Jan 2015 07:08:25 GMT
< Server: Apache/2.2.14 (Ubuntu)
< Vary: Accept-Encoding
< Content-Length: 406
< Content-Type: text/html; charset=UTF-8
<
{ [data not shown]
* Connection #0 to host 127.0.1.1 left intact
* Closing connection #0
<br />
<b>Deprecated</b>: Automatically populating $HTTP_RAW_POST_DATA is
deprecated and will be removed in a future version. To avoid this
warning set 'always_populate_raw_post_data' to '-1' in php.ini and use
the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br
/>
<br />
<b>Warning</b>: Cannot modify header information - headers already
sent in <b>Unknown</b> on line <b>0</b><br />

I conclude this is not an Auth issue since the username and password
works fine with the GET commands (unless I get the password wrong).
Is there some configuration I missed? Is there some other
authorization I need to do besides adding an API user? Is there a
place to look for error messages?

thanks,
Ray



Archive powered by MHonArc 2.6.16.

Top of Page