Hello Jakob
I do not know the curl application very well, but I did notice that when
using the -data option, it sets the consume type to
"application/x-www-form-urlencoded". Unfortunately, the OC REST API does
not support this consumption. You will need to change it to consume
"text/plain".

Sorry I couldn't be more help.

Rob Jose
Spectrum Protect OC UI Developer / L3 Support

-----Original Message-----
From: "Jakob Jóhannes Sigurðsson" [mailto:[email protected]]
Sent: Friday, November 18, 2016 3:13 AM
To: [email protected]
Subject: [ADSM-L] Help running commands via the TSM REST api

Hi all.

I saw a message here regarding running registration of clients against the
REST API.
I am not able to get this working and the user did not include his fix in
his reply.

Has anyone successfully tried this? I keep getting Internal Server error
replies and the OC log says:

[11/18/16 11:08:42:206 GMT] 0001eeaf
org.apache.wink.server.internal.registry.ResourceRegistry    I The system
cannot find any method in the com.ibm.tsm.gui.rest.CliResource class that
consumes application/x-www-form-urlencoded media type. Verify that a method
exists that consumes the  media type specified.

Here is my command:
[jakob@centos-minimal ~]$ curl -s -X POST -H "OC-API-Version: 1.0" -H
"Accept: application/json" --insecure --user jakob:foobar
https://192.168.1.10:11090/oc/api/cli/issueCommand --data "query option"
Response:
{"error":{"httpStatus":"Internal Server
Error","errorCode":500,"message":null}}

Regards, Jakob
[email protected]

Reply via email to