Contents
Create Rule
Method
POST
Syntax
/grs/v1/tenant/{tenantId}/package/{packageId}/rule
Request Body
{
"ruleType":"DECISION_TABLE",
"name":"My New Rule",
"description":"My Description",
"phase":"My Phase",
"splitTest": "A"
"calendarId":"Calendar_117",
"nodeId":"pkg",
"dateEffective":234324234334,
"dateExpired":32434323434
}
Response Body
{
"ruleId":"f22d35f6-e31e-41f2-8e62-97864c47579a",
"extRuleId":"DT-163",
"ruleType":"DECISION_TABLE",
"name":"My New Rule",
"description":"My Description",
"phase":"My Phase",
"splitTest": "A"
"calendarId":"Calendar_117",
"nodeId":"pkg",
"dateEffective":234324234334,
"dateExpired":32434323434
}
HTTP Status Codes
- 201 Created—Response body provided
- 401 - Unauthorized—APIToken not valid
- 403 - Forbidden—User does not have permission for the specified tenant ID, or does not have proper permission to perform this operation.
- 422 - Unprocessable Entity—Field Validation Error
{
"message": "Validation Failed",
"errors": [
{
"code" : "1000",
"field" : "ruleType",
"message": "ruleType must be either DECISION_TABLE or LINEAR"
},
{
"code" : "1001",
"field" : "phase",
"message": "phase is not valid"
},
{
"code" : "1002",
"field" : "calendarId",
"message": "calendarId is not valid"
},
{
"code" : "1003",
"field" : "nodeId",
"message": "nodeId is not valid. Must be either pkg or a
node ID that is valid for this user"
},
{
"code" : "1004",
"field" : "date",
"message": "dateExpired is before dateEffective"
}
{
"code" : "1005",
"field" : "splitTest",
"message": "splitTest is not valid"
}
]
}
* 503—Service Unavailable
Notes
User must have RULE_CREATE and RULE_VIEW permission
- ruleType—DECISION_TABLE or LINEAR
- nodeId—Specify the node ID where the rule should be created. This is returned in Query Business Hierarchy. If the rule should be created at the package level, set this field to pkg. If the rule should be created in the Split Test Configuration section, specify splittest.
- dateEffective—null or timestamp (ms since EPOCH)
- dateExpired—null or timestamp (ms since EPOCH)
This page was last edited on May 16, 2017, at 08:20.
Comments or questions about this documentation? Contact us for support!