API Keys

Update API Key

Updates can take up to 5 minutes to become effective.

Setting mtlsEnabled to true requires mTLS for the API Key <a class="experimental-tag-link" href="https://docs.silverflow.com/guides/api-lifecycle#tag/EXPERIMENTAL-Tag"><span class="tag experimental-tag">EXPERIMENTAL</span></a>. This is not reversible. The secret of the API Key is replaced by one that is never shown, so the old secret stops working and the API Key can only be used with a client certificate. Bind at least one active certificate first, or the request fails with 422. An API Key can't enable mTLS for itself: use another API Key. Send mtlsEnabled on its own: a request that also contains other fields is refused with 400.

Requires apiKeys:Update permission.

patch/apiKeys/{apiKey}

Request

Path parameters

apiKeystring required

Uniquely identifies an API Key

Example:apk-1UF2NafdfrdPMf2XrS2

Uniquely identifies an API Key.

Headers

If-Matchinteger

The request condition

Request body

status'disabled' | 'active'

Updatable API Key statuses

descriptionstring
permissionsPermission[]
ipRangesIpRange[]

A list of IP ranges

mtlsEnabledtrue

Requires mTLS for this API Key. This can't be undone. The API Key gets a new secret that is never shown, so from then on it can only be used with a client certificate, and requests that use the secret are refused. At least one active certificate must be bound to the API Key first. Only true is accepted, and no other field may be sent in the same request. <a class="experimental-tag-link" href="https://docs.silverflow.com/guides/api-lifecycle#tag/EXPERIMENTAL-Tag"><span class="tag experimental-tag">EXPERIMENTAL</span></a>

Example request

{
  "status": "active",
  "permissions": [
    "reports:All"
  ],
  "ipRanges": [
    "185.184.111.90/32",
    "185.184.111.96/29"
  ]
}

Response

The updated API Key

keystring required

Uniquely identifies an API Key

status'disabled' | 'active' | 'archived' required

The status of an API Key

agentKeystring required

Uniquely identifies an Agent

descriptionstring
permissionsPermission[] required
ipRangesIpRange[]

A list of IP ranges

mtlsEnabledboolean

Whether this API Key requires mTLS. It is false unless it was enabled, and it can't be set back to false. <a class="experimental-tag-link" href="https://docs.silverflow.com/guides/api-lifecycle#tag/EXPERIMENTAL-Tag"><span class="tag experimental-tag">EXPERIMENTAL</span></a>

secretstring

The secret part of this API Key. This value will only be returned upon creation. It cannot be changed afterwards.

createdstring date-time required

The date and time this object was created

lastModifiedstring date-time

The date and time this object was last modified

versioninteger required

The version of this object

Example response

{
  "key": "apk-1nM6msvaara1OMHzU7Zd",
  "status": "active",
  "agentKey": "cgt-6y5t4r3edcgfrthb",
  "description": "API Key for the data lake",
  "permissions": [
    "reports:All"
  ],
  "ipRanges": [
    "185.184.111.39/32"
  ],
  "created": "2021-05-27T10:57:52Z",
  "lastModified": "2021-05-27T10:57:52Z",
  "version": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.