Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Insert excerpt
License
License
nameLicensing Information The feature described in this documentation is optional and might not be part of the edition covered by your company's license.
nopaneltrue

To use your APIs using curl command:

  1. Create an Application Access in Usage Engine as described in Configuring Application Access. Ensure to copy the Client Secret during creation since it will only be visible at that time.

  2. Call the authorization api with your Application credentials. Configure the audience based on which Environments you are calling.

Info

These examples use Production EU URL for accessing the APIs, update the URL based on your Environments .

Code Block
client_id="f9bP7jTE63gNlA8jluCoPMs2ueP7si1L"
client_secret="woN7vnKUVAC-y_WVd8Eih6R06mNfFA9V9ZUjid5Ae7iGE5R8Kll_fFY7EiRQ0d-9"
curl "https://api.digitalroute.io/authentication/v1/oauth/token" \
  -X POST \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d client_secret="woN7vnKUVAC-y_WVd8Eih6R06mNfFA9V9ZUjid5Ae7iGE5R8Kll_fFY7EiRQ0d-9"id=${client_id} \
  -d client_id="f9bP7jTE63gNlA8jluCoPMs2ueP7si1L"secret=${client_secret} \
  -d grant_type="client_credentials" \
  -d audience="https://api.digitalroute.io/" 

...

Code Block
{
  "meterTypes": [
    {
      "accountId": "4d6548c8-1793-498f-9306-9ec101cb9bf8",
      "activeFrom": "2023-07-26T09:00:15.690+00:00",
      "activeTo": "2024-11-22T00:00:00.000+00:00",
      "aggregation": {
        "type": "increment"
      },
      "category": "API Counts",
      "createdAt": "2023-07-26T09:00:15.690+00:00",
      "description": "Meter definition to count the number of API requests per customer",
      "externalRef": "878752b4-4ddf",
      "id": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
      "name": "Usage based API counter",
      "numberOfMeters": 0,
      "resetSchedule": {
        "day": "L",
        "hour": "0",
        "minute": "0",
        "month": "*",
        "weekday": "*"
      },
      "timezone": "Etc/UTC",
      "unit": "requests",
      "updatedAt": "2023-07-26T09:00:15.690+00:00"
    }
  ]
}

...