Business Rules

/api/repositories/{repository}/businessrules
Parameter Type Purpose
repository string The name of the Repository to access

Count

GET /api/repositories/(string: repository)/businessrules/count

Returns the number of business rules in the repository.

Response Code Reason
200 No error
500 Server error

The response contains the number of business rules in the repository.

{
    "count": "426"
}

Entity Business Rule Count

GET /api/repositories/(string: repository)/businessrules/entity/count

Returns the number of business rules in the repository that are associated to an entity.

Response Code Reason
200 No error
500 Server error

The response contains the number of business rules in the repository that are associated to an entity.

{
    "count": "21"
}

List All Business Rules

List all library and non-library business rules.

Get

GET /api/repositories/(string: repository)/businessrules

Get a list of all library and non-library business rules in the Repository. Paging is supported for this GET request using Standard URL Query String. If you require a subset of this data (filtering, sorting, or columns), POST to this url with the standard request body.

GET /api/repositories/jupiter/businessrules HTTP/1.1
Accept: application/json
Response Code Reason
200 No error
500 Server error

The underlying data rows 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 library and non-library business rules in the Repository; this includes Entity business rules and Attribute business rules. If external JSON format parameter was set then the row details of the business rule will be returned in a JSON key/value pair format.

Post

POST /api/repositories/(string: repository)/businessrules

Get a list of all library and non-library business rules in the Repository that match various criteria

JSON Parameters:
 
  • body – The request body
POST /api/repositories/jupiter/businessrules HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "where": "'Actual Threshold' >= 10"
    }
}
Response Code Reason
200 Success
400 Invalid request body
400 Invalid command
400 No data received
500 Server error

The request requires a Standard Request packet. The underlying row data of business rules 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.

Available commands are:

Command Description
get Get business rules from the Repository that match the criteria in Options

The response is a Standard Response, with a list of all library and non-library business rules in the Repository; this includes Entity business rules and Attribute business rules matching the given criteria. If external JSON format parameter was set then the details of the business rule will be returned in a JSON key/value pair format.

Entity (non-library) Business Rules

Get

GET /api/repositories/(string: repository)/businessrules/entity

Get a list of all non-library business rules in the Repository. The GET request supports page and pageSize parameters on the URL. If you require a subset of this data (filtering, sorting, or columns), POST to this url with the standard request body.

GET /api/repositories/jupiter/businessrules/entity 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 data rows 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 non-library business rules in the Repository; this includes Entity business rules and Attribute business rules. If external JSON format parameter was set then the details of the business rule will be returned in a JSON key/value pair format.

Commands

POST /api/repositories/(string: repository)/businessrules/entity

Get a list of non-library business rules in the Repository that match various criteria

JSON Parameters:
 
  • body – The request body
POST /api/repositories/jupiter/businessrules/entity HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "where": "'Actual Threshold' >= 10"
    }
}
Response Code Reason
200 Success
400 Invalid request body
400 No rule details given
400 Invalid command
400 No data received
500 Server error

The request requires a Standard Request packet. The underlying row data of business rules can be returned in a JSON key/value pair by setting the external JSON format parameter for the get command. 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.

Available commands are:

Command Description
get Get business rules from the Repository that match the criteria in Options
add Add a Business Rule
edit Edit a Business Rule
run Run the Business Rule analysis

See the Business Rule Commands for the contents of the request for each command.

The response depends on which operation was performed.

Command Response
get A Standard Response with a list of the rules matching the given criteria
add Returns the URL of the newly added Business Rule
edit Returns the URL of the updated Business Rule
run Returns the URL of the Job

Delete

DELETE /api/repositories/(string: repository)/businessrules/entity

Delete multiple non-library 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 Business Rule ID of the rule to delete.

DELETE /api/repositories/jupiter/businessrules/entity 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.

Library Business Rules

Get

GET /api/repositories/(string: repository)/businessrules/library

Get a list of all library business rules in the Repository. The GET request supports page and pageSize parameters on the URL. If you require a subset of this data (filtering, sorting, or columns), POST to this url with the standard request body.

GET /api/repositories/jupiter/businessrules/library 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 data rows 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 library business rules in the Repository; this includes Library Entity Business Rule and Library Attribute business rules. If external JSON format parameter was set then the details of the library business rules will be returned in a JSON key/value pair format.

Commands

POST /api/repositories/(string: repository)/businessrules/library

Get a list of all library business rules in the Repository that match various criteria

JSON Parameters:
 
  • body – The request body
POST /api/repositories/jupiter/businessrules/library HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "where": "'Actual Threshold' >= 10"
    }
}
Response Code Reason
200 Success
400 Invalid request body
400 Invalid command
400 No data received
500 Server error

The request requires a Standard Request packet. The underlying row data of business rules can be returned in a JSON key/value pair by setting the external JSON format parameter for the get command. 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.

Available commands are:

Command Description
get Get all library business rules from the Repository that match the criteria in Options
list Returns list of Library Entity Business Rule belonging to any library entity
run Run analysis for a list of Library Entity Business Rule belonging to any library entity

See the Library Entity Business Rules for the contents of the request for each command.

The response depends on which operation was performed.

Command Response
get A Standard Response with a list of the rules matching the given criteria
list Returns list of Library Entity Business Rule belonging to any library entity
run Returns the URL of the Job

The response is a Standard Response, with a list of all library business rules in the Repository; this includes Library Entity Business Rule and Library Attribute business rules matching the given criteria. If external JSON format parameter was set then the details of the library business rules will be returned in a JSON key/value pair format.