ZITADEL Docs
APIsCore ResourcesV2Action

ListPublicKeys

List Public Keys

Lists all public keys of a target. The response includes which key is active and the key's expiration dates. This allows you to manage key rotations and ensure that your target always has an active key for payload encryption.

Required permission:

  • action.target.read
POST
/v2/actions/targets/{target_id}/publickeys/search

Path Parameters

target_id*string

TargetID is the unique identifier of the target to list the public keys for.

Request Body

application/json

pagination?

List limitations and ordering.

sortingColumn?string

The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.

Value in"PUBLIC_KEY_FIELD_NAME_UNSPECIFIED" | "PUBLIC_KEY_FIELD_NAME_CREATION_DATE" | "PUBLIC_KEY_FIELD_NAME_CHANGE_DATE" | "PUBLIC_KEY_FIELD_NAME_EXPIRATION_DATE"
filters?

Define the criteria to query for.

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://loading/v2/actions/targets/string/publickeys/search" \  -H "Content-Type: application/json" \  -d '{}'
{
  "pagination": {
    "totalResult": 0,
    "appliedLimit": 0
  },
  "publicKeys": [
    {
      "keyId": "string",
      "active": true,
      "publicKey": "string",
      "fingerprint": "string",
      "expirationDate": "1s",
      "creationDate": "1s",
      "changeDate": "1s"
    }
  ]
}
{
  "code": "not_found",
  "message": "string",
  "detail": {
    "type": "string",
    "value": "string",
    "debug": {}
  }
}

Was this page helpful?