Code Block |
---|
[ { "api_key": "API_KEY_1", "config": { "permissions": "read" } }, { "api_key": "API_KEY_2", "config": { "permissions": "write" } } ] |
This endpoint allows you to generate a new API key.
Parameter | Type | Description |
---|---|---|
config | object | Configuration to associate with the API key |
Code Block | ||
---|---|---|
| ||
POST /es/api/v1/credentials/api_keys/ { "config": { "permissions": "read" } } |
Code Block |
---|
{ "api_key": "NEW_API_KEY", "result": "created" } |
Code Block |
---|
{ "detail": [ { "loc": ["query", "source"], "msg": "field required", "type": "value_error.missing" } ] } |
Update API Key
Parameter | Type | Description |
---|---|---|
api_key | string | API key to update |
Parameter | Type | Description |
---|---|---|
config | object | Configuration associated with the key |
Code Block | ||
---|---|---|
| ||
PUT /es/api/v1/credentials/api_keys/{api_key} { "config": { "permissions": "write" } } |
Code Block |
---|
{ "api_key": "EXISTING_API_KEY", "result": "updated" } |
Code Block |
---|
{ "detail": [ { "loc": ["query", "source"], "msg": "field required", "type": "value_error.missing" } ] } |
This endpoint allows you to delete an API key.
Parameter | Type | Description |
---|---|---|
api_key | string | API key to update |
Code Block | ||
---|---|---|
| ||
DELETE /es/api/v1/credentials/api_keys/delete/{api_key} |
Code Block |
---|
{ "api_key": "EXISTING_API_KEY", "result": "deleted" } |
Code Block |
---|
{ "detail": [ { "loc": ["query", "source"], "msg": "field required", "type": "value_error.missing" } ] } |