Getting started with the REST API
The REST API supports your client of choice that can make standard HTTP requests with support for application/json encoding.
Information needed to make a request
To access the API, you will need the following information:
Information | Description |
---|---|
API Key | A secret API key issued by TimeEdit that grants API access |
Access Token | A short lived JWT based access token received after authenticating with the API key |
Authenticating with the API
- To authenticate and receive an access token you need your organization id and your api key.
- Send a POST request using the api key in the authorization header with the prefix Api-Key as shown below:
curl --request POST \
--url https://api.timeedit.net/v1/organizations/[Insert organization id here]/api-keys/authenticate \
--header 'Authorization: Api-Key [Insert api key here]' \
--header 'X-Region: [Insert region here]' \
--header 'accept: application/json'
You need to fill in three things:
- Organization Id, this should be provided by TimeEdit
- Api Key, this is also provided by TimeEdit
- Region, this is a specific enum string like 'EU_EES'
See the documentation page for authenticating: link
Note: The top-level domain (.net / .io) may vary depending on which environment you are using.
- Receive an access token as the return payload:
{
"token": [your access token will be here]
}
- Use the access token as a bearer token on all your subsequent API calls:
curl --request POST \
--url https://api.timeedit.net/v1/... \
--header 'Authorization: Bearer [Insert token here]' \
--header 'accept: application/json'