Using Personal Access Tokens

How to create and use Personal Access Tokens for the Avisi Cloud API

Introduction

For automated access to the API, it is possible to either use your acloud CLI configuration with OIDC, or make use of Personal Access Tokens (PATs).

PATs are static access keys that can be used by non-human systems for automation purposes, such as terraform, our API client and others.

Rectangle
API Access Page

PATs can be used to access the API to perform any action under your user, without having to configure your password in for example CI pipelines, such as Github Actions or Gitlab CI Pipelines.

PATs can be revoked at any time.

Creating a Personal Access Token

In order to create a new Personal Access Token, go to “API Access” in the top right drop down menu. From there, press the button create personal access token.

When creating a new Personal Access Token, you can provide a name and optionally an IP restriction using a CIDR notation, in order to restrict from which IPv4 blocks your PAT can be used.

Rectangle
Creating a new Personal Access Token

Usage

Add the created PAT to the Authorization request. Example:

GET /api/v1/orgs/ame/update-channels
Host: api.avisi.cloud
Authorization: Token $PAT_TOKEN_VALUE