Update API Key Policy
PUT/api-users/policy/
Request
- application/json
- application/x-www-form-urlencoded
- multipart/form-data
Body
Possible values: <= 4294967295
Sets the upper limit (in days) for how long an API key can be valid. This constraint is only active if 'enable_max_api_key_duration' is set to True.
If enabled, the 'max_api_key_duration_days' setting will be enforced, limiting the validity period of created API keys.
If enabled, all API keys created directly by a User (or by API users derived from them) will be automatically disabled when that user is disabled or deleted.
Body
Possible values: <= 4294967295
Sets the upper limit (in days) for how long an API key can be valid. This constraint is only active if 'enable_max_api_key_duration' is set to True.
If enabled, the 'max_api_key_duration_days' setting will be enforced, limiting the validity period of created API keys.
If enabled, all API keys created directly by a User (or by API users derived from them) will be automatically disabled when that user is disabled or deleted.
Body
Possible values: <= 4294967295
Sets the upper limit (in days) for how long an API key can be valid. This constraint is only active if 'enable_max_api_key_duration' is set to True.
If enabled, the 'max_api_key_duration_days' setting will be enforced, limiting the validity period of created API keys.
If enabled, all API keys created directly by a User (or by API users derived from them) will be automatically disabled when that user is disabled or deleted.
Responses
- 200
- 400
- 401
- 500
- application/json
- Schema
- Example (from schema)
Schema
Possible values: <= 4294967295
Sets the upper limit (in days) for how long an API key can be valid. This constraint is only active if 'enable_max_api_key_duration' is set to True.
If enabled, the 'max_api_key_duration_days' setting will be enforced, limiting the validity period of created API keys.
If enabled, all API keys created directly by a User (or by API users derived from them) will be automatically disabled when that user is disabled or deleted.
{
"max_api_key_duration_days": 0,
"enable_max_api_key_duration": true,
"disable_keys_on_user_disabled": true
}
- application/json
- Schema
- Example (from schema)
Schema
{
"<field name>": [
"Errors related to field <field name>."
],
"non_field_errors": [
"Errors not related to any field specific field."
]
}
- application/json
- Schema
- Example (from schema)
Schema
{
"detail": "Incorrect authentication credentials."
}
- application/json
- Schema
- Example (from schema)
Schema
{
"detail": "Unexpected error while handling your request."
}