Skip to content
Datamotive
Easy Hybrid DRv2.3.1GARelease notes →

API

API authentication

Get an API token, sign requests, rotate credentials, and scope access by role.

Product
Easy Hybrid DR
Version
v2.3.1
Release status
GA
Documentation status
Published
Last updated
Updated
Reading time
1 min read

The Datamotive API authenticates every request with a workspace-scoped bearer token. Tokens are issued from the console or via the CLI, are tied to a role, and can be rotated without downtime.

Get a token

  1. Create a token

    From the console, open Settings, then API tokens, then Create token. Pick a role and an expiry.

  2. Store it

    Copy the token value once. The platform never displays it again. Store it in your secrets manager.

  3. Verify access

    Call the whoami endpoint to confirm the token works.

    bash
    curl https://api.datamotive.io/v1/whoami \
      -H "Authorization: Bearer $DM_TOKEN"

Make a request

POST/v1/plans
bash
curl -X POST https://api.datamotive.io/v1/plans \
  -H "Authorization: Bearer $DM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "prod-tier1", "rpoSeconds": 300, "retention": "7d" }'

Token roles

RoleReadsWritesMutates state
viewerAllNoneNo
operatorAllPlans, jobsYes (no delete)
adminAllAllYes

Rotate a token

bash
dm auth tokens create --role operator --name ci-bot --expires 90d
# Deploy the new token to all callers, then:
dm auth tokens revoke --id <old-token-id>

Errors

HTTP codeReasonAction
401Missing or invalid tokenRe-issue the token. Confirm the Authorization header is present.
403Role does not permit this actionUse a higher-privileged token or change the role.
429Rate limit exceededBackoff with exponential retry. Limits are per workspace per minute.

Related docs

Was this page helpful?