SmartGare
API referenceEndpoints

Add a test case to a rule

Keeps a situation, by context key, with the content values the rule must answer for it. **Required permission:** `referential.rule:write`

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

Keeps a situation, by context key, with the content values the rule must answer for it.

Required permission: referential.rule:write

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*RuleTestRequest

Response Body

*/*

curl -X POST "https://example.com/referential/v1/rules/{ruleId}/tests" \  -H "Content-Type: application/json" \  -d '{}'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "expected": {},  "id": "string",  "label": "string",  "rule_id": "string",  "situation": {    "property1": "string",    "property2": "string"  },  "updated_at": "2019-08-24T14:15:22Z",  "updated_by": "string"}