SmartGare
API referenceEndpoints

Preview a change set

Answers each of the rule's written situations twice, at the instant given (now by default, never in the past): by the rule in force and by the table the set would leave, side by side. Changes nothing. **Required permission:** `referential.rule:read`

POST/referential/v1/rules/{ruleId}/change-sets/{changeSetId}/preview

Answers each of the rule's written situations twice, at the instant given (now by default, never in the past): by the rule in force and by the table the set would leave, side by side. Changes nothing.

Required permission: referential.rule:read

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body?PreviewRuleChangeSetRequest

Response Body

*/*

curl -X POST "https://example.com/referential/v1/rules/{ruleId}/change-sets/{changeSetId}/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "approval_refusal": {    "code": "string",    "fixed_elements": [      "string"    ]  },  "at": "2019-08-24T14:15:22Z",  "change_set_id": "string",  "changed": 0,  "rule_id": "string",  "schedule_conflict": {    "code": "string",    "scheduled": [      {        "effective_at": "2019-08-24T14:15:22Z",        "scope": {          "subjects": {            "property1": "string",            "property2": "string"          },          "type": "station"        },        "version_id": "string",        "version_number": 0      }    ]  },  "situations": [    {      "changed": true,      "current": {        "beaten": [          {            "subjects": {              "property1": "string",              "property2": "string"            },            "type": "station"          }        ],        "content": {},        "outcome": "string",        "problems": [          "string"        ],        "scope": {          "subjects": {            "property1": "string",            "property2": "string"          },          "type": "station"        }      },      "label": "string",      "proposed": {        "beaten": [          {            "subjects": {              "property1": "string",              "property2": "string"            },            "type": "station"          }        ],        "content": {},        "outcome": "string",        "problems": [          "string"        ],        "scope": {          "subjects": {            "property1": "string",            "property2": "string"          },          "type": "station"        }      },      "situation": {        "property1": "string",        "property2": "string"      },      "test_id": "string"    }  ]}