v4

latestSwagger 2.02026-08-0343714211.7 MB
key_lifecycle_rules
Key Lifecycle Rules

List Key Lifecycle Rules

List Key Lifecycle Rules

get/key_lifecycle_rules

Query parameters

cursorstring

Used for pagination. When a list request has more records available, cursors are provided in the response headers X-Files-Cursor-Next and X-Files-Cursor-Prev. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.

per_pageinteger

Number of records to show per page. (Max: 10000, 1,000 or less is recommended).

If set, sort records by the specified field in either asc or desc direction. Valid fields are workspace_id and key_type.

If set, return records where the specified field is equal to the supplied value. Valid fields are key_type and workspace_id. Valid field combinations are [ workspace_id, key_type ].

Response

A list of KeyLifecycleRules objects.

idinteger

Key Lifecycle Rule ID

key_type'gpg' | 'ssh' | 'api'

Key type for which the rule will apply (gpg, ssh, or api).

inactivity_daysinteger

Number of days of inactivity before the rule applies.

expiration_daysinteger

Number of days after creation before an SSH key expires. Applies only to SSH keys.

apply_to_all_workspacesboolean

If true, a default-workspace rule also applies to keys in all workspaces.

namestring

Key Lifecycle Rule name

workspace_idinteger

Workspace ID. 0 means the default workspace.

Example response

[
  {
    "id": 1,
    "key_type": "gpg",
    "inactivity_days": 12,
    "expiration_days": 365,
    "apply_to_all_workspaces": true,
    "name": "inactive gpg keys",
    "workspace_id": 12
  }
]