SmartGare
API referenceEndpoints

Approve and schedule a draft rule version

POST/rules/v1/rule-versions/{versionId}/activate
AuthorizationBearer <token>

In: header

Path Parameters

versionId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

*/*

curl -X POST "https://example.com/rules/v1/rule-versions/string/activate" \  -H "Content-Type: application/json" \  -d '{    "reason": "string"  }'
{  "id": "string",  "ruleId": "string",  "versionNumber": 0,  "schemaVersion": 0,  "state": "DRAFT",  "effectiveInput": {    "nodeType": "ARRAY",    "floatingPointNumber": true,    "string": true,    "integralNumber": true,    "missingNode": true,    "valueNode": true,    "container": true,    "pojo": true,    "short": true,    "int": true,    "long": true,    "double": true,    "bigDecimal": true,    "bigInteger": true,    "textual": true,    "boolean": true,    "binary": true,    "number": true,    "empty": true,    "array": true,    "null": true,    "object": true,    "float": true,    "embeddedValue": true  },  "effectiveAt": "2019-08-24T14:15:22Z",  "scope": {    "type": "STATION",    "subjects": {      "property1": "string",      "property2": "string"    }  },  "content": {    "nodeType": "ARRAY",    "floatingPointNumber": true,    "string": true,    "integralNumber": true,    "missingNode": true,    "valueNode": true,    "container": true,    "pojo": true,    "short": true,    "int": true,    "long": true,    "double": true,    "bigDecimal": true,    "bigInteger": true,    "textual": true,    "boolean": true,    "binary": true,    "number": true,    "empty": true,    "array": true,    "null": true,    "object": true,    "float": true,    "embeddedValue": true  },  "createdBy": "string",  "approvedBy": "string",  "approvedAt": "2019-08-24T14:15:22Z",  "activatedBy": "string",  "activatedAt": "2019-08-24T14:15:22Z",  "inactivatedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}