API Tokens
Returns a paginated list of API tokens with obfuscated token IDs.
The page number of results
1The number of results to return per page
10OK
252Bad Request
Unauthorized
Forbidden
GET /v2/api-tokens HTTP/1.1
Host: api.appetize.io
Accept: */*
{
"total": 25,
"nextPage": 2,
"tokens": [
{
"id": "6592008029c8c3e4dc76256c",
"obfuscatedToken": "tok_abcd****",
"label": "CI/CD Token",
"role": "developer",
"lastUsed": "2021-01-01T00:00:00.000Z",
"created": "2021-01-01T00:00:00.000Z",
"createdBy": "admin@enterprise.com"
}
]
}Creates a new API token. Returns the full token only once. Token must be saved securely by the user.
The label of the API token.
CI/CD TokenThe role of the API token.
developerPossible values: API Token created
The ID of the API token.
6592008029c8c3e4dc76256cThe string representing the token obfuscated
tok_abcd****The full token string
tok_abcdefghijklmnopqrstuvwxyzThe ID of the account.
6592008029c8c3e4dc76256cThe label of the API token.
CI/CD TokenThe email of the user who created the API token.
admin@enterprise.comThe date and time the API token was created.
2021-01-01T00:00:00.000ZThe date and time the API token was last used.
2021-01-01T00:00:00.000ZThe role of the API token.
developerPossible values: Bad Request
Unauthorized
Forbidden
POST /v2/api-tokens HTTP/1.1
Host: api.appetize.io
Content-Type: application/json
Accept: */*
Content-Length: 42
{
"label": "CI/CD Token",
"role": "developer"
}{
"id": "6592008029c8c3e4dc76256c",
"obfuscatedToken": "tok_abcd****",
"token": "tok_abcdefghijklmnopqrstuvwxyz",
"accountId": "6592008029c8c3e4dc76256c",
"label": "CI/CD Token",
"createdBy": "admin@enterprise.com",
"created": "2021-01-01T00:00:00.000Z",
"lastUsed": "2021-01-01T00:00:00.000Z",
"role": "developer"
}Retrieve a specific API token’s info.
The id for the API token
6592008029c8c3e4dc76256cThe API token
The ID of the API token.
6592008029c8c3e4dc76256cThe string representing the token obfuscated
tok_abcd****The label of the API token.
CI/CD TokenThe role of the API token.
developerPossible values: The date and time the API token was last used.
2021-01-01T00:00:00.000ZThe date and time the API token was last used.
2021-01-01T00:00:00.000ZThe email of the user who created the API token.
admin@enterprise.comUnauthorized
Forbidden
API Token not found
GET /v2/api-tokens/{id} HTTP/1.1
Host: api.appetize.io
Accept: */*
{
"id": "6592008029c8c3e4dc76256c",
"obfuscatedToken": "tok_abcd****",
"label": "CI/CD Token",
"role": "developer",
"lastUsed": "2021-01-01T00:00:00.000Z",
"created": "2021-01-01T00:00:00.000Z",
"createdBy": "admin@enterprise.com"
}Revoke an API token.
The id for the API token to revoke
6592008029c8c3e4dc76256cAPI Token rekoved
No content
Bad Request
Unauthorized
Forbidden
API Token not found
DELETE /v2/api-tokens/{id} HTTP/1.1
Host: api.appetize.io
Accept: */*
No content
Last updated