Entity Business Rules¶
/api/repositories/{repository}/entities/{entity}/businessrules
Parameter | Type | Purpose |
---|---|---|
repository | string | The name of the Repository to access |
entity | int | The ID of the Entity |
Show all¶
-
GET
/api/repositories/
(string: repository)/entities/
(int: entityID)/businessrules
¶ Get a list of business rules for the Entity
GET /api/repositories/jupiter/entities/1/businessrules HTTP/1.1
Accept: application/json
Response Code | Reason |
---|---|
200 | No error |
500 | Server error |
Paging is supported for this GET request using Standard URL Query String.
The underlying list of all the business rules for the Entity can be returned in a JSON key/value pair by setting the external JSON format parameter. This allows access by different external tools that requires the JSON data in a key/value pair instead of standard array of row data with columns names defined separately.
The response is a Standard Response, with a list of all the business rules for the Entity. If external JSON format parameter was set then list of all the business rules for the Entity in a JSON key/value pair format will be returned. This list does not include attribute business rules.
Show Some¶
-
POST
/api/repositories/
(string: repository)/entities/
(int: entityID)/businessrules
¶ Get a list of business rules for the Entity that match various criteria
JSON Parameters: - body – The request body
POST /api/repositories/jupiter/entities/1/businessrules HTTP/1.1
Content-Type: application/json
{
"command": "get",
"options": {
"where": "'Actual Threshold' >= 10"
}
}
The request requires a Standard Request packet. see the get command for the contents of the request..
The response will contain a list of rules matching the given criteria.
Add¶
The request requires a Standard Request packet; see the add command for the contents of the request.
The response will contain the URL of the new business rule.
Edit¶
The request requires a Standard Request packet; see the edit command for the contents of the request.
The response will contain the URL of the updated business rule.
Run¶
The run command creates a scheduled job to run the business rule(s).
The request requires a Standard Request packet; see the run command for the contents of the request.
The response contains the URL of the scheduled job.
Delete¶
-
DELETE
/api/repositories/
(string: repository)/entities/
(int: entityID)/businessrules
¶ Delete multiple business rules from the repository
JSON Parameters: - body – The request body
The request body is a JSON string; the string contains a key-value pair named “RULES”. The value is an array of JSON lists:
{
"RULES":[
{
"ENTITY": "1",
"ATTRIBUTE": "0",
"RULE": "16"
}
]
}
Each element in the RULES array contains the entity ID, attribute ID and rule ID of the business rule to delete.
DELETE /api/repositories/jupiter/entities/1/businessrules HTTP/1.1
Content-Type: application/json
{
"RULES": [
{
"ENTITY": "1",
"ATTRIBUTE": "0",
"RULE": "16"
}
]
}
Response Code | Reason |
---|---|
200 | Success |
400 | Expected array of rules(s) within request body |
400 | No rule(s) found within request body |
400 | No data received |
500 | Invalid parameters |
500 | Server error |
If the delete is successful, the response will contain a URL pointing at the Entity that owned the rule.