Skip to main content

Update

PATCH /v1/api-keys/{item_id}

Authentication

Requires authentication via: OAuth2PasswordBearer.

Parameters

NameInTypeRequiredDescriptionConstraints
item_idpathintegerYes
X-API-Keyheaderstring | nullNonullable

Request Body

Required: Yes

application/json

Resolved schema:

{
"properties": {
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Expires At"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"type": "object",
"title": "APIKeyRecordCreate"
}

Field details:

FieldTypeRequiredDescriptionConstraints
expires_atstring | nullNoformat=date-time, nullable
descriptionstring | nullNonullable

Responses

200

Successful Response

application/json

Resolved schema:

{
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"key_prefix": {
"type": "string",
"title": "Key Prefix"
},
"user_id": {
"type": "integer",
"title": "User Id"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status"
},
"created_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Created At"
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Expires At"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"full_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Key"
}
},
"type": "object",
"required": [
"id",
"key_prefix",
"user_id",
"status",
"created_at",
"expires_at",
"description"
],
"title": "APIKeyRecordRead"
}

Field details:

FieldTypeRequiredDescriptionConstraints
idintegerYes
key_prefixstringYes
user_idintegerYes
statusstring | nullYesnullable
created_atstring | nullYesformat=date-time, nullable
expires_atstring | nullYesformat=date-time, nullable
descriptionstring | nullYesnullable
full_keystring | nullNonullable

422

Validation Error

application/json

Resolved schema:

{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}

Field details:

FieldTypeRequiredDescriptionConstraints
detailarray<object>No
detail[]objectNo
detail[].locarray<string | integer>No
detail[].loc[]string | integerNo
detail[].msgstringNo
detail[].typestringNo