API Keys

Provision an API Key

Provision a new API Key for your organization.

Required Scope: write-api-keys

Authorization Scopes

API Keys can be created with specific authorization scopes that control what operations the key can perform. If no scopes are specified, the key will be created with all available scopes (admin-level access). See the Cloud API "Introduction" for a complete list authorization scopes.

Expiration Date

Set an appropriate expiration date for temporary API access. For no expiration, set to 0.

post/v1/org/{org_id}/key

Request

  • Base URL: https://api.hubble.com
  • URL: https://api.hubble.com/v1/org/{org_id}/key
  • Auth: HTTP bearer

Path parameters

org_idstring uuid required

The ID for an organization

Your organization ID

Headers

Content-Typestring

An indication that the payload is JSON

Request body

namestring

A name for an API Key

expires_at_secondsinteger

An UTC second-precision timestamp formatted as an integer. Can be set to 0 to indicate that there is no expiration.

scopes'read-api-keys' | 'write-api-keys' | 'read-users' | 'write-users' | 'read-organization-metadata' | 'write-organization-metadata' | 'read-devices' | 'write-devices' | 'read-invitations' | 'write-invitations' | 'read-packets' | 'read-platform-metrics' | 'read-billing-usage' | 'read-billing-invoices' | 'read-webhooks' | 'write-webhooks' | 'read-satellites'

Authorization scope for API key permissions

Response

API key provisioned

key_idstring

An ID for an API key

key_namestring

A name for an API Key

created_atinteger

An UTC second-precision timestamp formatted as an integer

expires_at_secondsinteger

An UTC second-precision timestamp formatted as an integer. Can be set to 0 to indicate that there is no expiration.

scopesAuthScope[]

List of authorization scopes assigned to this API key

keystring

An API key

Changes

No recorded changes to this operation across all 1 revision of this API.