1st Time User: Pull from Service Desk Plus

Hi,

I’m a first time user, looking to pull data from Service Desk Plus.
If the API documentation gives me the example below, where would I place the -d parameter?

$ curl http://{SDP_BASE_URL}/api/v3/requests \
      -H "authtoken: FC645540-6424-4A07-8A05-A865F4B8168A" \
      -d 'input_data= {
    "list_info": {
        "row_count": 20,
        "start_index": 1,
        "sort_field": "subject",
        "sort_order": "asc",
        "get_total_count": true,
        "search_fields": {
            "subject": "New hire",
            "priority.name": "high"
        },
        "filter_by": {
            "name": "Open_System"
        }
    }
}'

TIA!

Hi @Alderik_Manuputty :wave:

Welcome to the Parabola community!

Sending data as a JSON body requires you to send a POST request in Parabola. Taking a look at their documentation, this does appear as a GET request which is certainly uncommon.

There are few options worth trying out:

  1. Send the data as URL parameters. Since there is nested data, we may be able to query for it using this endpoint:

    Feel free to copy and paste this flow snippet directly into your flow to duplicate the API configuration settings shown in the image above: parabola:cb:9c8849f03bb44dfc8bca95340cfefc4e

  2. Enter the base endpoint URL listed in the documentation and filter/sort the data in Parabola: http://{SDP_BASE_URL}/api/v3/requests

  3. Send a POST request and insert the data as part of your Request Body. Just be sure to change your Request Type to POST near the top of your API step and a JSON field will appear.

Let me know if any of those options work!

Hi Daniel,

Thank you for your reply and sorry for the delay in my response.
I want to try a simpler example and just get the information for 1 ticket/request.
Per their documentation, that should like this:

$ curl http://{SDP_BASE_URL}/api/v3/requests/{request_id} \
      -H "authtoken: FC645540-6424-4A07-8A05-A865F4B8168A" \

I am trying a GET, and combinations of URL parameters or Request Headers, to no avail.
I am always getting this response:

{
“response_status”: {
“messages”: [
{
“message”: “Technician key in the request is invalid. Unable to authenticate.”,
“status_code”: 401,
“type”: “failed”
}
],
“status”: “failed”,
“status_code”: 4000
}
}

Any idea what I am doing wrong?

Hi @Alderik_Manuputty :wave:

How are you currently passing the Auth Token? Since they specify that the value must be passed as a header with the key authtoken, we’ll want to make sure to include that in the “Request Headers” section of your “Pull from API” step:

Screen Shot 2021-09-28 at 3.24.48 PM

Let me know if that was the issue!

1 Like

Thanks Adam, that worked.
I didn’t realize I could just type in the header key.
Now on to the more advanced pull lol…

1 Like

Thanks Daniel.
I was able to simply pass the json string as a url parameter, like this:

image

2 Likes

Glad to hear it, @Alderik_Manuputty!

If you need any help constructing your input_data parameter for more advanced requests, please let us know. :slight_smile: