Skip to content

Batch Enable/Disable Member Personal API Keys



POST /api/v1/workspace/member/personal_api_key/enable/modify

Overview

Batch enable or disable member personal API Key usage permissions

Body Request Parameters

Parameter Name Type Required Description
accountUUIDs array Y List of member account UUIDs
Example: ['acnt_xxxx32']
Allow empty: False
enablePersonalAPIKey integer Y Whether to enable personal API Key, 1 for enable, 0 for disable
Example: 1
Allow empty: False
Optional values: [0, III]

Parameter Additional Notes

The request body is consistent with the frontend interface /api/v1/workspace/member/personal_api_key/enable/modify.

  • enablePersonalAPIKey=1 means enabling member personal API Key usage permissions.
  • enablePersonalAPIKey=0 means disabling member personal API Key usage permissions, members will be unable to continue using personal API Keys to access current workspace resources.
  • Disabling the personal API Key permission for the owner member will be rejected.
  • Free Plan and Free Plan workspaces do not support this capability.

Request Example

curl 'https://openapi.guance.com/api/v1/workspace/member/personal_api_key/enable/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"accountUUIDs": ["acnt_xxxx32"], "enablePersonalAPIKey": 1}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "updated": 1
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-B6A69C1D-ED27-42C2-93FD-BC943F8675D2"
} 

Feedback

Is this page helpful? ×