v4

latestSwagger 2.02026-08-0343714211.7 MB
key_lifecycle_rules
Key Lifecycle Rules

Create Key Lifecycle Rule

Create Key Lifecycle Rule

post/key_lifecycle_rules

Response

The KeyLifecycleRules object.

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
}