Skip to main content

API

The API service exposes a number of endpoints that allow you to read and manipulate data. Through a RESTful interface, you can fetch, create, update, and delete data in a predictable and uniform manner.

tip

The OpenAPI specification is available on api.dimescheduler.com/docs.

Environments

Authentication

Two authentication methods are supported:

  • JWT
  • API key

JWT

To get a JSON Web Token, invoke the /token endpoint on the API service (https://sandbox.api.dimescheduler.com/token or https://api.dimescheduler.com/token).

In the body, pass a JSON object with the following shape:

{
"username": "myuser",
"password": "mypassword"
}

Don't forget to set the Content-Type header to application/json. Here's an example cURL request:

curl --location 'https://sandbox.api.dimescheduler.com/token'
--header 'Content-Type: application/json'
--data-raw '{
"username": "[email protected]",
"password": "mypassword"
}

Execute the request, grab the token property in the response, and pass this value in subsequent requests to the authenticated endpoints in the Authorization header, accompanied by the Bearer prefix. The header, in conclusion, should be formatted as Bearer YOURTOKENHERE. Here's an example cURL request to the import API:

curl --location 'https://sandbox.api.dimescheduler.com/import'
--header 'content-type: application/json'
--header 'Authorization: Bearer thetokencomeshere'
--data '[
{
"StoredProcedureName": "mboc_upsertJob",
"ParameterNames": ["SourceApp","SourceType","JobNo","ShortDescription","Description","SiteAddress","SiteCountry"],
"ParameterValues": ["BC1","SERVICE","SVC001","Service 1","Service 1","Street 1","USA"]
}
]'

API key

Create an API key in Dime.Scheduler and pass this value in the X-API-KEY header of each request to the API.

Here's an example cURL request to the import API using API keys:

curl --location 'https://sandbox.api.dimescheduler.com/import'
--header 'content-type: application/json'
--header 'X-API-KEY: MYAPIKEYCOMESHERE'
--data '[
{
"StoredProcedureName": "mboc_upsertJob",
"ParameterNames": ["SourceApp","SourceType","JobNo","ShortDescription","Description","SiteAddress","SiteCountry"],
"ParameterValues": ["BC1","SERVICE","SVC001","Service 1","Service 1","Street 1","USA"]
}
]'

Endpoints

For more information on the endpoints, click on one of the following cards:

Data model