SmartGare
API referenceEndpoints

Withdraw a scheduled or active rule version

Refused with 409 referential.mandatory_policy_gap_unconfirmed when it would leave a mandatory rule with no version in force and nothing scheduled, unless confirm_gap is true; a confirmed gap is announced as referential.mandatory_policy_gap_opened. **Required permission:** `referential.rule:write`

POST/referential/v1/rule-versions/{versionId}/deactivate

Refused with 409 referential.mandatory_policy_gap_unconfirmed when it would leave a mandatory rule with no version in force and nothing scheduled, unless confirm_gap is true; a confirmed gap is announced as referential.mandatory_policy_gap_opened.

Required permission: referential.rule:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*RuleVersionWithdrawalRequest

Response Body

*/*

curl -X POST "https://example.com/referential/v1/rule-versions/{versionId}/deactivate" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "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}