OpenapiApi keys
Update API Key roles
Replaces all roles assigned to an API Key. Empty array clears all roles. Builtin roles cannot be assigned to API Keys (returns 400).
Replaces all roles assigned to an API Key. Empty array clears all roles. Builtin roles cannot be assigned to API Keys (returns 400).
Path Parameters
realmId*string
Realm ID
apiKeyId*string
API Key ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
roleIds*array<>
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/api-keys/string/string/roles" \ -H "Content-Type: application/json" \ -d '{ "roleIds": [ "10960216-a894-4481-b8f2-270c1c8fab34" ] }'Empty
{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}