Skip to main content

API

The API service lets you read and manipulate Dime.Scheduler data over a RESTful interface. You can fetch, create, update, and delete data in a predictable, uniform way.

tip

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

Environments

Authentication

Two authentication methods are supported:

  • API key (preferred)
  • JWT (deprecated)

JWT

Deprecated

JWT authentication is deprecated. Please use API key authentication instead, which is the preferred method.

To get a JSON Web Token, call 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 this shape:

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

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"
}

Run the request and take the token property from the response. Pass this value in the Authorization header of every subsequent request to the authenticated endpoints, prefixed with Bearer. The header 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

Preferred Method

API key authentication is the preferred method for authenticating with the API.

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

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

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 details on each group of endpoints, open one of the cards below:

Data model