Ga naar inhoud

Change the validity of new credentials

PUT
/api/v1/settings/credentials
curl --request PUT \
--url https://example.com/api/v1/settings/credentials \
--header 'Content-Type: application/json' \
--cookie bl_authority_session=<bl_authority_session> \
--data '{ "validity_days": 1 }'

Applies to credentials issued from now on (decisions #43).

Media typeapplication/json
object
validity_days
required

1 to 365.

integer format: int64

Example generated

{
"validity_days": 1
}

OK.

Media typeapplication/json

The validity of new credentials: documents the JSON built in [view].

object
validity_days
required

How long a new credential is valid.

integer format: int64
default_days
required
integer format: int64
min_days
required
integer format: int64
max_days
required
integer format: int64
renew_after_hours
required

After two thirds of the lifetime, the holder is offered a new credential.

integer format: int64
outage_margin_hours
required

How long the authority may be unavailable before credentials expire.

integer format: int64

Example generated

{
"validity_days": 1,
"default_days": 1,
"min_days": 1,
"max_days": 1,
"renew_after_hours": 1,
"outage_margin_hours": 1
}

The request is not valid.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

No valid session, DPoP-bound token or API key.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}