Recommended Setup
OpenAPI 3.0 is the latest version of the OpenAPI Specification, an open-source format for describing and documenting APIs. If your tool is capable of utilizing OpenAPI 3.0, we recommend that you import our API definition available in our JSON export.
Once imported, the first step is to get authorized. You should have been provided with a client_id and client_secret from the DRN Team. Utilize these values in the request parameters provided to receive your Authorization Bearer Token to be used in the header of your future requests. These tokens expire every 60 minutes by default, so be sure you have a way to programmatically check the status and / or refresh your tokens.
Articles
Parameters
When passing parameters to create or update an object, you should pass a JSON object containing the appropriate attribute names and values as key-value pairs. When you use this format, you should specify that you are sending a JSON object in the header by setting the Content-Type header to application/json.
curl -X POST "https://drnsights.drndata.com/api-client/" -H “Authorization . . . “ -H "Content-Type: application/json" -d { . . . }
Authorization
To interact programmatically with the data in your account, the server will require you to present an Authorization Bearer Token. You can request this with the following request using your client_id and client_secret.
Example Request:
curl -d "client_id={ClientIdHere}&\ client_secret={ClientSecretHere}&\ grant_type=client_credentials" https://drnsights.drndata.com/oauth/token/
Example Response:
{"token_type":"Bearer","expires_in":1296000,"access_token":"{AccessTokenHere}"}
When an API request is made, a bearer token is required in the header. The client_id and client_secret are used to obtain a bearer token. Tokens are obtained through an API POST request to the following URL: https://drnsights.drndata.com/oauth/token/. The form of the API POST should be as follows:
<pre>{
client_id: { client id },
client_secret: { client secret },
grant_type: 'client_credentials'
}</pre>
Bearer tokens expire after 15 days. When a bearer token has expired, please request another at https://drnsights.drndata.com/oath/token. If you send a request before your token is expired, it will refresh for an additional15 days.
Requests
The rest of the API URLs referenced in this documentation start with the following base part:
https://drnsights.drndata.com/api-client
Any tool that is fluent in HTTP can communicate with the API simply by properly formatting and requesting from the correct URI. Requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required.