Revoke every API token of the verified domains
const url = 'https://beta-api.plune.ai/v1/companies/example/sso/tokens';const options = { method: 'DELETE', headers: { cookie: 'plune_session=<plune_session>', 'Content-Type': 'application/json' }, body: '{"confirm":0}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://beta-api.plune.ai/v1/companies/example/sso/tokens \ --header 'Content-Type: application/json' \ --cookie plune_session=<plune_session> \ --data '{ "confirm": 0 }'Owner and managers (#1610). confirm must equal the number of tokens that would be revoked; when the list changed since it was read the answer is 409 sso_confirm_mismatch with the fresh count, and nothing is revoked. A revoked token answers 401 on its next request. One row of the company’s log (counts only). CI pipelines that use these tokens will fail: see affectedProjects. 20 a minute a person.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
The number of tokens the caller was shown (total of the list). Refused with the fresh count when it differs.
Example
{ "confirm": 0}Responses
Section titled “ Responses ”How many were revoked
object
The distinct projects the tokens write to.
object
Tokens that belong to no project of their own: they follow their owner’s default project.
Example generated
{ "affectedProjects": [ { "id": "example", "name": "example" } ], "unboundTokens": 1, "revoked": 1}confirm is missing or not a whole number
object
Example generated
{ "error": "example"}No / invalid session
No such company, or the caller is not its owner or a manager
object
Example generated
{ "error": "example"}sso_confirm_mismatch: the body has the fresh count and the impact
object
Example generated
{ "error": "example"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over