Add Request Curl Example
Add Request Curl Example
I am trying to use curl to call the ADD_REQUEST operation. I have tried a couple of different formats to express the request but have not been successful. Do you have any examples using curl to create a new Service Request Ticket?
If I use this command:
curl -X POST
http://<DOMAIN>/sdpapi/request --data OPERATION_NAME=ADD_REQUEST --data TECHNICIAN_KEY=9336CB2B-AE7B-481B-BDA1-5356C6449F23 --data
INPUT_DATA@request.xml
I get the result
<?xml version="1.0" encoding="UTF-8" ?>
<API version="1.0">
<response>
<operation name="ADD_REQUEST">
<result><status>Failed</status><message>No input data for creating request</message></result></operation>
</response>
</API>
If I add the XML data within double quotes
curl -X POST
http://<DOMAIN>/sdpapi/request --data OPERATION_NAME=ADD_REQUEST --data TECHNICIAN_KEY=9336CB2B-AE7B-481B-BDA1-5356C6449F23 --data INPUT_DATA="My XML Data"
The error is "Error occured while constructing response".
Thanks,