Permit.io Scope Configurations API
The Scope Configurations API from Permit.io, for scope configurations.
The Scope Configurations API from Permit.io, for scope configurations.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/permitio:permitio-scope-configurations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Permit.io Scope Configurations API
description: Authorization as a service
version: 2.0.0
tags:
- name: Scope Configurations
paths:
/v2/projects/{proj_id}/{env_id}/opal_scope:
get:
tags:
- Scope Configurations
summary: Get Scope Config
description: 'Returns the custom OPAL Scope config for given environment, if exists.
If not custom config is set, return 404.'
operationId: get_scope_config
security:
- HTTPBearer: []
parameters:
- name: proj_id
in: path
required: true
schema:
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
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: env_id
in: path
required: true
schema:
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
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
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ScopeConfigRead'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- Scope Configurations
summary: Set Scope Config
description: Set or update the custom OPAL Scope config for a given environment.
operationId: set_scope_config
security:
- HTTPBearer: []
parameters:
- name: proj_id
in: path
required: true
schema:
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
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: env_id
in: path
required: true
schema:
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
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
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ScopeConfigSet'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ScopeConfigRead'
'403':
description: 'Nothing is written. The caller may not change the environment''s OPAL scope config, or the environment is protected by a policy guard: then this route refuses every caller allowed to change it, with error code `POLICY_GUARD_PROTECTED`, until an organization admin removes its project from the policy guard scope (an organization with no scope clears the flag by creating one and deleting it). Every OPAL scope config write on a guarded environment, a data source credential rotation included, needs that'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Scope Configurations
summary: Reset Scope Config
description: Reset the custom OPAL Scope config for a given environment to the default.
operationId: reset_scope_config
security:
- HTTPBearer: []
parameters:
- name: proj_id
in: path
required: true
schema:
type: string
description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").'
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: env_id
in: path
required: true
schema:
type: string
description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
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
responses:
'204':
description: Successful Response
'403':
description: 'Nothing is written. The caller may not change the environment''s OPAL scope config, or the environment is protected by a policy guard: then this route refuses every caller allowed to change it, with error code `POLICY_GUARD_PROTECTED`, until an organization admin removes its project from the policy guard scope (an organization with no scope clears the flag by creating one and deleting it). Every OPAL scope config write on a guarded environment, a data source credential rotation included, needs that'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ScopeConfigSet:
properties:
data:
anyOf:
- $ref: '#/components/schemas/DataSourceConfig'
- type: 'null'
additionalProperties: false
type: object
title: ScopeConfigSet
ScopeConfigRead:
properties:
data:
anyOf:
- $ref: '#/components/schemas/DataSourceConfig'
- type: 'null'
id:
type: string
format: uuid
title: Id
description: Unique id of the ScopeConfig
organization_id:
type: string
format: uuid
title: Organization Id
description: Unique id of the organization that the ScopeConfig belongs to.
project_id:
type: string
format: uuid
title: Project Id
description: Unique id of the project that the ScopeConfig belongs to.
environment_id:
type: string
format: uuid
title: Environment Id
description: Unique id of the environment that the ScopeConfig belongs to.
created_at:
type: string
format: date-time
title: Created At
description: Date and time when the ScopeConfig was created (ISO_8601 format).
updated_at:
type: string
format: date-time
title: Updated At
description: Date and time when the ScopeConfig was last updated/modified (ISO_8601 format).
additionalProperties: false
type: object
required:
- id
- organization_id
- project_id
- environment_id
- created_at
- updated_at
title: ScopeConfigRead
DataSourceEntryWithPollingInterval:
properties:
url:
type: string
title: Url
description: Url source to query for data
config:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Config
description: Suggested fetcher configuration (e.g. auth or method) to fetch data with
topics:
items:
type: string
type: array
title: Topics
description: topics the data applies to
default:
- policy_data
dst_path:
type: string
title: Dst Path
description: OPA data api path to store the document at
default: ''
save_method:
type: string
title: Save Method
description: Method used to write into OPA - PUT/PATCH, when using the PATCH method the data field should conform to the JSON patch schema defined in RFC 6902(https://datatracker.ietf.org/doc/html/rfc6902#section-3)
default: PUT
data:
anyOf:
- items:
$ref: '#/components/schemas/JSONPatchAction'
type: array
- items: {}
type: array
- additionalProperties: true
type: object
- type: 'null'
title: Data
description: Data payload to embed within the data update (instead of having the client fetch it from the url).
periodic_update_interval:
anyOf:
- type: number
- type: 'null'
title: Periodic Update Interval
description: Polling interval to refresh data from data source
type: object
required:
- url
title: DataSourceEntryWithPollingInterval
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
DataSourceConfig:
properties:
entries:
items:
$ref: '#/components/schemas/DataSourceEntryWithPollingInterval'
type: array
title: Entries
description: list of data sources and how to fetch from them
default: []
type: object
title: DataSourceConfig
description: 'Static list of Data Source Entries returned to client.
Answers this question for the client: from where should i get the
full picture of data i need? (as opposed to incremental data
updates)'
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
JSONPatchAction:
properties:
op:
type: string
title: Op
description: patch action to perform
path:
type: string
title: Path
description: target location in modified json
value:
anyOf:
- {}
- type: 'null'
title: Value
description: json document, the operand of the action
from:
anyOf:
- type: string
- type: 'null'
title: From
description: source location in json
type: object
required:
- op
- path
title: JSONPatchAction
description: Abstract base class for JSON patch actions (RFC 6902)
securitySchemes:
HTTPBearer:
type: http
description: 'Authorization header, we support the bearer authentication scheme (see: RFC 6750)'
scheme: bearer
bearerFormat: JWT