openapi: 3.1.0
info:
title: Permit.io Access Requests (EAP) Access Requests (EAP) Access Requests (EAP) API
description: '
Authorization as a service
'
version: 2.0.0
tags:
- name: Access Requests (EAP)
description: None
paths:
/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}:
get:
tags:
- Access Requests (EAP)
summary: List Access Requests
operationId: list_access_requests
parameters:
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: Optional status filter, will only return access requests with this status.
required: false
schema:
allOf:
- $ref: '#/components/schemas/RequestStatus'
description: Optional status filter, will only return access requests with this status.
name: status
in: query
- description: Optional role filter, will only return access request granted with that role.
required: false
schema:
type: string
title: Role
description: Optional role filter, will only return access request granted with that role.
name: role
in: query
- description: Optional resource filter, will only return access request granted in that resource.
required: false
schema:
type: string
title: Resource
description: Optional resource filter, will only return access request granted in that resource.
name: resource
in: query
- description: Page number of the results to fetch, starting at 1.
required: false
schema:
type: integer
minimum: 1.0
title: Page
description: Page number of the results to fetch, starting at 1.
default: 1
name: page
in: query
- description: The number of results per page (max 100).
required: false
schema:
type: integer
maximum: 100.0
minimum: 1.0
title: Per Page
description: The number of results per page (max 100).
default: 30
name: per_page
in: query
- description: For ReBAC Elements, the resource instance ID or key to work on
required: false
schema:
type: string
title: Resource Instance Id
description: For ReBAC Elements, the resource instance ID or key to work on
name: resource_instance_id
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResult_AccessRequestRead_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
post:
tags:
- Access Requests (EAP)
summary: Create Access Request
operationId: create_access_request
parameters:
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestUserCreate'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}:
get:
tags:
- Access Requests (EAP)
summary: Get Access Request
operationId: get_access_request
parameters:
- description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
required: true
schema:
type: string
title: Access Request Id
description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
example: 42f0e113-219b-4bb9-ba90-c2c904761be1
name: access_request_id
in: path
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
? /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/reviewer
: patch:
tags:
- Access Requests (EAP)
summary: Update Access Request Reviewer
operationId: update_access_request_reviewer
parameters:
- description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
required: true
schema:
type: string
title: Access Request Id
description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
example: 42f0e113-219b-4bb9-ba90-c2c904761be1
name: access_request_id
in: path
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestReview'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
? /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/approve
: put:
tags:
- Access Requests (EAP)
summary: Approve Access Request
operationId: approve_access_request
parameters:
- description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
required: true
schema:
type: string
format: uuid
title: Access Request Id
description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
example: 42f0e113-219b-4bb9-ba90-c2c904761be1
name: access_request_id
in: path
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestReview'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestApproved'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
? /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/deny
: put:
tags:
- Access Requests (EAP)
summary: Deny Access Request
operationId: deny_access_request
parameters:
- description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
required: true
schema:
type: string
title: Access Request Id
description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
example: 42f0e113-219b-4bb9-ba90-c2c904761be1
name: access_request_id
in: path
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestReviewDeny'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestDenied'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
? /v2/facts/{proj_id}/{env_id}/access_requests/{elements_config_id}/user/{user_id}/tenant/{tenant_id}/{access_request_id}/cancel
: put:
tags:
- Access Requests (EAP)
summary: Cancel Access Request
operationId: cancel_access_request
parameters:
- description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
required: true
schema:
type: string
title: Access Request Id
description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
example: 42f0e113-219b-4bb9-ba90-c2c904761be1
name: access_request_id
in: path
- description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
required: true
schema:
type: string
title: Tenant Id
description: 'Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the "slug").'
example: my_tenant
name: tenant_id
in: path
- description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
required: true
schema:
type: string
title: User Id
description: 'Either the unique id of the user, or the URL-friendly key of the user (i.e: the "slug").'
example: my_user
name: user_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestCanceled'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests:
get:
tags:
- Access Requests (EAP)
summary: List Access Requests
operationId: list_access_requests_v2_elements__proj_id___env_id__config__elements_config_id__access_requests_get
parameters:
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
- description: Optional status filter, will only return access requests with this status.
required: false
schema:
allOf:
- $ref: '#/components/schemas/RequestStatus'
description: Optional status filter, will only return access requests with this status.
name: status
in: query
- description: Optional tenant filter, will only return access request granted in that tenant.
required: false
schema:
type: string
title: Tenant
description: Optional tenant filter, will only return access request granted in that tenant.
name: tenant
in: query
- description: Optional role filter, will only return access request granted with that role.
required: false
schema:
type: string
title: Role
description: Optional role filter, will only return access request granted with that role.
name: role
in: query
- description: Optional resource filter, will only return access request granted in that resource.
required: false
schema:
type: string
title: Resource
description: Optional resource filter, will only return access request granted in that resource.
name: resource
in: query
- description: Page number of the results to fetch, starting at 1.
required: false
schema:
type: integer
minimum: 1.0
title: Page
description: Page number of the results to fetch, starting at 1.
default: 1
name: page
in: query
- description: The number of results per page (max 100).
required: false
schema:
type: integer
maximum: 100.0
minimum: 1.0
title: Per Page
description: The number of results per page (max 100).
default: 30
name: per_page
in: query
- description: For ReBAC Elements, the resource instance ID or key to work on
required: false
schema:
type: string
title: Resource Instance Id
description: For ReBAC Elements, the resource instance ID or key to work on
name: resource_instance_id
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResult_AccessRequestRead_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
post:
tags:
- Access Requests (EAP)
summary: Create Access Request
operationId: create_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests_post
parameters:
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
name: env_id
in: path
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestUserCreate'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AccessRequestRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/access_requests/{access_request_id}:
get:
tags:
- Access Requests (EAP)
summary: Get Access Request
operationId: get_access_request_v2_elements__proj_id___env_id__config__elements_config_id__access_requests__access_request_id__get
parameters:
- description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
required: true
schema:
type: string
title: Elements Config Id
description: 'Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the "slug").'
example: my_elements_config
name: elements_config_id
in: path
- description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
required: true
schema:
type: string
title: Access Request Id
description: 'Either the unique id of the access_request, or the URL-friendly key of the access_request (i.e: the "slug").'
example: 42f0e113-219b-4bb9-ba90-c2c904761be1
name: access_request_id
in: path
- description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
required: true
schema:
type: string
title: Proj Id
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
example: my_project
name: proj_id
in: path
- description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
required: true
schema:
type: string
title: Env Id
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
example: my_environment
# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/permit-io/refs/heads/main/openapi/permit-io-access-requests-eap-api-openapi.yml