SD API Problems

SD API Problems

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 .
 
  1. {{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 

  1. {{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:


  1. <operation name="GET_REQUESTS">
  2.     <result>
  3.         <status>Failed</status>
  4.         <message>Error when performing - GET_REQUESTS - Content is not allowed in prolog.</message>
  5.     </result>
  6. </operation>


Any help would be appreciated, thanks!
                New to ADManager Plus?

                  New to ADSelfService Plus?