Rotate Current Workspace Token¶
POST /api/v1/workspace/token/rotate
Overview¶
Rotate the token of the workspace to which the current API Key belongs, and return the new token.
Notes:
- This interface only operates on the
tokenin the workspace properties, notcliToken. - Batch operations are not supported.
ttlis the delayed expiration duration for the old token, supporting custom input from the caller.
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| ttl | string | Y | The remaining validity period of the old token, supports custom duration string, maximum not exceeding 1 day. Example: 24h Allow Empty: False $matchRegExp: ^(0s |
Parameter Additional Notes¶
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/workspace/token/rotate' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"ttl":"24h"}' \
--compressed