key_lifecycle_rules
Key Lifecycle Rules

Create Key Lifecycle Rule

Changed on

Create Key Lifecycle Rule

post/key_lifecycle_rules

Request

  • Base URL
    https://app.files.com/api/rest/v1
  • URL
    https://app.files.com/api/rest/v1/key_lifecycle_rules
  • Auth
    none declared

Request body multipart/form-data

apply_to_all_workspacesboolean

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

expiration_daysinteger

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

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.

namestring

Key Lifecycle Rule name

workspace_idinteger

Workspace ID. 0 means the default workspace.

Example request

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

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
}

Changes