Loading...

API

API Key

Your API Key is the unique key that is passed into the API base URL's access_key parameter in order to authenticate with the Dast Product API. The Dast Product Rest API comes with a constantly updated endpoint returning Trigger timestamp list of your device.

APIGETRequest:

https://dastproduct.com/api
    ? access_key = API_KEY

Request Parameters:

Parameter Description
access_key [required] Your API Key.

API Response:

{
  "success": true,
  "triggers": [
    {
       "TIMESTAMP": "2023-11-19 12:09:32"
    },
    {
       "TIMESTAMP": "2023-11-19 09:43:23"
    },
    {
       "TIMESTAMP": "2023-11-17 09:15:52"
    },
    {
       "TIMESTAMP": "2023-11-16 13:58:22"
    }
    [...]
  ]
}

Response Objects:

Response Object Description
success Returns true or false depending on whether or not your API request has succeeded.
triggers Returns all trigger dates of your device.

Additional Parameters

Depending on your desired Trigger list, additional parameters are allowed souch as from, to, interval, limit, order.

APIGETRequest:

https://dastproduct.com/api
    ? access_key = API_KEY
    & from = 2023-05-19
    & to = 2023-07-25

Request Parameters:

Parameter Description
access_key [required] Your API Key.
from [optional] Set the start Date of your trigger interval. (Can be used without to.)
to [optional] Set the end Date of your trigger interval. (Can be used without from.)

API Response:

{
  "success": true,
  "triggers": [
    {
       "TIMESTAMP": "2023-05-18 14:11:12"
    },
    {
       "TIMESTAMP": "2023-06-19 09:44:13"
    },
    {
       "TIMESTAMP": "2023-06-17 09:25:59"
    },
    {
       "TIMESTAMP": "2023-07-16 19:37:21"
    }
  ]
}

Response Objects:

Response Object Description
success Returns true or false depending on whether or not your API request has succeeded.
triggers Returns all trigger dates of your device.

Additional Parameters

Depending on your desired Trigger list, additional parameters are allowed souch as interval, limit, order.

APIGETRequest:

https://dastproduct.com/api
    ? access_key = API_KEY
    & interval = 60
    & limit = 2
    & order = ASC

Request Parameters:

Parameter Description
access_key [required] Your API Key.
interval [optional] Set the interval of your triggers. (interval=30 will fetch all triggers from last 30 days.)
limit [optional] Set the limit of your trigger list. (limit=2 will get you only the first two dates from the list.)
order [optional] Set the order of your trigger list. (Available: ASC/DESC) (Default: DESC)

API Response:

{
  "success": true,
  "triggers": [
    {
       "TIMESTAMP": "2023-07-16 19:37:21"
    },
    {
       "TIMESTAMP": "2023-06-17 09:25:59"
    }
  ]
}

Response Objects:

Response Object Description
success Returns true or false depending on whether or not your API request has succeeded.
triggers Returns all trigger dates of your device.

Potential Errors

Whenever a requested resource is not available or an API call fails for another reason, a JSON error is returned. Errors always come with an error code and a description.

Example Error: The following error is returned if an invalid date has been specified.

{
  "success": false,
  "error": {
    "code": 101,
    "info": "An invalid from date has been specified."
  }
}

Other Errors:

Error Code Description
404 The requested resource does not exist.
403 No API Key was specified or an invalid API Key was specified.
101 An invalid from Date has been specified.
102 An invalid to Date has been specified.
103 An invalid interval value has been specified.
104 The current request did not return any results.