Hey there,
So today I started to mess around with the API. Right now I can only get the API working with XML even though the documentation linked under the Admin panel lists JSON as the INPUT_DATA format
For most of the operations, INPUT_DATA is required. It is given as a
JSON string
along with the parameter, while the Attibutes and their values are sent along with the input data. On the other hand, the
Response
is exposed as
JSON or XML
string
.
- {{SDPSERVERURL.com}}/sdpapi/request?OPERATION_NAME=GET_REQUESTS&TECHNICIAN_KEY={{APIKEYOMITTED}}&INPUT_DATA=<operation> <details> <from>0</from><limit>50</limit> <filterby>All_Requests</filterby> </details></operation>
Which will return correct data in XML format. This will not return JSON
__________________________________________________________________________
When I try
- {{SDPSERVERURL.com}}/sdpapi/request?OPERATION_NAME=GET_REQUESTS&TECHNICIAN_KEY={{APIKEYOMITTED}}&INPUT_DATA={"operation":{"details":{"from":"0","limit":"50","filterby":"All_Requests"}}}
I get the following Error in XML format:
- <operation name="GET_REQUESTS">
- <result>
- <status>Failed</status>
- <message>Error when performing - GET_REQUESTS - Content is not allowed in prolog.</message>
- </result>
- </operation>
Any help would be appreciated, thanks!