Business Rules - Failing Rows

GET /api/repositories/(string: repository)/entities/(int: entity)/businessrules/(int: ruleID)/failingrows

Get all failing rows for the given rule.

POST /api/repositories/(string: repository)/entities/(int: entity)/businessrules/(int: ruleID)/failingrows
  • Filter the list of failing rows
  • Sort the list of failing rows
  • Page the list of failing rows
  • Export the failing rows
Parameter Type Purpose
repository string The name of the repository the entity is in
entityID int The ID of the entity the rule belongs to
ruleID int The ID of the business rule

All Failing Rows

Show all failing rows for the given rule.

GET /api/repositories/(string:repository)/entities/(int:entity)/businessrules/(int:ruleID)/failingrows 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 containing a list of all/paged rows that fail the business rule. If external JSON format parameter was set then a list of all/paged rows that fail the business rule will be returned in a JSON key/value pair format.

Some Failing Rows

The list of failing rows can be filtered, sorted or paged; these options may be combined (for example, sorted and paged). The underlying row data for the failing 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 request requires a Standard Request.

POST /api/repositories/(string:repository)/entities/(int:entity)/businessrules/(int:ruleID)/failingrows HTTP/1.1
Content-type:: application/json

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

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

Export Failing Rows

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

POST /api/repositories/(string:repository)/entities/(int:entity)/businessrules/(int:ruleID)/failingrows 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 for an export contains the scheduled job ID and the url for the exported file.

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