생성¶
POST /api/v1/workspace/accesskey/add
개요¶
API Key 생성
본문 요청 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| name | string | Y | AK 이름 예시: xxx 빈 값 허용: False |
| remark | string | API Key 설명 예시: 테스트 환경 데이터 조회에 사용 빈 값 허용: False 최대 길이: 512 |
|
| roleUUIDs | array | API Key 역할 목록 지정 (owner 제외) 빈 값 허용: False |
매개변수 추가 설명¶
1. 요청 매개변수 설명
| 매개변수명 | type | 필수 | 설명 |
|---|---|---|---|
| name | string | 필수 | API Key 이름 |
| remark | string | API Key 설명 | |
| roleUUIDs | array | API Key 역할 UUID 지정 (owner 제외, 기본값 ['wsAdmin']), 2025-03-12 릴리스에서 추가됨 |
요청 예시¶
curl 'https://openapi.guance.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
응답¶
{
"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"
}