API Tokens

At the moment Terrakube supports only user level API tokens.

API tokens are displayed only once when they are created, and are obfuscated thereafter. If the token is lost, it must be regenerated.

User API Tokens

API tokens may belong directly to a user. User tokens inherit permissions from the user they are associated with.

User API tokens can be generated inside the User Settings.

Click the Generate and API token button

Add some small description to the token and the duration

The new token will be showed and you can copy it to star calling the Terrakube API using Postman or some other tool.

Code example:

curl --location --request POST 'https://{TerrakubeAPI}/api/v1/organization' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer XXXXXXX' \
--data-raw '{
  "data": {
    "type": "organization",
    "attributes": {
      "name": "hashicorp",
      "description": "hashicorp organization"
    }
  }
}'

Replace XXXXXXX with the Personal Access Token value

Last updated