List Rule Sets
Lists rule sets owned by a project. Use this endpoint to render rule management screens, find draft and published versions, or choose rule IDs for testing and ingestion.
Endpoints
Section titled “Endpoints”GET /v1/projects/:project_id/extractor-rule-setsGET /v1/projects/:project_id/pricing-rule-setsAuthentication
Section titled “Authentication”Authorization: Bearer <api-key>Requires rules read access.
Path Parameters
Section titled “Path Parameters”| Field | Required | Description |
|---|---|---|
project_id |
Yes | Project that owns the rule sets. |
List Extractor Rule Sets
Section titled “List Extractor Rule Sets”curl 'http://127.0.0.1:8080/v1/projects/proj_gateway/extractor-rule-sets' \ -H 'Authorization: Bearer <api-key>'Response
Section titled “Response”{ "rule_sets": [ { "id": "ers_openai", "tenant_id": "t_001", "project_id": "proj_gateway", "name": "OpenAI extractor", "version": 1, "status": "published", "effective_from": 1781222400, "subject": { "default_type": "user", "type_path": "$.meta.subject_type", "id_path": "$.meta.user_id", "required": true }, "dimensions": [ {"name": "provider", "path": "$.provider", "type": "string", "required": true}, {"name": "model", "path": "$.usage.model", "type": "string", "required": true} ], "charge_item_extractors": [ { "name": "input tokens", "metric": "input_tokens", "path": "$.usage.prompt_tokens", "type": "number", "unit": "token" } ], "created_at": 1781222400 } ]}List Pricing Rule Sets
Section titled “List Pricing Rule Sets”curl 'http://127.0.0.1:8080/v1/projects/proj_gateway/pricing-rule-sets' \ -H 'Authorization: Bearer <api-key>'Response
Section titled “Response”{ "rule_sets": [ { "id": "prs_openai_fallback", "tenant_id": "t_001", "project_id": "proj_gateway", "extractor_rule_set_id": "ers_openai", "name": "OpenAI fallback pricing", "version": 1, "status": "draft", "currency": "USD", "effective_from": 1781222400, "rules": [ { "name": "Input tokens", "priority": 10, "metric": "input_tokens", "match_expr": "dimensions[\"model\"] == \"gpt-4.1-mini\"", "amount_expr": "dec_mul(dec(item[\"quantity\"]), dec(item[\"unit_price\"]))", "unit_price_expr": "dec(\"0.0000002\")" } ], "created_at": 1781222400 } ]}- Rule sets are project-scoped in the recommended API shape.
statuscan bedraft,published, orarchived.