Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Just-in-time settings API

The JIT Access Settings API allows organizations to define how long temporary access should last, and under what conditions. Admins can configure approvable, standing, and maximum access durations, create custom expiry presets, and enforce approval policies like requiring justifications or second-party approval. This aligns access privileges with least-privilege principles and audit requirements, without slowing teams down.

To manage access durations and expiry options as code, use the p0_access_durations and p0_expiry_options resources in the P0 Terraform provider (version 0.50.0 or later).

Add a custom expiry duration

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
valuestringOptional
timenumberOptional
unitstring · enumOptionalPossible values:
Responses
204

Custom expiry added

No content

post/expiry-options
POST /o/demo-org/settings/expiry-options HTTP/1.1
Host: api.p0.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "value": "text",
  "time": 1,
  "unit": "m"
}

No content

Remove a custom expiry duration

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
keystringRequired
Responses
204

Custom expiry removed

No content

delete/expiry-options/{key}
DELETE /o/demo-org/settings/expiry-options/{key} HTTP/1.1
Host: api.p0.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Reset custom expiry durations

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Reset expiry options

application/json
post/expiry-options/_reset
POST /o/demo-org/settings/expiry-options/_reset HTTP/1.1
Host: api.p0.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "options": [
    {
      "value": "text",
      "time": 1,
      "unit": "m"
    }
  ],
  "approvableDuration": {
    "value": "text",
    "time": 1,
    "unit": "m"
  },
  "maxAccessDuration": {
    "value": "text",
    "time": 1,
    "unit": "m"
  },
  "standingAccessDuration": {
    "value": "text",
    "time": 1,
    "unit": "m"
  }
}

Set approvable duration

put

Set the duration within which access requests must be approved. Requests that remain pending beyond this duration are automatically timed out.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
valuestringOptional
timenumberOptional
unitstring · enumOptionalPossible values:
Responses
200

Approvable duration configured

application/json
okbooleanOptional
put/approvable-duration
PUT /o/demo-org/settings/approvable-duration HTTP/1.1
Host: api.p0.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "value": "text",
  "time": 1,
  "unit": "m"
}
{
  "ok": true,
  "approvableDuration": {
    "value": "text",
    "time": 1,
    "unit": "m"
  }
}

Set custom standing access duration

put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
valuestringOptional
timenumberOptional
unitstring · enumOptionalPossible values:
Responses
200

Standing access configured

application/json
okbooleanOptional
put/standing-access-duration
PUT /o/demo-org/settings/standing-access-duration HTTP/1.1
Host: api.p0.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "value": "text",
  "time": 1,
  "unit": "m"
}
{
  "ok": true,
  "standingAccessDuration": {
    "value": "text",
    "time": 1,
    "unit": "m"
  }
}

Set custom maximum access duration

put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
valuestringOptional
timenumberOptional
unitstring · enumOptionalPossible values:
Responses
200

Max access configured

application/json
okbooleanOptional
put/max-access-duration
PUT /o/demo-org/settings/max-access-duration HTTP/1.1
Host: api.p0.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "value": "text",
  "time": 1,
  "unit": "m"
}
{
  "ok": true,
  "maxAccessDuration": {
    "value": "text",
    "time": 1,
    "unit": "m"
  }
}

Last updated