Create¶
POST /api/v1/workspace/accesskey/add
Overview¶
Create a Key
Body Parameters¶
| Parameter Name | Type | Required | Description | 
|---|---|---|---|
| name | string | Y | AK name Example: xxx Allow empty: False  | 
| roleUUIDs | array | Specify API key roles list (excluding owner) Allow empty: False  | 
Parameter Additional Notes¶
*1. Request Parameter Description
| Parameter Name | Type | Required | Description | 
|---|---|---|---|
| name | string | Required | API Key name | 
| roleUUIDs | array | Specify API Key role UUIDs (excluding owner, default is ['wsAdmin']), added in 2025-03-12 iteration | 
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/workspace/accesskey/add' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-raw '{"name": "88"}' \
  --compressed \
  --insecure
Response¶
{
    "code": 200,
    "content": {
        "createAt": 1678024319,
        "creator": "xxxx",
        "deleteAt": -1,
        "id": null,
        "name": "88",
        "sk": "xxx",
        "status": 0,
        "updateAt": 1678024319,
        "updator": "xxx",
        "uuid": "xxx",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-A294E29E-33DE-48A5-A379-0BAA1519D256"
}