Business Rule Group - Passing Rows

GET /api/repositories/(string: repository)/entities/(int: entityID)/businessrules/(int: ruleID)/groups/(string: groupName)/passingrows

Get all the rows in a group that passed the rule.

POST /api/repositories/(string: repository)/entities/(int: entityID)/businessrules/(int: ruleID)/groups/(string: groupName)/passingrows
  • Filter the list of passing rows
  • Sort the list of passing rows
  • Page the list of passing rows
  • Export the passing rows
Parameter Type Purpose
repository string The name of the Repository to access
entityID int The ID of the entity to view
ruleID int The ID of the desired rule
groupName string The name of the group

All Passing Rows

Show all passing rows in a group for a particular rule.

GET /api/repositories/alpha/entities/1/businessrules/1/groups/B/passingrows HTTP/1.1
Accept: application/json

Paging is supported for this GET request using Standard URL Query String. Depending on the rule and the dataset, the number of passing rows may be quite large, so paging the data is recommended.

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 for a get is a standard response, with a list of the rows in the group that passed the business rule. If external JSON format parameter was set then each datarow for a list of the rows in the group that passed the business rule will be returned in a JSON key/value pair format.

Passing Rows for a Specific Group

Show all passing rows a given group for a particular rule. Use this API when group name is an empty string, a single space or multiple spaces.

POST /api/repositories/jupiter/entities/1/businessrules/1/groups/passingrows HTTP/1.1
Content-type:: application/json

{
    "command": "get",
    "data": {
        "groupName": ""
    }
}

The groupName can be any string name, including an empty string, a single space or multiple spaces.

The response is a Standard Response containing the list of passing rows matching the criteria.

Some Passing Rows

The list of passing rows can be filtered, sorted or paged; these options may be combined (for example, sorted and paged). The request requires a Standard Request.

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.

POST /api/repositories/jupiter/entities/1/businessrules/1/groups/B/passingrows HTTP/1.1
Content-type:: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 10
    }
}

The response is a Standard Response containing the list of passing rows matching the criteria. If external JSON format parameter was set then each datarow for a list of passing rows matching the criteria will be returned in a JSON key/value pair format.

Export Passing Rows

Some or all of the passing rows may be exported as a scheduled task.

POST /api/repositories/jupiter/entities/1/businessrules/1/groups/B/passingrows HTTP/1.1
Content-type:: application/json

{
    "command": "export",
    "options": {
        "columns": [
            "column_name1",
            "column_name2",
            "column_name3"
        ],
        "where": "where clause"
    },
    "data": {
        "filename": "filename.csv"
    }
}

When export is required, the filename for the exported file must be specified. The file will be exported in CSV format using the native encoding of the server.

Response Code Reason
200 No error
500 Server error

The response will contain the URL of the scheduled task and the link to download the exported file.

{
    "job": "/api/repositories/jupiter/scheduler/1",
    "file": "/api/repositories/jupiter/download/filename.csv"
}

Export Passing Rows for a Specific Group

Some or all of the passing rows may be exported as a scheduled task for a given group for a particular rule. Use this API when group name is an empty string, a single space or multiple spaces.

POST /api/repositories/jupiter/entities/1/businessrules/1/groups/passingrows HTTP/1.1
Content-type:: application/json

{
    "command": "export",
    "options": {
        "columns": [
            "column_name1",
            "column_name2",
            "column_name3"
        ],
        "where": "where clause"
    },
    "data": {
        "filename": "filename.csv"
        "groupName": ""
    }
}

When export is required, the filename for the exported file must be specified. The file will be exported in CSV format using the native encoding of the server.

The groupName can be any string name, including an empty string, a single space or multiple spaces.

Response Code Reason
200 No error
500 Server error

The response will contain the URL of the scheduled task and the link to download the exported file.

{
    "job": "/api/repositories/jupiter/scheduler/1",
    "file": "/api/repositories/jupiter/download/filename.csv"
}