Publish Rule Set
Publishes the current draft version of a reviewed rule set. Production ingestion requires a published extractor rule set. Fallback pricing only uses the current published pricing version after it is published or explicitly selected by an event.
Endpoints
Section titled “Endpoints”POST /v1/projects/:project_id/extractor-rule-sets/:id/publishPOST /v1/projects/:project_id/pricing-rule-sets/:id/publishAuthentication
Section titled “Authentication”Authorization: Bearer <api-key>Requires rules write access.
Path Parameters
Section titled “Path Parameters”| Field | Required | Description |
|---|---|---|
project_id |
Yes | Project that owns the rule set. |
id |
Yes | Rule set ID to publish. |
Request
Section titled “Request”The request body may be empty. To guard against publishing a stale draft, pass the draft version explicitly:
{ "version": 2}Only the current draft version can be published. Published history is read-only.
Publish Extractor Rule Set
Section titled “Publish Extractor Rule Set”curl 'http://127.0.0.1:8080/v1/projects/proj_gateway/extractor-rule-sets/ers_openai/publish' \ -X POST \ -H 'Authorization: Bearer <api-key>'The server compiles the extractor before publishing. Invalid JSON paths, invalid expressions, or template expansion errors return 400.
Publish Pricing Rule Set
Section titled “Publish Pricing Rule Set”curl 'http://127.0.0.1:8080/v1/projects/proj_gateway/pricing-rule-sets/prs_openai_fallback/publish' \ -X POST \ -H 'Authorization: Bearer <api-key>'The bound extractor rule set must already be published. The server compiles CEL pricing programs before publishing.
Response
Section titled “Response”{ "status": "published", "rule_set": { "id": "ers_openai", "version": 2, "status": "published" }}- The rule set ID stays the same after publishing a new version.
- Publish only after running Test Rules with representative raw events.
- Publishing a pricing rule set invalidates the runtime pricing binding cache for its extractor.