List service tokens
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/service-tokens"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/organisation/service-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/organisation/service-tokens \
--header 'Authorization: Bearer <token>'{
"tokens": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_name": "<string>",
"label": "<string>",
"role_slug": "<string>",
"expires_at": "<string>",
"days_left": 123,
"created_at": "<string>",
"revoked_at": "<string>",
"last_used_at": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>"
}
]
}Organisation IAM
List service tokens
Lists the organisation’s service-account tokens (never their secrets) with expiry, last use, scopes and project pin. Requires members.manage.
GET
/
api
/
v1
/
org
/
organisation
/
service-tokens
List service tokens
import requests
url = "https://platform.ankra.app/api/v1/org/organisation/service-tokens"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/organisation/service-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/organisation/service-tokens \
--header 'Authorization: Bearer <token>'{
"tokens": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_name": "<string>",
"label": "<string>",
"role_slug": "<string>",
"expires_at": "<string>",
"days_left": 123,
"created_at": "<string>",
"revoked_at": "<string>",
"last_used_at": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>"
}
]
}