{"note":"OpenAPI conversion -- returning structured metadata","name":"openpolicy-local","description":"Open Policy Agent (OPA) REST API","version":"0.28.0","base_url":"","endpoints":16,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Open Policy Agent (OPA) REST API\n@version 0.28.0\n@endpoints 16\n@toc policies(4), data(6), root(1), query(2), compile(1), health(1), config(1)\n\n@group policies\n@endpoint GET /v1/policies\n@desc List policies\n@optional {pretty: bool # If true, response will be in a human-readable format.}\n@returns(200) {result: [any]} # Success\n@errors {500: Server error}\n\n@endpoint GET /v1/policies/{id}\n@desc Get a policy module\n@optional {pretty: bool # If true, response will be in a human-readable format.}\n@returns(200) {result: [any]} # Success\n@errors {404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endpoint PUT /v1/policies/{id}\n@desc Create or update a policy module\n@optional {pretty: bool # If true, response will be in a human-readable format., metrics: bool # If true, compiler performance metrics will be returned in the response.}\n@returns(200) {result: [any]} # Success\n@errors {400: Bad request, 500: Server error}\n\n@endpoint DELETE /v1/policies/{id}\n@desc Delete a policy module\n@optional {pretty: bool # If true, response will be in a human-readable format.}\n@returns(200) Success\n@errors {400: Bad request, 404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endgroup\n\n@group data\n@endpoint GET /v1/data/{path}\n@desc Get a document\n@optional {input: map # Provide the text for an [input document](https://www.openpolicyagent.org/docs/latest/kubernetes-primer/#input-document) in JSON format, pretty: bool # If true, response will be in a human-readable format., provenance: bool # If true, response will include build and version information in addition to the result., explain: str # If set to *full*, response will include query explanations in addition to the result., metrics: bool # If true, compiler performance metrics will be returned in the response., instrument: bool # If true, response will return additional performance metrics in addition to the result and the standard metrics.  **Caution:** This can add significant overhead to query evaluation. The recommendation is to only use this parameter if you are debugging a performance problem.}\n@returns(200) Success\n@errors {400: Bad request, 500: Server error}\n\n@endpoint PUT /v1/data/{path}\n@desc Create or overwrite a document\n@optional {If-None-Match: str # The server will respect the If-None-Match header if it is set to * (in other words, it will not overwrite an existing document located at the specified `path`).}\n@returns(204) Success\n@errors {304: Document was not modified, 400: Bad request, 404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endpoint PATCH /v1/data/{path}\n@desc Update a document\n@returns(204) Success\n@errors {400: Bad request, 404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endpoint DELETE /v1/data/{path}\n@desc Delete a document\n@returns(204) Success\n@errors {404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endpoint POST /v1/data/{path}\n@desc Get a document (with input)\n@optional {pretty: bool # If true, response will be in a human-readable format., provenance: bool # If true, response will include build and version information in addition to the result., explain: str # If set to *full*, response will include query explanations in addition to the result., metrics: bool # If true, compiler performance metrics will be returned in the response., instrument: bool # If true, response will return additional performance metrics in addition to the result and the standard metrics.  **Caution:** This can add significant overhead to query evaluation. The recommendation is to only use this parameter if you are debugging a performance problem.}\n@returns(200) Success\n@errors {400: Bad request, 500: Server error}\n\n@endpoint POST /v0/data/{path}\n@desc Get a document (with webhook)\n@optional {pretty: bool # If true, response will be in a human-readable format.}\n@returns(200) Success\n@errors {400: Bad request, 404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endgroup\n\n@group root\n@endpoint POST /\n@desc Execute a simple query\n@optional {pretty: bool # If true, response will be in a human-readable format.}\n@returns(200) Success\n@errors {400: Bad request, 404: Not found (for example, a requested policy module or document does not exist), 500: Server error}\n\n@endgroup\n\n@group query\n@endpoint GET /v1/query\n@desc Execute an ad-hoc query (simple)\n@required {q: str # The [URL-encoded](https://www.w3schools.com/tags/ref_urlencode.ASP) ad-hoc query to execute.}\n@optional {pretty: bool # If true, response will be in a human-readable format., explain: str # If set to *full*, response will include query explanations in addition to the result., metrics: bool # If true, compiler performance metrics will be returned in the response.}\n@returns(200) Success\n@errors {400: Bad request, 500: Server error}\n\n@endpoint POST /v1/query\n@desc Execute an ad-hoc query (complex)\n@optional {pretty: bool # If true, response will be in a human-readable format., explain: str # If set to *full*, response will include query explanations in addition to the result., metrics: bool # If true, compiler performance metrics will be returned in the response.}\n@returns(200) Success\n@errors {400: Bad request, 500: Server error, 501: Streaming not implemented}\n\n@endgroup\n\n@group compile\n@endpoint POST /v1/compile\n@desc Compile\n@optional {pretty: bool # If true, response will be in a human-readable format., explain: str # If set to *full*, response will include query explanations in addition to the result., metrics: bool # If true, compiler performance metrics will be returned in the response., instrument: bool # If true, response will return additional performance metrics in addition to the result and the standard metrics.  **Caution:** This can add significant overhead to query evaluation. The recommendation is to only use this parameter if you are debugging a performance problem.}\n@returns(200) Success\n@errors {400: Bad request, 500: Server error}\n\n@endgroup\n\n@group health\n@endpoint GET /health\n@desc Health\n@optional {bundles: bool # Reports on bundle activation status (useful for 'ready' checks at startup).  This includes any discovery bundles or bundles defined in the loaded discovery configuration., plugins: bool # Reports on plugin status, exclude-plugin: [str]= # String parameter to exclude a plugin from status checks. Can be added multiple times. Does nothing if plugins is not true. This parameter is useful for special use cases where a plugin depends on the server being fully initialized before it can fully initialize itself.}\n@returns(200) OPA service is healthy\n@errors {500: OPA service is not healthy}\n\n@endgroup\n\n@group config\n@endpoint GET /v1/config\n@desc Get configurations\n@optional {pretty: bool # If true, response will be in a human-readable format.}\n@returns(200) {result: map{services: map{acmecorp: map{url: str}}, labels: map{id: str, version: str}, keys: map{global-key: map{scope: str}}, decision_logs: map{service: str}, status: map{service: str}, bundles: map{authz: map{service: str}}, default_authorization_decision: str, default_decision: str}} # Success\n@errors {500: Server error}\n\n@endgroup\n\n@end\n"}