1

JSON/REST, POST organizations.json 406 not acceptable

I'm having problems with the creation of organizations via the rest api. I am getting the http status of "406 Not Acceptable"

I have tried a number of differnet json strings as the postdata, and followed some instruction from zendesk support, but unfortunately am still having problems.

 

I am using "Content-Type: application/json' in the header, and autheniticating correctly. the same curl config works for creating users and some other calls i have setup in my code. testing from the command line yeilds the same results.

 

The funny thng about it is that even though "406 Not Acceptable" is returned, the organization is created, and all options i specify are set. so it appears to "work"

here is the curl output

[darknoise@enclave md-zendesk]$ curl -v -H "Content-Type: application/json" -u XXX:XXX -X POST http://xxxx.zendesk.com/organizations.json -d "{\"organization\": {\"name\": \"Test\",\"is_shared\": false}}"

* About to connect() to xxxx.zendesk.com port 80 (#0)

* Trying 184.106.12.184... connected

* Connected to xxxx.zendesk.com (184.106.12.184) port 80 (#0)

* Server auth using Basic with user 'XXX'

POST /organizations.json HTTP/1.1

Authorization: Basic XXX

User-Agent: curl/7.21.2 (x86_64-unknown-linux-gnu) libcurl/7.21.2 OpenSSL/1.0.0a zlib/1.2.5

Host: xxxx.zendesk.com

Accept: */*

Content-Type: application/json

Content-Length: 57

< HTTP/1.1 406 Not Acceptable

< Server: nginx/0.6.35

< Date: Thu, 18 Nov 2010 02:01:29 GMT

< Content-Type: text/html; charset=utf-8

< Transfer-Encoding: chunked

< Connection: keep-alive

< Status: 406 Not Acceptable

< P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR"

< X-Runtime: 31

< Set-Cookie: _zendesk_session=XXX; path=/; HttpOnly

< Set-Cookie: zendesk_user_version=users%2F19172715-20101113123904; path=/

< Cache-Control: no-cache

<

* Connection [#0](../../../tickets/0) to host xxxx.zendesk.com left intact

* Closing connection [#0](../../../tickets/0)

5 comments

Please sign in to leave a comment.