Open Policy Agent · Capability
Data API
Data API. 6 operations. Lead operation: Get a Document (Webhook). Self-contained Naftiko capability covering one Open Policy Agent business surface.
What You Can Do
POST
Post
— Get a Document (Webhook)
/v1/v0/data/{path}
GET
Get
— Get a Document
/v1/v1/data/{path}
POST
Post
— Get a Document (with Input)
/v1/v1/data/{path}
PUT
Put
— Create or Overwrite a Document
/v1/v1/data/{path}
PATCH
Patch
— Patch a Document
/v1/v1/data/{path}
DELETE
Delete
— Delete a Document
/v1/v1/data/{path}
MCP Tools
get-document-webhook
Get a Document (Webhook)
read-only
get-document
Get a Document
read-only
idempotent
get-document-input
Get a Document (with Input)
read-only
create-overwrite-document
Create or Overwrite a Document
idempotent
patch-document
Patch a Document
idempotent
delete-document
Delete a Document
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Data API
description: 'Data API. 6 operations. Lead operation: Get a Document (Webhook). Self-contained Naftiko capability covering
one Open Policy Agent business surface.'
tags:
- Open Policy Agent
- Data API
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
OPEN_POLICY_AGENT_API_KEY: OPEN_POLICY_AGENT_API_KEY
capability:
consumes:
- type: http
namespace: data
baseUri: ''
description: Data API business capability. Self-contained, no shared references.
resources:
- name: v0-data-path
path: /v0/data/{path}
operations:
- name: post
method: POST
description: Get a Document (Webhook)
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: path
in: path
type: string
description: Path to the document
required: true
- name: pretty
in: query
type: boolean
description: Format response for human readability
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: v1-data-path
path: /v1/data/{path}
operations:
- name: get
method: GET
description: Get a Document
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: path
in: path
type: string
description: Path to the document
required: true
- name: input
in: query
type: object
description: Input document in JSON format
- name: pretty
in: query
type: boolean
description: Format response for human readability
- name: provenance
in: query
type: boolean
description: Include build/version information
- name: explain
in: query
type: string
description: Return query explanation
- name: metrics
in: query
type: boolean
description: Return performance metrics
- name: instrument
in: query
type: boolean
description: Instrument query evaluation
- name: strict-builtin-errors
in: query
type: boolean
description: Treat built-in function call errors as fatal
- name: post
method: POST
description: Get a Document (with Input)
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: path
in: path
type: string
description: Path to the document
required: true
- name: pretty
in: query
type: boolean
description: Format response for human readability
- name: provenance
in: query
type: boolean
description: Include build/version information
- name: explain
in: query
type: string
description: Return query explanation
- name: metrics
in: query
type: boolean
description: Return performance metrics
- name: instrument
in: query
type: boolean
description: Instrument query evaluation
- name: strict-builtin-errors
in: query
type: boolean
description: Treat built-in function call errors as fatal
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: put
method: PUT
description: Create or Overwrite a Document
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: path
in: path
type: string
description: Path to the document
required: true
- name: metrics
in: query
type: boolean
description: Return performance metrics
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: patch
method: PATCH
description: Patch a Document
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: path
in: path
type: string
description: Path to the document
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: delete
method: DELETE
description: Delete a Document
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: path
in: path
type: string
description: Path to the document
required: true
- name: metrics
in: query
type: boolean
description: Return performance metrics
exposes:
- type: rest
namespace: data-rest
port: 8080
description: REST adapter for Data API. One Spectral-compliant resource per consumed operation, prefixed with /v1.
resources:
- path: /v1/v0/data/{path}
name: v0-data-path
description: REST surface for v0-data-path.
operations:
- method: POST
name: post
description: Get a Document (Webhook)
call: data.post
with:
path: rest.path
pretty: rest.pretty
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/v1/data/{path}
name: v1-data-path
description: REST surface for v1-data-path.
operations:
- method: GET
name: get
description: Get a Document
call: data.get
with:
path: rest.path
input: rest.input
pretty: rest.pretty
provenance: rest.provenance
explain: rest.explain
metrics: rest.metrics
instrument: rest.instrument
strict-builtin-errors: rest.strict-builtin-errors
outputParameters:
- type: object
mapping: $.
- method: POST
name: post
description: Get a Document (with Input)
call: data.post
with:
path: rest.path
pretty: rest.pretty
provenance: rest.provenance
explain: rest.explain
metrics: rest.metrics
instrument: rest.instrument
strict-builtin-errors: rest.strict-builtin-errors
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: PUT
name: put
description: Create or Overwrite a Document
call: data.put
with:
path: rest.path
metrics: rest.metrics
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: PATCH
name: patch
description: Patch a Document
call: data.patch
with:
path: rest.path
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: delete
description: Delete a Document
call: data.delete
with:
path: rest.path
metrics: rest.metrics
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: data-mcp
port: 9090
transport: http
description: MCP adapter for Data API. One tool per consumed operation, routed inline through this capability's consumes
block.
tools:
- name: get-document-webhook
description: Get a Document (Webhook)
hints:
readOnly: true
destructive: false
idempotent: false
call: data.post
with:
path: tools.path
pretty: tools.pretty
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: get-document
description: Get a Document
hints:
readOnly: true
destructive: false
idempotent: true
call: data.get
with:
path: tools.path
input: tools.input
pretty: tools.pretty
provenance: tools.provenance
explain: tools.explain
metrics: tools.metrics
instrument: tools.instrument
strict-builtin-errors: tools.strict-builtin-errors
outputParameters:
- type: object
mapping: $.
- name: get-document-input
description: Get a Document (with Input)
hints:
readOnly: true
destructive: false
idempotent: false
call: data.post
with:
path: tools.path
pretty: tools.pretty
provenance: tools.provenance
explain: tools.explain
metrics: tools.metrics
instrument: tools.instrument
strict-builtin-errors: tools.strict-builtin-errors
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: create-overwrite-document
description: Create or Overwrite a Document
hints:
readOnly: false
destructive: false
idempotent: true
call: data.put
with:
path: tools.path
metrics: tools.metrics
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: patch-document
description: Patch a Document
hints:
readOnly: false
destructive: false
idempotent: true
call: data.patch
with:
path: tools.path
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: delete-document
description: Delete a Document
hints:
readOnly: false
destructive: true
idempotent: true
call: data.delete
with:
path: tools.path
metrics: tools.metrics
outputParameters:
- type: object
mapping: $.