QuilrQL lifecycle
QuilrQL governs policy at the tenant level. Keep source authoring, draft storage and runtime publication as separate operations. These management endpoints preserve the gateway policy engine's authority boundaries.
The publication workflow
Source and input boundaries
source is QuilrQL text. The request schema accepts at most 400,000 characters and the service must additionally enforce 400,000 UTF-8 bytes. The authoring schema supplies valid fields, effects, stages, value sources and conditional shapes. Tenant catalogs supply valid app/provider/group/definition references.
Simulation accepts 1-100 synthetic cases. The case input includes an app name, direction, user/group identity, model/provider, method type, detected data types and scalar metadata. It performs policy evaluation; it does not invoke a model or read production request logs.
For policy language and supported controls, see LLM Gateway policies and authoring and publishing. Source strings shown as <source ...> in reference examples are placeholders: use source returned by preview, a saved revision, a suggested policy or the editor.
Concurrency and activation
- Draft replacement and publication require the draft ETag in
If-Match. - Publication also provides
expected_active_revision, including explicitnullbefore the first revision. This protects against a competing publication. - Authority enable/disable and policy rollback require the authority ETag from status.
- Enable references the reviewed conversion-preview checksum. A changed live snapshot requires a fresh preview.
- Rollback republishes eligible historical source as a new revision after validating current references. It does not erase history.
What happens to app settings
While authority is enabled, governed app settings may still save but are inactive during healthy policy evaluation. Disabling authority makes saved values live again. A healthy no-match policy result is neutral; new apps do not automatically receive matching rules.
Provider secrets/availability and prompt contents remain live dependencies. Whole-app disable remains effective independently of policy. App configuration history is distinct from policy revision history.
Historical production replay, usage reporting and per-policy traffic reporting are outside the management v1 scope. Existing groups and custom definitions can be referenced; this API cannot modify their content or membership.
Endpoint reference
/policy/statusRead policy authority
Read tenant policy discovery data. Use the returned schema/catalog rather than hardcoding selectors or effect values.
readNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/status' \
--header 'Authorization: Bearer <management-key>'
/policy/metadataRead policy metadata
Read tenant policy discovery data. Use the returned schema/catalog rather than hardcoding selectors or effect values.
readNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/metadata' \
--header 'Authorization: Bearer <management-key>'
/policy/authoring-schemaRead policy authoring schema
Read tenant policy discovery data. Use the returned schema/catalog rather than hardcoding selectors or effect values.
readNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/authoring-schema' \
--header 'Authorization: Bearer <management-key>'
/policy/authoring-catalogRead policy authoring catalog
Read tenant policy discovery data. Use the returned schema/catalog rather than hardcoding selectors or effect values.
readNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/authoring-catalog' \
--header 'Authorization: Bearer <management-key>'
/policy/suggested-policiesRead suggested policies
Read tenant policy discovery data. Use the returned schema/catalog rather than hardcoding selectors or effect values.
readNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/suggested-policies' \
--header 'Authorization: Bearer <management-key>'
/policy/authoring-catalog/searchSearch policy values
Search one value-source kind advertised by the authoring schema. parent is required only when the selected field has a parent_field.
readPath, query & header parameters 5
limit (query)integeroptionalItems per page.
cursor (query)stringoptionalOpaque cursor returned by this same collection and filters.
kind (query)stringrequiredA supported autofill kind from authoring-schema.
q (query)stringoptionalSearch string.
parent (query)stringoptionalParent selector, when required by schema.
No request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/authoring-catalog/search?limit=50&kind=applications' \
--header 'Authorization: Bearer <management-key>'
/policy/conversion-previewPreview policy conversion
Read current app settings and return a credential-free proposed policy plus review evidence. Does not activate authority.
readNo request body.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/conversion-preview' \
--header 'Authorization: Bearer <management-key>'
/policy/validateValidate policy source
Compile source and validate tenant references without publishing or invoking a model. Semantic validation can return valid false with diagnostics.
readFull request body specification application/json
sourcestringrequiredQuilrQL source. Also enforce the server byte limit of 400,000 UTF-8 bytes.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/validate' \
--header 'Authorization: Bearer <management-key>' \
--header 'Content-Type: application/json' \
--data '{
"source": "<source from conversion-preview or the policy editor>"
}'
/policy/simulateSimulate policy source
Evaluate up to 100 synthetic cases. This is policy evaluation, not a model call or replay of production logs.
readFull request body specification application/json
sourcestringrequiredQuilrQL source. Also enforce the server byte limit of 400,000 UTF-8 bytes.
casesarray<object>requiredArray item specification
app_namestringrequiredTrimmed display name. App lookup is case-insensitive within the authenticated tenant. Ambiguous legacy names return 409.
stagestringoptional"request""response"user_emailstringoptionalsmart_groupsarray<string>optionalArray item specification
stringmodelstringoptionalExact configured model identifier; availability depends on the provider and deployment.
provider_labelstringoptionalExact, trimmed tenant-wide provider label. Immutable after creation.
method_typestringoptional"chat""responses""assistants""embeddings""rerank""tts""stt""bedrock""vertex""sdk_check"data_typesarray<string>optionalArray item specification
stringExisting catalog selector.
metadatamap<string, string | number | integer | boolean | null>optionalSynthetic request metadata. No recorded traffic is read.
Map value specification
string | number | integer | boolean | nullUnknown fields are rejected in this object.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/simulate' \
--header 'Authorization: Bearer <management-key>' \
--header 'Content-Type: application/json' \
--data '{
"source": "<source from the policy editor>",
"cases": [
{
"app_name": "Support Bot",
"stage": "request",
"user_email": "developer@example.com",
"model": "gpt-4.1-mini",
"data_types": [
"Email Address"
]
}
]
}'
/policy/draftsList policy drafts
List draft metadata. Drafts do not govern runtime traffic.
readPath, query & header parameters 2
limit (query)integeroptionalItems per page.
cursor (query)stringoptionalOpaque cursor returned by this same collection and filters.
No request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/drafts?limit=50' \
--header 'Authorization: Bearer <management-key>'
/policy/draftsCreate a policy draft
Save source as a draft. Validation/publication is explicit.
policy:writePath, query & header parameters 1
Idempotency-Key (header)stringrequiredUnique operation key. Reuse only with the identical request; mismatch returns 409.
Full request body specification application/json
namestringoptionalsourcestringrequiredQuilrQL source. Also enforce the server byte limit of 400,000 UTF-8 bytes.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/drafts' \
--header 'Authorization: Bearer <management-key>' \
--header 'Idempotency-Key: operation-001' \
--header 'Content-Type: application/json' \
--data '{
"name": "Support guardrails",
"source": "<source from conversion-preview or the policy editor>"
}'
/policy/drafts/{draft_id}Read a policy draft
Read source and current draft revision.
readPath, query & header parameters 1
draft_id (path)stringrequiredNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/drafts/draft_example' \
--header 'Authorization: Bearer <management-key>'
/policy/drafts/{draft_id}Replace a policy draft
Replace draft name/source using its current ETag. Does not publish.
policy:writePath, query & header parameters 2
draft_id (path)stringrequiredIf-Match (header)stringrequiredExact quoted ETag from a current resource read.
Full request body specification application/json
namestringoptionalsourcestringrequiredQuilrQL source. Also enforce the server byte limit of 400,000 UTF-8 bytes.
Unknown fields are rejected in this object.
curl --request PUT \
'https://management.example.com/llmgateway/management/v1/policy/drafts/draft_example' \
--header 'Authorization: Bearer <management-key>' \
--header 'If-Match: "resource-version"' \
--header 'Content-Type: application/json' \
--data '{
"name": "Support guardrails",
"source": "<updated QuilrQL source>"
}'
/policy/drafts/{draft_id}/publishPublish a policy draft
Validate the selected draft and publish an immutable tenant-wide revision. If-Match refers to the draft; expected_active_revision protects against another publication.
policy:publishPath, query & header parameters 3
draft_id (path)stringrequiredIf-Match (header)stringrequiredExact quoted ETag from a current resource read.
Idempotency-Key (header)stringrequiredUnique operation key. Reuse only with the identical request; mismatch returns 409.
Full request body specification application/json
messagestringoptionalOptional audit note.
expected_active_revisioninteger | nullrequiredActive revision observed during review, or null before the first publication.
Variant 1 integer
integerActive revision observed during review, or null before the first publication.
Also accepts null.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/drafts/draft_example/publish' \
--header 'Authorization: Bearer <management-key>' \
--header 'If-Match: "resource-version"' \
--header 'Idempotency-Key: operation-001' \
--header 'Content-Type: application/json' \
--data '{
"message": "Deploy reviewed support rules",
"expected_active_revision": 12
}'
/policy/revisionsList policy revisions
List immutable policy history; separate from app configuration versions.
readPath, query & header parameters 2
limit (query)integeroptionalItems per page.
cursor (query)stringoptionalOpaque cursor returned by this same collection and filters.
No request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/revisions?limit=50' \
--header 'Authorization: Bearer <management-key>'
/policy/revisions/{revision}Read policy revision metadata
Read revision checksum, publication metadata and diagnostics.
readPath, query & header parameters 1
revision (path)integerrequiredNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/revisions/12' \
--header 'Authorization: Bearer <management-key>'
/policy/revisions/{revision}/sourceRead policy revision source
Return the stored source for one immutable revision.
readPath, query & header parameters 1
revision (path)integerrequiredNo request body.
curl --request GET \
'https://management.example.com/llmgateway/management/v1/policy/revisions/12/source' \
--header 'Authorization: Bearer <management-key>'
/policy/revisions/{revision}/rollbackRoll back policy authority
Validate the historical source against current catalogs and publish it as a new revision. If-Match is the authority ETag from policy/status.
policy:publishPath, query & header parameters 3
revision (path)integerrequiredIf-Match (header)stringrequiredExact quoted ETag from a current resource read.
Idempotency-Key (header)stringrequiredUnique operation key. Reuse only with the identical request; mismatch returns 409.
Full request body specification application/json
messagestringoptionalOptional audit reason.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/revisions/12/rollback' \
--header 'Authorization: Bearer <management-key>' \
--header 'If-Match: "resource-version"' \
--header 'Idempotency-Key: operation-001' \
--header 'Content-Type: application/json' \
--data '{
"message": "Restore the last reviewed policy"
}'
/policy/enableEnable policy authority
Activate the reviewed conversion snapshot. If-Match is the authority ETag; checksum must match a fresh conversion-preview. Existing app governed settings become dormant.
policy:publishPath, query & header parameters 2
If-Match (header)stringrequiredExact quoted ETag from a current resource read.
Idempotency-Key (header)stringrequiredUnique operation key. Reuse only with the identical request; mismatch returns 409.
Full request body specification application/json
Recheck the live configuration snapshot before activating. Reject a stale preview rather than enabling an unreviewed conversion.
conversion_checksumstringrequiredChecksum returned by a reviewed conversion-preview.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/enable' \
--header 'Authorization: Bearer <management-key>' \
--header 'If-Match: "resource-version"' \
--header 'Idempotency-Key: operation-001' \
--header 'Content-Type: application/json' \
--data '{
"conversion_checksum": "conversion_example"
}'
/policy/disableDisable policy authority
Disable tenant-wide QuilrQL authority. Stored app settings, including dormant edits, become live. Does not enable a disabled app or provider.
policy:publishPath, query & header parameters 2
If-Match (header)stringrequiredExact quoted ETag from a current resource read.
Idempotency-Key (header)stringrequiredUnique operation key. Reuse only with the identical request; mismatch returns 409.
Full request body specification application/json
messagestringoptionalOptional audit reason.
Unknown fields are rejected in this object.
curl --request POST \
'https://management.example.com/llmgateway/management/v1/policy/disable' \
--header 'Authorization: Bearer <management-key>' \
--header 'If-Match: "resource-version"' \
--header 'Idempotency-Key: operation-001' \
--header 'Content-Type: application/json' \
--data '{
"message": "Return authority to app settings"
}'