REST API Problem ... document/rename
PostPosted:Tue Jan 06, 2015 12:58 am
Dear Community,
I am trying to get the following REST API call to work using the documentation (http://localhost:8080/OpenKM/services/r ... ment?_wadl) but am only getting a "415 Unsupported Media Type error", has anyone encountered the same problem or has a fix? Any help is highly appreciated!
* getaddrinfo(3) failed for Content-Type: application:80
* Couldn't resolve host 'Content-Type: application'
* Closing connection #0
curl: (6) Couldn't resolve host 'Content-Type: application'
* About to connect() to localhost port 8080
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'okmAdmin'
> PUT /OpenKM/services/rest/document/rename HTTP/1.1
> Authorization: Basic b2ttQWRtaW46YWRtaW4=
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: localhost:8080
> Accept: application/json
> Content-Length: 57
> Content-Type: application/x-www-form-urlencoded
>
> newName=blabla&docId=9f9be747-9302-4f50-9d7e-a37633ddb8f2HTTP/1.1 415 Unsupported Media Type
< Server: Apache-Coyote/1.1
< Date: Tue, 06 Jan 2015 00:56:52 GMT
< Content-Length: 0
* Connection #0 to host localhost left intact
* Closing connection #0
I am trying to get the following REST API call to work using the documentation (http://localhost:8080/OpenKM/services/r ... ment?_wadl) but am only getting a "415 Unsupported Media Type error", has anyone encountered the same problem or has a fix? Any help is highly appreciated!
Code: Select all
Result:curl -v -u okmAdmin:admin -X PUT "Content-Type: application/x-www-form-urlencoded" -H "Accept: application/json" \
-d newName=blabla -d docId=9f9be747-9302-4f50-9d7e-a37633ddb8f2 http://localhost:8080/OpenKM/services/rest/document/rename* getaddrinfo(3) failed for Content-Type: application:80
* Couldn't resolve host 'Content-Type: application'
* Closing connection #0
curl: (6) Couldn't resolve host 'Content-Type: application'
* About to connect() to localhost port 8080
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'okmAdmin'
> PUT /OpenKM/services/rest/document/rename HTTP/1.1
> Authorization: Basic b2ttQWRtaW46YWRtaW4=
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: localhost:8080
> Accept: application/json
> Content-Length: 57
> Content-Type: application/x-www-form-urlencoded
>
> newName=blabla&docId=9f9be747-9302-4f50-9d7e-a37633ddb8f2HTTP/1.1 415 Unsupported Media Type
< Server: Apache-Coyote/1.1
< Date: Tue, 06 Jan 2015 00:56:52 GMT
< Content-Length: 0
* Connection #0 to host localhost left intact
* Closing connection #0