---
updatedAt: 2026-06-05T15:04:13.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/linode-api/llms.txt
---

# Create a token for a service type

__Limited availability__ Returns a token that authenticates requests for the entities within a specific service type. To see your currently supported services, run the [List supported service types](ref:get-monitor-services) operation. The token has a lifetime of six hours after you create it.

> 📘
>
> When creating this token for Object Storage metrics, the token is accessible to all users on your account.

> 👍 There's a tutorial
>
> We offer an [example](ref:get-started#authenticate-monitor-api-operations) you can follow to generate this token.


**Permissions and scopes**

To call this operation, you need the following:

- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).

  - Scopes: `monitor:read_only`


**CLI**

```shell
linode-cli monitor token-get dbaas \
--entity_ids 189690 \
--entity_ids 188020 --json
```

[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)

# OpenAPI definition

````json
{
  "components": {
    "securitySchemes": {
      "oauth": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.linode.com/oauth/authorize",
            "scopes": {
              "account:read_only": "Allows access to GET information about your account.",
              "account:read_write": "Allows access to all endpoints related to your account.",
              "child_account:read_only": "Allows access to GET information about deprecated parent/child operations.",
              "child_account:read_write": "Allows access to deprecated parent/child operations.",
              "databases:read_only": "Allows access to GET information about databases.",
              "databases:read_write": "Allows access to all endpoints related to databases.",
              "domains:read_only": "Allows access to GET Domains on your account.",
              "domains:read_write": "Allows access to all Domain endpoints.",
              "events:read_only": "Allows access to GET your Events.",
              "events:read_write": "Allows access to all endpoints related to your Events.",
              "firewall:read_only": "Allows access to GET information about your Firewalls.",
              "firewall:read_write": "Allows access to all Firewall endpoints.",
              "images:read_only": "Allows access to GET your Images.",
              "images:read_write": "Allows access to all endpoints related to your Images.",
              "ips:read_only": "Allows access to GET your ips.",
              "ips:read_write": "Allows access to all endpoints related to your ips.",
              "linodes:read_only": "Allows access to GET Linodes on your account.",
              "linodes:read_write": "Allow access to all endpoints related to your Linodes.",
              "lke:read_only": "Allows access to GET LKE Clusters on your account.",
              "lke:read_write": "Allows access to all endpoints related to LKE Clusters on your account.",
              "longview:read_only": "Allows access to GET your Longview Clients.",
              "longview:read_write": "Allows access to all endpoints related to your Longview Clients.",
              "monitor:read_only": "Allows access to Monitor (Akamai Cloud Pulse) data.",
              "monitor:read_write": "Allows access to GET Monitor (Akamai Cloud Pulse) data.",
              "natgateways:read_only": "Allows access to Get NAT Gateways on your account.",
              "natgateways:read_write": "Allows access to all NAT Gateway endpoints.",
              "nodebalancers:read_only": "Allows access to GET NodeBalancers on your account.",
              "nodebalancers:read_write": "Allows access to all NodeBalancer endpoints.",
              "object_storage:read_only": "Allows access to GET information related to your Object Storage.",
              "object_storage:read_write": "Allows access to all Object Storage endpoints.",
              "stackscripts:read_only": "Allows access to GET your StackScripts.",
              "stackscripts:read_write": "Allows access to all endpoints related to your StackScripts.",
              "volumes:read_only": "Allows access to GET your Volumes.",
              "volumes:read_write": "Allows access to all endpoints related to your Volumes.",
              "vpc:read_write": "Allows access to all endpoints related to VPC and Subnet creation, updating, and deletion."
            },
            "tokenUrl": "https://login.linode.com/oauth/token"
          }
        },
        "type": "oauth2"
      },
      "personalAccessToken": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "description": "See documentation for Akamai's Linode API",
    "url": "https://techdocs.akamai.com/linode-api/reference"
  },
  "info": {
    "description": "\"[Read the API documentation](https://techdocs.akamai.com/linode-api/reference/api).\"",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Monitor",
    "version": "4.229.1"
  },
  "openapi": "3.0.1",
  "paths": {
    "/{apiVersion}/monitor/services/{serviceType}/token": {
      "post": {
        "description": "__Limited availability__ Returns a token that authenticates requests for the entities within a specific service type. To see your currently supported services, run the [List supported service types](ref:get-monitor-services) operation. The token has a lifetime of six hours after you create it.\n\n> 📘\n>\n> When creating this token for Object Storage metrics, the token is accessible to all users on your account.\n\n> 👍 There's a tutorial\n>\n> We offer an [example](ref:get-started#authenticate-monitor-api-operations) you can follow to generate this token.\n\n\n**Permissions and scopes**\n\nTo call this operation, you need the following:\n\n- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).\n\n  - Scopes: `monitor:read_only`\n\n\n**CLI**\n\n```shell\nlinode-cli monitor token-get dbaas \\\n--entity_ids 189690 \\\n--entity_ids 188020 --json\n```\n\n[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Linode API",
          "url": "https://techdocs.akamai.com/linode-api/reference/post-get-token"
        },
        "operationId": "post-get-token",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "entity_ids": [
                  13166,
                  13122,
                  13245
                ]
              },
              "schema": {
                "additionalProperties": false,
                "description": "Name the specific entities you want to include in this token.",
                "oneOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "entity_ids": {
                        "description": "The `id` for individual Object Storage buckets you want to specifically target for metrics gathering with this token. Run the [List Object Storage buckets](ref:get-object-storage-buckets) operation and store the `hostname` values for the applicable ones. To have the token apply to all of your Object Storage buckets, leave this array out of the request, and just send an empty object (`{ }`).\n\n> 📘\n>\n> - This field supports up to 100 total entries.\n>\n> - You need read access permission to all Object Storage buckets you want to access with this token. Run the [List a user's grants](ref:get-user-grants) operation to see the permission level for each Object Storage bucket in your account.",
                        "example": [
                          "primary-bucket-1.us-east-12.linodeobjects.com",
                          "backup-bucket-1.us-east-12.linodeobjects.com"
                        ],
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 100,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "title": "Token - Object Storage",
                    "type": "object",
                    "x-akamai": {
                      "file-path": "schemas/aclp-token-request-obj.yaml"
                    }
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "entity_ids": {
                        "description": "The `id` for each individual entity from a `service_type`. Get this value by running the list operation for the appropriate entity. For example, if your entity is one of your PostgreSQL databases, run the [List PostgreSQL Managed Databases](ref:get-databases-postgre-sql-instances) operation and store the `id` for the appropriate database from the response.\n\n> 📘\n>\n> - This field supports up to 100 total entries.\n>\n> - You need read access permission to all of the entities you include in the token. Run the [List a user's grants](ref:get-user-grants) operation to see the permission level for each entity in your account.",
                        "example": [
                          13166,
                          13217
                        ],
                        "items": {
                          "type": "integer"
                        },
                        "maxItems": 100,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": [
                      "entity_ids"
                    ],
                    "title": "Token - All other services",
                    "type": "object",
                    "x-akamai": {
                      "file-path": "schemas/aclp-token-request-others.yaml"
                    }
                  }
                ],
                "type": "object",
                "x-akamai": {
                  "file-path": "schemas/aclp-token-request.yaml"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "token": "abcdef1234567890"
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "token": {
                      "description": "A string representing the authentication token. This token is required for subsequent requests.",
                      "example": "abcdef1234567890",
                      "type": "string"
                    }
                  },
                  "required": [
                    "token"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/aclp-token-response.yaml"
                  }
                }
              }
            },
            "description": "The response provides the token."
          },
          "default": {
            "content": {
              "application/json": {
                "example": {
                  "errors": [
                    {
                      "reason": "Invalid JSON"
                    }
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "errors": {
                      "description": "Any warnings associated with a response.",
                      "items": {
                        "additionalProperties": false,
                        "description": "An object for describing a single error that occurred during the processing of a request.",
                        "properties": {
                          "field": {
                            "description": "The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as `null` if the error is not specific to any single element of the request.",
                            "example": "fieldname",
                            "type": "string"
                          },
                          "reason": {
                            "description": "What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to [Open a support ticket](ref:post-ticket) or perform some other action before you can complete the request successfully.",
                            "example": "fieldname must be a valid value",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/error-object.yaml"
                        }
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "See [Errors](ref:errors) for the range of possible error response codes."
          }
        },
        "security": [
          {
            "personalAccessToken": []
          },
          {
            "oauth": [
              "monitor:read_only"
            ]
          }
        ],
        "summary": "Create a token for a service type",
        "tags": [
          "Metrics"
        ],
        "x-akamai": {
          "status": "LA",
          "tabs": [
            {
              "syntax": "linode-cli monitor token-get dbaas \\\n--entity_ids 189690 \\\n--entity_ids 188020 --json",
              "title": "CLI",
              "url": "https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli"
            },
            {
              "syntax": "monitor:read_only, <service_type>:read_only",
              "title": "OAuth scopes",
              "url": "https://techdocs.akamai.com/linode-api/reference/get-started#oauth"
            }
          ]
        },
        "x-linode-cli-action": "token-get",
        "x-linode-grant": "read_only"
      },
      "parameters": [
        {
          "description": "__Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta.",
          "in": "path",
          "name": "apiVersion",
          "required": true,
          "schema": {
            "enum": [
              "v4",
              "v4beta"
            ],
            "example": "v4",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/api-version-path.yaml"
          }
        },
        {
          "description": "The Akamai Cloud Computing service being monitored. To see your currently supported services, run the [List supported service types](ref:get-monitor-services) operation and store the appropriate `service_type`.",
          "in": "path",
          "name": "serviceType",
          "required": true,
          "schema": {
            "example": "dbaas",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/aclp-service-type.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/aclp-get-token.yaml",
        "path-info": "/{apiVersion}/monitor/services/{serviceType}/token"
      },
      "x-linode-cli-command": "monitor"
    }
  },
  "servers": [
    {
      "url": "https://api.linode.com"
    }
  ],
  "tags": [
    {
      "description": "Akamai Cloud Pulse automatically collects and stores performance metrics for your cloud services. You can view them through dashboards and inspect them at the entity level. Metrics data provides insights into the health, behavior, and performance of your cloud resources.",
      "name": "Metrics"
    }
  ],
  "x-akamai": {
    "auth-type": "OAUTH",
    "file-path": "monitor-1.yaml"
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
````

# Sibling pages

* [List dashboards](https://techdocs.akamai.com/linode-api/reference/get-dashboards-all.md)
* [Get a dashboard](https://techdocs.akamai.com/linode-api/reference/get-dashboards-by-id.md)
* [List supported service types](https://techdocs.akamai.com/linode-api/reference/get-monitor-services.md)
* [Get details for a supported service type](https://techdocs.akamai.com/linode-api/reference/get-monitor-services-for-service-type.md)
* [List dashboards for a service type](https://techdocs.akamai.com/linode-api/reference/get-dashboards.md)
* [List metrics for a service type](https://techdocs.akamai.com/linode-api/reference/get-monitor-information.md)
* [Get an entity's metrics](https://techdocs.akamai.com/linode-api/reference/post-read-metric.md)