Environments, base URLs and headers¶
Read this page first if you call the platform with plain HTTP (curl, Python requests, a generated client) or if you are an automated agent. The SDKs know all of this already.
Environments¶
| Environment | API gateway | Login (OAuth) | OpenAPI | Who uses it |
|---|---|---|---|---|
| Production | https://api.mike-cloud.com |
https://login.mike-cloud.com |
develop.mike-cloud.com/swagger | customers and production applications |
| Test | https://api.mike-cloud-test.com |
https://login.mike-cloud-test.com |
develop.mike-cloud-test.com/swagger | release validation |
| Dev | https://api.mike-cloud-dev.com |
https://login.mike-cloud-dev.com |
develop.mike-cloud-dev.com/swagger | application development against the platform |
| Dev0 | https://api.mike-cloud-dev0.com |
https://login.mike-cloud-dev0.com |
develop.mike-cloud-dev0.com/swagger | platform development, unstable |
All examples in this documentation use https://api.mike-cloud-dev.com. Replace the host with the environment you were given access to. An Open API key or an application registration is valid in one environment only.
The OpenAPI documents do not declare servers or security schemes yet, use the table above and the headers below when you generate a client.
Headers¶
| Header | Required | Value |
|---|---|---|
api-version |
yes | Version of the API you call, for example 3. Without it the service assumes version 1, which is mostly obsolete. The version each endpoint belongs to is the version of the OpenAPI document that lists it. |
dhi-open-api-key |
one of the two | Open API key, see How to generate API key. |
Authorization: Bearer <token> |
one of the two | Access token from the login service, see Authentication details. |
dhi-project-id |
usually | Project the request works in. Not needed when the project id is in the URL path. Needed for all requests that address a dataset by id only, because the dataset's project is not known to the gateway. |
dhi-recursive-token |
no | true when the request should cover the whole project subtree, for example engine inputs in subfolders. |
Content-Type |
for bodies | application/json, or text/plain for CSV uploads of time series values. |
Which authentication to use¶
| Situation | Use | Notes |
|---|---|---|
| A script, a scheduled integration or an agent working on behalf of a company, no person at the keyboard | Open API key | Simplest. The key is a project member, so share the project with the key's API account. Calls are logged against the key, not a person. Keep the key out of browsers and repositories. |
| A backend of a registered application acting for itself | OAuth client credentials | Needs an application registration. Access tokens expire, request a new one with the client credentials, there is no refresh token. |
| A person in a terminal or a notebook | plt cfg login (PKCE) or device code |
The token carries the user identity, so actions are audited per person. plt is the CLI installed with dotnet tool install -g DHI.Platform.Cli. |
| A web or desktop application with users | OAuth authorization code with PKCE | See Integration. |
| Handing a limited, time boxed access to one project or dataset to another process | Platform SAS token | Issued by the gateway for a project, dataset or folder subtree. Used by jobs, cron jobs and event subscriptions. |
Date and time formats¶
- Time series
fromandtoquery parameters useyyyy-MM-ddTHHmmss, for example2026-01-31T120000. - Multidimensional temporal filters and JSON bodies use ISO 8601, for example
2026-01-31T12:00:00Z. - Timestamps in time series CSV uploads are ISO 8601 without time zone, values are stored as given.