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/

Rules

Get details of a rule

This endpoint is used to get the details of a rule based on the provided id.

Authorizations:
Macma
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

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "ownerId": "string",
  • "creatorId": "string",
  • "creator": "string",
  • "status": "string",
  • "timeTrigger": "string",
  • "resultTimer": 0,
  • "publishDeviation": true,
  • "action": {
    },
  • "context": [
    ],
  • "conditions": [
    ],
  • "previousDataNeeded": true,
  • "privileges": [
    ]
}

Update a rule

This endpoint is used to update an existing rule.

Authorizations:
Macma
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/json
required
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

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "ownerId": "string",
  • "creatorId": "string",
  • "creator": "string",
  • "status": "string",
  • "timeTrigger": "string",
  • "resultTimer": 0,
  • "publishDeviation": true,
  • "action": {
    },
  • "context": [
    ],
  • "conditions": [
    ],
  • "previousDataNeeded": true,
  • "privileges": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "ownerId": "string",
  • "creatorId": "string",
  • "creator": "string",
  • "status": "string",
  • "timeTrigger": "string",
  • "resultTimer": 0,
  • "publishDeviation": true,
  • "action": {
    },
  • "context": [
    ],
  • "conditions": [
    ],
  • "previousDataNeeded": true,
  • "privileges": [
    ]
}

Create a rule

This endpoint is used to create a new rule.

Authorizations:
Macma
path Parameters
ownerTenantId
required
string

The owner tenant id of the rule to be created.

Request Body schema: application/json
required
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

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "ownerId": "string",
  • "creatorId": "string",
  • "creator": "string",
  • "status": "string",
  • "timeTrigger": "string",
  • "resultTimer": 0,
  • "publishDeviation": true,
  • "action": {
    },
  • "context": [
    ],
  • "conditions": [
    ],
  • "previousDataNeeded": true,
  • "privileges": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "ownerId": "string",
  • "creatorId": "string",
  • "creator": "string",
  • "status": "string",
  • "timeTrigger": "string",
  • "resultTimer": 0,
  • "publishDeviation": true,
  • "action": {
    },
  • "context": [
    ],
  • "conditions": [
    ],
  • "previousDataNeeded": true,
  • "privileges": [
    ]
}

Get filtered list of rules

This endpoint is used to search for rules based on the filter criteria provided.

Authorizations:
Macma
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/json
required
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

Content type
application/json
{
  • "status": "Available values: active,inactive, in approval",
  • "severity": "Available values: HIGH, MEDIUM, LOW",
  • "title": "string",
  • "code": "string",
  • "measuringPoints": [
    ],
  • "functionIds": [
    ],
  • "facilityIds": [
    ],
  • "search": "string",
  • "context": [
    ],
  • "sort": "-status"
}

Response samples

Content type
application/json
[
  • {
    }
]

Change status of a rule

This endpoint is used to change the status of a rule.

Authorizations:
Macma
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/json
required
status
required
string

The status of the rule.

object (HistoryComment)

The history of the rule.

Responses

Request samples

Content type
application/json
{
  • "status": "string",
  • "history": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "ownerId": "string",
  • "creatorId": "string",
  • "creator": "string",
  • "status": "string",
  • "timeTrigger": "string",
  • "resultTimer": 0,
  • "publishDeviation": true,
  • "action": {
    },
  • "context": [
    ],
  • "conditions": [
    ],
  • "previousDataNeeded": true,
  • "privileges": [
    ]
}