Token by ID.
OK
"redacted"
"my-token"
Delete token by its ID.
No Content
Update token by its ID.
"new-token"
An empty list means it has all permissions.
const response = await fetch('https://cloud-api.calyptia.com/v1/project_tokens/{tokenID}', { method: 'GET', headers: { "Authorization": "Bearer <token>" }, }); const data = await response.json();
{ "id": "123e4567-e89b-12d3-a456-426614174000", "token": "redacted", "name": "my-token", "permissions": [ "create:*" ], "createdAt": "2024-11-21T09:34:11.147Z" }
const response = await fetch('https://cloud-api.calyptia.com/v1/project_tokens/{tokenID}', { method: 'DELETE', headers: { "Authorization": "Bearer <token>" }, }); const data = await response.json();
const response = await fetch('https://cloud-api.calyptia.com/v1/project_tokens/{tokenID}', { method: 'PATCH', headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({}), }); const data = await response.json();