Read all Batch Rules
Retrieves all batch rules for the specified project from the database.
With this service method, you can retrieve all the batch rules contained in the specified rule project. You can use the optional query parameters to keep the number of returned entries low.
Request
URI: /v1/projects/<projectId>/batch-rules
HTTP Method: GET
Permissions: <rule>.r
Request Parameters
| Parameter | Required | Data Type | Description | Parameter Type |
|---|---|---|---|---|
| projectID | Yes | string | Unique ID of the rule project. | Path |
| $count | No | boolean | Indicates whether the total number of rules in the specified project shall be returned. Default: false. | Query string |
| $filter | No | string | Filter condition to be applied; | Query string |
| $skip | No | integer | Number of the first n records to be excluded from the result set. | Query string |
| $top | No | integer | Number of records to include in the result set. Maximum allowed value: 500 | Query string |
| $orderby | No | string | Field name to be used for sorting the result set. | Query string |
Request Example
/v1/projects/185d9a72-a629-4b94-b421-a2f0301bb072/batch-rulesWith this request, you retrieve all the batch rules that are contained in rule project "185d9a72...".
Response
Response Status and Error Codes
| Code | Description |
|---|---|
| 200 | Rules retrieved successfully. |
| 401 | Unauthorized. Rules couldn't be retrieved due to insufficient access rights. |
| 403 | Forbidden. |
| 404 | Not found. For example, an invalid project ID has been provided. |
Response Example
{
"count": 543,
"previous": "http://localhost:8080/v1/vocabulary?$skip=500",
"next": "http://localhost:8080/v1/vocabulary?$skip=500",
"values": [
{
"id": "79ded171-8926-4dff-bf73-fc2d3070a100",
"ETag": 1234143531234253600,
"name": "MyBatchRuleName",
"activationDetails": [
{
"correlationId": "79ded171-8926-4dff-bf73-fc2d3070a100",
"createdBy": "ACTIVATION_ENDPOINT",
"createdOn": "79ded171-8926-4dff-bf73-fc2d3070a100",
"status": "INACTIVE,ACTIVATION_TRIGGERED,ACTIVATION_COMPLETED,DEACTIVATION_TRIGGERED,DEACTIVATION_COMPLETED",
"activationId": "79ded171-8926-4dff-bf73-fc2d3070a100"
}
],
"texts": [
{
"ruleId": "79ded171-8926-4dff-bf73-fc2d3070a100",
"language": "en",
"shortText": "Short text for my rule",
"description": "Long description for my rule"
}
],
"tags": [
{
"ruleId": "79ded171-8926-4dff-bf73-fc2d3070a100",
"tag": "MyRuleTag"
}
],
"inputDataObjectNames": [
{
"ruleId": "79ded171-8926-4dff-bf73-fc2d3070a100",
"name": "timeSeriesDOName_aggregate"
}
],
"createdOn": "2020-10-15T12:25:14.435Z",
"lastChangedOn": "2020-10-15T12:25:14.435Z",
"brProjectId": "4f5697d3240d4f258b900c181e35a835",
"brDraftRuleId": "4f5697d3240d4f258b900c181e35a835",
"brActiveRuleId": "4f5697d3240d4f258b900c181e35a835",
"brDraftRuleServiceId": "4f5697d3240d4f258b900c181e35a835",
"brActiveRuleServiceId": "4f5697d3240d4f258b900c181e35a835",
"brDraftRuleSetId": "4f5697d3240d4f258b900c181e35a835",
"brActiveRuleSetId": "4f5697d3240d4f258b900c181e35a835",
"draftDetails": {
"scheduling": {
"startTime": "2019-03-18T13:26:58.756Z",
"endTime": "2019-03-20T13:26:58.756Z",
"value": "*/5 * * * * *",
"recurrence": "string"
},
"timeFrame": "PT1H",
"isToggle": true
},
"projectId": "185d9a72-a629-4b94-b421-a2f0301bb072",
"activeDetails": {
"scheduling": {
"startTime": "2019-03-18T13:26:58.756Z",
"endTime": "2019-03-20T13:26:58.756Z",
"value": "*/5 * * * * *",
},
"timeFrame": "PT1H",
"isToggle": true,
}
}
]
}