Messages API
Provides operations on OMN Messages.
Persist messages
| /common/messages/persist Sends a message to a user and/or group |
Description
Sends a message to a user or role whereby the role has precedence if both are specified. Either a recipient user or a recipient role has to be specified. They can not both be empty.
Resource path |
/api/core/v1/common/messages/persist |
HTTP method |
POST |
Request content type |
application/json |
Response content type |
application/json |
Body Parameter
Specified by MessagesPersistRequest
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
MessagesPersistRequest |
X |
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Responses for each message |
|
400 |
Bad request. Indicates an issue with the format of the request (missing required value or a wrong data type) |
Samples
Send a message
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/messages/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"tid": "85a4ebbc-7e19-4021-b76b-373436628bb8",
"subject": "AI-Tagging Failed",
"body": "The AI-Tagging process for asset with id '\''43691245'\'' failed!",
"severity": "ERROR",
"recipientUser": "ap-admin",
"recipientRole": "monitoring",
"senderApplication": "Camunda",
"senderPlugin": "AI-Tagging",
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
]
}'
Request body MessagesPersistRequest
{
"messages": [
{
"tid": "85a4ebbc-7e19-4021-b76b-373436628bb8",
"subject": "AI-Tagging Failed",
"body": "The AI-Tagging process for asset with id '43691245' failed!",
"severity": "ERROR",
"recipientUser": "ap-admin",
"recipientRole": "monitoring",
"senderApplication": "Camunda",
"senderPlugin": "AI-Tagging",
"parameters": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
]
}
Response body
{
"response": [
{
"dataType": "message",
"issues": [],
"status": "SUCCESS",
"tid": "85a4ebbc-7e19-4021-b76b-373436628bb8"
}
]
}