SmartGare
API referenceEndpoints

Draft a new rule version

**Required permission:** `referential.rule:write`

POST/referential/v1/rules/{ruleId}/versions

Required permission: referential.rule:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*RuleVersionContentRequest

Response Body

*/*

curl -X POST "https://example.com/referential/v1/rules/{ruleId}/versions" \  -H "Content-Type: application/json" \  -d '{    "content": {},    "effective_input": {},    "reason": "string",    "scope": {      "subjects": {        "property1": "string",        "property2": "string"      },      "type": "station"    }  }'
{  "activated_at": "2019-08-24T14:15:22Z",  "activated_by": "string",  "approved_at": "2019-08-24T14:15:22Z",  "approved_by": "string",  "content": {},  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "effective_at": "2019-08-24T14:15:22Z",  "effective_input": {},  "id": "string",  "inactivated_at": "2019-08-24T14:15:22Z",  "rule_id": "string",  "schema_version": 0,  "scope": {    "subjects": {      "property1": "string",      "property2": "string"    },    "type": "station"  },  "state": "draft",  "updated_at": "2019-08-24T14:15:22Z",  "version_number": 0}