Rules Management REST APIs (4.6.0)
Download OpenAPI specification:Download
This is the public API description of Rules Management as part of Condition Monitoring. Note: starting with version 2.1.x the URL prefix was changed from BCI_RS/ to rule-manager/
Get details of a rule
This endpoint is used to get the details of a rule based on the provided id.
Authorizations:
path Parameters
ownerTenantId required | string The owner tenant id of the rule to be fetched. |
ruleId required | string The id of the rule to be fetched. |
Responses
Response samples
- 200
{- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "creator": "string",
- "status": "string",
- "timeTrigger": "string",
- "resultTimer": 0,
- "publishDeviation": true,
- "action": {
- "severity": "LOW",
- "code": "string",
- "title": "string",
- "message": "string",
- "synchronizedErrorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "id": "string",
- "order": 0,
- "valid": true,
- "parameters": [
- {
- "key": "string",
- "value": "string",
- "type": "string"
}
], - "functionDTO": {
- "id": "string",
- "description": "string",
- "internal": true,
- "type": "string",
- "key": "string",
- "label": "string"
}, - "functionId": "string"
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}
Update a rule
This endpoint is used to update an existing rule.
Authorizations:
path Parameters
ownerTenantId required | string The owner tenant id of the rule to be updated. |
ruleId required | string The id of the rule to be updated. |
Request Body schema: application/jsonrequired
id | string [ 0 .. 36 ] characters The unique identifier of the rule. |
name required | string [ 0 .. 128 ] characters The name of the rule. |
description | string [ 0 .. 2000 ] characters The description of the rule. |
ownerId | string [ 0 .. 256 ] characters The owner of the rule. |
creatorId | string [ 0 .. 36 ] characters The creator of the rule. |
creator | string [ 0 .. 511 ] characters The creator of the rule. |
status required | string [ 0 .. 50 ] characters The status of the rule. |
timeTrigger | string [ 0 .. 50 ] characters The time trigger of the rule. |
resultTimer | integer <int64> The result timer of the rule. |
publishDeviation | boolean The flag to indicate if a deviation should be published |
required | object (ActionDTO) The action of the rule. |
required | Array of objects (ContextDTO) unique The context of the rule. |
Array of objects (ConditionDTO) The conditions of the rule. | |
previousDataNeeded | boolean True if previous values are needed. |
privileges | Array of strings unique Items Enum: "add" "read" "modify" "execute" "delete" "unknown" |
Responses
Request samples
- Payload
{- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "creator": "string",
- "status": "string",
- "timeTrigger": "string",
- "resultTimer": 0,
- "publishDeviation": true,
- "action": {
- "severity": "LOW",
- "code": "string",
- "title": "string",
- "message": "string",
- "synchronizedErrorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "id": "string",
- "order": 0,
- "valid": true,
- "parameters": [
- {
- "key": "string",
- "value": "string",
- "type": "string"
}
], - "functionDTO": {
- "id": "string",
- "description": "string",
- "internal": true,
- "type": "string",
- "key": "string",
- "label": "string"
}, - "functionId": "string"
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}
Response samples
- 200
{- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "creator": "string",
- "status": "string",
- "timeTrigger": "string",
- "resultTimer": 0,
- "publishDeviation": true,
- "action": {
- "severity": "LOW",
- "code": "string",
- "title": "string",
- "message": "string",
- "synchronizedErrorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "id": "string",
- "order": 0,
- "valid": true,
- "parameters": [
- {
- "key": "string",
- "value": "string",
- "type": "string"
}
], - "functionDTO": {
- "id": "string",
- "description": "string",
- "internal": true,
- "type": "string",
- "key": "string",
- "label": "string"
}, - "functionId": "string"
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}
Create a rule
This endpoint is used to create a new rule.
Authorizations:
path Parameters
ownerTenantId required | string The owner tenant id of the rule to be created. |
Request Body schema: application/jsonrequired
id | string [ 0 .. 36 ] characters The unique identifier of the rule. |
name required | string [ 0 .. 128 ] characters The name of the rule. |
description | string [ 0 .. 2000 ] characters The description of the rule. |
ownerId | string [ 0 .. 256 ] characters The owner of the rule. |
creatorId | string [ 0 .. 36 ] characters The creator of the rule. |
creator | string [ 0 .. 511 ] characters The creator of the rule. |
status required | string [ 0 .. 50 ] characters The status of the rule. |
timeTrigger | string [ 0 .. 50 ] characters The time trigger of the rule. |
resultTimer | integer <int64> The result timer of the rule. |
publishDeviation | boolean The flag to indicate if a deviation should be published |
required | object (ActionDTO) The action of the rule. |
required | Array of objects (ContextDTO) unique The context of the rule. |
Array of objects (ConditionDTO) The conditions of the rule. | |
previousDataNeeded | boolean True if previous values are needed. |
privileges | Array of strings unique Items Enum: "add" "read" "modify" "execute" "delete" "unknown" |
Responses
Request samples
- Payload
{- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "creator": "string",
- "status": "string",
- "timeTrigger": "string",
- "resultTimer": 0,
- "publishDeviation": true,
- "action": {
- "severity": "LOW",
- "code": "string",
- "title": "string",
- "message": "string",
- "synchronizedErrorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "id": "string",
- "order": 0,
- "valid": true,
- "parameters": [
- {
- "key": "string",
- "value": "string",
- "type": "string"
}
], - "functionDTO": {
- "id": "string",
- "description": "string",
- "internal": true,
- "type": "string",
- "key": "string",
- "label": "string"
}, - "functionId": "string"
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}
Response samples
- 200
{- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "creator": "string",
- "status": "string",
- "timeTrigger": "string",
- "resultTimer": 0,
- "publishDeviation": true,
- "action": {
- "severity": "LOW",
- "code": "string",
- "title": "string",
- "message": "string",
- "synchronizedErrorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "id": "string",
- "order": 0,
- "valid": true,
- "parameters": [
- {
- "key": "string",
- "value": "string",
- "type": "string"
}
], - "functionDTO": {
- "id": "string",
- "description": "string",
- "internal": true,
- "type": "string",
- "key": "string",
- "label": "string"
}, - "functionId": "string"
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}
Get filtered list of rules
This endpoint is used to search for rules based on the filter criteria provided.
Authorizations:
path Parameters
ownerTenantId required | string The owner tenant id of the rules to be fetched. |
query Parameters
page | integer <int32> >= 0 Default: 0 The page number to be fetched. |
pageSize | integer <int32> [ 0 .. 1000 ] Default: 50 The page size to be fetched. |
Request Body schema: application/jsonrequired
status | Array of strings The status to filter. |
severity | Array of strings Items Enum: "LOW" "MEDIUM" "HIGH" The severity to filter. |
title | string The title of the rule to filter. |
code | string The code of the rule to filter. |
measuringPoints | Array of strings unique The measuring points to filter. |
functionIds | Array of strings unique The function ids to filter. |
facilityIds | Array of strings unique The facility ids to filter. |
search | string The search string to filter. |
Array of objects (ContextContract) unique The context to filter. | |
object (PairSortByOrderBy) The sort order. Ascending or descending and the parameter whom to sort. |
Responses
Request samples
- Payload
{- "status": "Available values: active,inactive, in approval",
- "severity": "Available values: HIGH, MEDIUM, LOW",
- "title": "string",
- "code": "string",
- "measuringPoints": [
- "string"
], - "functionIds": [
- "string"
], - "facilityIds": [
- "string"
], - "search": "string",
- "context": [
- {
- "contextKey": "string",
- "contextValue": "string"
}
], - "sort": "-status"
}
Response samples
- 200
[- {
- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "status": "string",
- "action": {
- "code": "string",
- "message": "string",
- "severity": "LOW",
- "errorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "function": {
- "label": "string"
}, - "measuringPoint": {
- "name": "string"
}
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}
]
Change status of a rule
This endpoint is used to change the status of a rule.
Authorizations:
path Parameters
ownerTenantId required | string The owner tenant id of the rule to be updated. |
ruleId required | string The id of the rule to be updated. |
Request Body schema: application/jsonrequired
status required | string The status of the rule. |
object (HistoryComment) The history of the rule. |
Responses
Request samples
- Payload
{- "status": "string",
- "history": {
- "comment": "string"
}
}
Response samples
- 204
{- "id": "string",
- "name": "string",
- "description": "string",
- "ownerId": "string",
- "creatorId": "string",
- "creator": "string",
- "status": "string",
- "timeTrigger": "string",
- "resultTimer": 0,
- "publishDeviation": true,
- "action": {
- "severity": "LOW",
- "code": "string",
- "title": "string",
- "message": "string",
- "synchronizedErrorDefinition": true
}, - "context": [
- {
- "id": "string",
- "contextKey": "string",
- "contextValue": "string"
}
], - "conditions": [
- {
- "id": "string",
- "order": 0,
- "valid": true,
- "parameters": [
- {
- "key": "string",
- "value": "string",
- "type": "string"
}
], - "functionDTO": {
- "id": "string",
- "description": "string",
- "internal": true,
- "type": "string",
- "key": "string",
- "label": "string"
}, - "functionId": "string"
}
], - "previousDataNeeded": true,
- "privileges": [
- "add"
]
}