Styra Data API
The Data API from Styra — 1 operation(s) for data.
The Data API from Styra — 1 operation(s) for data.
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/styra-data-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. 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: Enterprise OPA REST Batch Data API
version: 0.2.0
contact:
name: Styra
url: https://github.com/StyraInc/enterprise-opa
servers:
- url: http://localhost:8181
description: Local development server
security:
- {}
- bearerAuth: []
tags:
- name: Data
paths:
/v1/data/{path}:
get:
parameters:
- $ref: '#/components/parameters/policyPath'
- $ref: '#/components/parameters/GzipAcceptEncoding'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/provenance'
- $ref: '#/components/parameters/explain'
- $ref: '#/components/parameters/metrics'
- $ref: '#/components/parameters/instrument'
- $ref: '#/components/parameters/strict-builtin-errors'
summary: Execute a policy
operationId: executePolicy
responses:
'200':
$ref: '#/components/responses/SuccessfulPolicyEvaluation'
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/ServerError'
tags:
- Data
post:
parameters:
- $ref: '#/components/parameters/policyPath'
- $ref: '#/components/parameters/GzipContentEncoding'
- $ref: '#/components/parameters/GzipAcceptEncoding'
- $ref: '#/components/parameters/pretty'
- $ref: '#/components/parameters/provenance'
- $ref: '#/components/parameters/explain'
- $ref: '#/components/parameters/metrics'
- $ref: '#/components/parameters/instrument'
- $ref: '#/components/parameters/strict-builtin-errors'
summary: Execute a policy given an input
operationId: executePolicyWithInput
x-speakeasy-usage-example: true
requestBody:
description: The input document
required: true
content:
application/json:
schema:
type: object
required:
- input
properties:
input:
$ref: '#/components/schemas/input'
responses:
'200':
$ref: '#/components/responses/SuccessfulPolicyEvaluation'
'400':
$ref: '#/components/responses/BadRequest'
'500':
$ref: '#/components/responses/ServerError'
tags:
- Data
components:
parameters:
strict-builtin-errors:
name: strict-builtin-errors
description: Treat built-in function call errors as fatal and return an error immediately.
in: query
schema:
type: boolean
metrics:
name: metrics
description: Return query performance metrics in addition to result.
in: query
schema:
type: boolean
GzipAcceptEncoding:
name: Accept-Encoding
description: Indicates the server should respond with a gzip encoded body. The server will send the compressed response only if its length is above `server.encoding.gzip.min_length` value. See the configuration section
in: header
schema:
type: string
enum:
- gzip
instrument:
name: instrument
description: Instrument query evaluation and return a superset of performance metrics in addition to result.
in: query
schema:
type: boolean
policyPath:
name: path
in: path
description: The path separator is used to access values inside object and array documents. If the path indexes into an array, the server will attempt to convert the array index to an integer. If the path element cannot be converted to an integer, the server will respond with 404.
required: true
schema:
type: string
default: ''
format: urlPath
example: app/rbac
explain:
name: explain
description: Return query explanation in addition to result.
in: query
schema:
type: string
enum:
- notes
- fails
- full
- debug
pretty:
name: pretty
description: If parameter is `true`, response will formatted for humans.
in: query
schema:
type: boolean
provenance:
name: provenance
description: If parameter is true, response will include build/version info in addition to the result.
in: query
schema:
type: boolean
GzipContentEncoding:
name: Content-Encoding
description: Indicates that the request body is gzip encoded
in: header
schema:
type: string
enum:
- gzip
responses:
SuccessfulPolicyEvaluation:
description: 'Success.
The server also returns 200 if the path refers to an undefined document. In this case, the response will not contain a result property.
'
headers:
Content-Encoding:
$ref: '#/components/headers/GzipContentEncoding'
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessfulPolicyResponse'
ServerError:
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ServerError'
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ClientError'
schemas:
ClientError:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
errors:
type: array
items:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
location:
type: object
required:
- file
- row
- col
properties:
file:
type: string
row:
type: integer
col:
type: integer
provenance:
type: object
description: Provenance information can be requested on individual API calls and are returned inline with the API response. To obtain provenance information on an API call, specify the `provenance=true` query parameter when executing the API call.
properties:
version:
type: string
build_commit:
type: string
build_timestamp:
type: string
format: date-time
build_host:
type: string
bundles:
type: object
additionalProperties:
type: object
title: Revision
required:
- revision
properties:
revision:
type: string
input:
description: Arbitrary JSON used within your policies by accessing `input`
oneOf:
- type: boolean
- type: string
- type: number
- type: array
items: {}
- type: object
additionalProperties: true
example:
user: alice
action: read
object: id123
type: dog
ServerError:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
errors:
type: array
items:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
location:
type: object
required:
- file
- row
- col
properties:
file:
type: string
row:
type: integer
col:
type: integer
decision_id:
type: string
example: b84cf736-213c-4932-a8e4-bb5c648f1b4d
result:
description: The base or virtual document referred to by the URL path. If the path is undefined, this key will be omitted.
oneOf:
- type: boolean
- type: string
- type: number
- type: array
items: {}
- type: object
additionalProperties: true
example:
allow: true
user_is_admin: true
user_is_granted: []
SuccessfulPolicyResponse:
type: object
properties:
result:
$ref: '#/components/schemas/result'
metrics:
type: object
description: If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
additionalProperties: true
decision_id:
type: string
description: If decision logging is enabled, this field contains a string that uniquely identifies the decision. The identifier will be included in the decision log event for this decision. Callers can use the identifier for correlation purposes.
provenance:
$ref: '#/components/schemas/provenance'
headers:
GzipContentEncoding:
description: Indicates that the response body is gzip encoded
schema:
type: string
enum:
- gzip
securitySchemes:
bearerAuth:
type: http
scheme: bearer
externalDocs:
description: Enterprise OPA documentation
url: https://docs.styra.com/enterprise-opa
x-openpolicyagent-documentation-url: https://www.openpolicyagent.org/docs/latest/