Path parameters
-
The parent context ID, for example, "contextID1/rules" where the Rule is to be created.
POST
/v1/{contextId}/rules
curl \
--request POST 'https://api.brease.run/v1/{contextId}/rules' \
--header "Content-Type: application/json" \
--data '{
"id": "string",
"sequence": 42,
"description": "string",
"actions": [
{
"kind": "string",
"target": {
"kind": "string",
"id": "string",
"value": "string"
},
"id": "string"
}
],
"expression": {
"and": {
"expression": [
{}
]
},
"or": {
"expression": [
{}
]
},
"condition": {
"key": "string",
"ref": {
"src": "string",
"dst": "string",
"value": "string"
},
"kind": "e",
"value": "string"
}
}
}'
Request examples
{
"id": "string",
"sequence": 42,
"description": "string",
"actions": [
{
"kind": "string",
"target": {
"kind": "string",
"id": "string",
"value": "string"
},
"id": "string"
}
],
"expression": {
"and": {
"expression": [
{}
]
},
"or": {
"expression": [
{}
]
},
"condition": {
"key": "string",
"ref": {
"src": "string",
"dst": "string",
"value": "string"
},
"kind": "e",
"value": "string"
}
}
}
Response examples (200)
{
"id": "string",
"version": "string",
"sequence": 42,
"description": "string",
"actions": [
{
"kind": "string",
"target": {
"kind": "string",
"id": "string",
"value": "string"
},
"id": "string"
}
],
"expression": {
"and": {
"expression": [
{}
]
},
"or": {
"expression": [
{}
]
},
"condition": {
"key": "string",
"ref": {
"src": "string",
"dst": "string",
"value": "string"
},
"kind": "e",
"value": "string"
}
}
}
Response examples (default)
{
"code": 42,
"message": "string",
"details": [
{
"@type": "string"
}
]
}