Delete token by its ID.
No Content
const response = await fetch('https://cloud-api.calyptia.com/v1/project_tokens/{tokenID}', { method: 'DELETE', headers: { "Authorization": "Bearer <token>" }, }); const data = await response.json();
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: 'PATCH', headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }, body: JSON.stringify({}), }); const data = await response.json();
Token by ID.
OK
"redacted"
"my-token"
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-10-05T17:36:20.906Z" }