P0 App Documentation
Sign up for FreeKnowledge Base
  • What Is P0?
    • πŸŽ›οΈIAM Dashboard
    • πŸ”ŽAccess Inventory
    • πŸͺ‘IAM Posture
    • ⏱️Just-In-Time Access
    • ♻️Service-Account Key Rotation
  • Getting Started
    • ⬇️Quick Start
    • 🎁Share P0 With Your Team
  • INVENTORY
    • πŸ—ΊοΈAccess Inventory
    • πŸ”¬Result Details
    • ❔Query Search
      • πŸ“–Search Reference
  • Posture
    • βš–οΈPosture Overview
  • Monitor Results
  • πŸ€”Finding Details
  • ORCHESTRATION
    • ⏰Just-in-time access
      • πŸ–οΈRequesting Access
        • πŸ‘‰For Another Party
      • 🏁Approving Access
        • Pre-approving Access
      • πŸ”€Request Routing
        • Google Cloud Filtering
        • AWS Filtering
      • πŸ—’οΈSession Recording
        • πŸ“¦AWS
      • πŸ”ŒJust-in-time API
        • Command API
        • Access Requests API
        • Routing Rules API
  • Environments
    • ☁️Creating an Environment
    • πŸ““Environment Terminology
    • βš™οΈSettings
  • Integrations
    • πŸ“žNotifier integrations
      • πŸ’¬Slack
      • πŸ‘¬Microsoft Teams
      • πŸ“£Custom Notifiers
        • AWS Lambda Notifier
    • πŸ”‘Resource integrations
      • ☁️Google Cloud
        • Security Perimeter
        • Requesting Access
        • Permissions Reference
          • Cloud Storage
          • Compute Engine
        • Function Caller
      • πŸ“¦AWS
        • Requesting Access
        • AWS Integration API
        • Function Caller
      • ☸️Kubernetes
        • Requesting Access
        • Advanced Requests
      • πŸ”‹PostgreSQL
        • Requesting Access
      • ❄️Snowflake
      • πŸ–₯️SSH
      • GitHub
        • Requesting Access
      • πŸ› οΈCustom Resource
        • Installing a Custom Resource Integration
    • πŸ‘₯Directory integrations
      • Microsoft Entra ID
        • Requesting Access
      • Google Workspace
      • Okta
    • βœ”οΈApproval integrations
      • πŸ””PagerDuty
    • ⚑SIEM Integrations
      • Splunk HEC Setup
  • πŸ“Tracker integrations
    • 🎟️Jira
  • P0 Management
    • 🎩Role-Based Access Control
    • πŸ”ŒManagement API
      • Role Management API
      • Just-in-time settings API
Powered by GitBook
On this page
  1. P0 Management
  2. Management API

Just-in-time settings API

PreviousRole Management API

Last updated 1 day ago

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

πŸ”Œ

Reset custom expiry durations

post
Authorizations
Responses
200
Reset expiry options
application/json
400
Bad request
401
Unauthorized
post
POST /o/demo-org/settings/expiry-options/_reset HTTP/1.1
Host: api.p0.app
Authorization: Bearer API Key
Accept: */*
{
  "options": [
    {
      "time": 5,
      "unit": "m",
      "value": "5 minutes"
    },
    {
      "time": 1,
      "unit": "h",
      "value": "1 hour"
    },
    {
      "time": 24,
      "unit": "h",
      "value": "1 day"
    },
    {
      "time": 168,
      "unit": "h",
      "value": "1 week"
    },
    {
      "time": 720,
      "unit": "h",
      "value": "30 days"
    }
  ]
}
  • POSTAdd a custom expiry duration
  • DELETERemove a custom expiry duration
  • POSTReset custom expiry durations
  • PUTUpdate approval settings
  • PUTSet custom standing access duration
  • PUTSet custom maximum access duration

Remove a custom expiry duration

delete
Authorizations
Path parameters
keystringRequired
Responses
204
Custom expiry removed
400
Bad request
401
Unauthorized
delete
DELETE /o/demo-org/settings/expiry-options/{key} HTTP/1.1
Host: api.p0.app
Authorization: Bearer API Key
Accept: */*

No content

Add a custom expiry duration

post
Authorizations
Body
timenumberRequired
unitstring Β· enumRequiredPossible values:
Responses
204
Custom expiry added
400
Bad request
401
Unauthorized
post
POST /o/demo-org/settings/expiry-options HTTP/1.1
Host: api.p0.app
Authorization: Bearer API Key
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "time": 2,
  "unit": "h"
}

No content

Update approval settings

put
Authorizations
Body
allowOnePartybooleanOptional
requireReasonbooleanOptional
Responses
204
Settings updated
400
Bad request
401
Unauthorized
put
PUT /o/demo-org/settings/default-approvals HTTP/1.1
Host: api.p0.app
Authorization: Bearer API Key
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "allowOneParty": true,
  "requireReason": true
}

No content

Set custom standing access duration

put
Authorizations
Body
timenumberRequired
unitstring Β· enumRequiredPossible values:
Responses
200
Standing access configured
application/json
400
Bad request
401
Unauthorized
put
PUT /o/demo-org/settings/standing-access-duration HTTP/1.1
Host: api.p0.app
Authorization: Bearer API Key
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "time": 2,
  "unit": "h"
}
{
  "ok": true,
  "standingAccessDuration": {
    "time": 2,
    "unit": "h",
    "value": "2 hours"
  }
}

Set custom maximum access duration

put
Authorizations
Body
timenumberRequired
unitstring Β· enumRequiredPossible values:
Responses
200
Max access configured
application/json
400
Bad request
401
Unauthorized
put
PUT /o/demo-org/settings/max-access-duration HTTP/1.1
Host: api.p0.app
Authorization: Bearer API Key
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "time": 2,
  "unit": "h"
}
{
  "ok": true,
  "maxAccessDuration": {
    "time": 2,
    "unit": "h",
    "value": "2 hours"
  }
}