Path parameters
-
contextId
string Required The parent context ID, for example, "contextID1/rules/{rule_id}/versions"
Query parameters
-
updateMask
string(field-mask) The update mask applies to the resource. For the
FieldMask
definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
Body
Required
-
id
string example:"rule_01h89qfdhbejtb3jwqq1gazbm5"
-
description
string -
actions
array[object] -
expression
object
PATCH
/v1/{contextId}/rules/add
curl \
--request PATCH https://api.brease.run/v1/{contextId}/rules/add \
--header "Content-Type: application/json" \
--data '{"id":"string","description":"string","actions":[{"kind":"string","target":{"kind":"string","id":"string","value":"string"}}],"expression":{"and":{"expression":[{}]},"or":{"expression":[{}]},"condition":{"key":"string","ref":{"src":"string","dst":"string","value":"string"},"kind":"e","value":"string"}}}'
Request examples
{
"id": "string",
"description": "string",
"actions": [
{
"kind": "string",
"target": {
"kind": "string",
"id": "string",
"value": "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": 42,
"description": "string",
"actions": [
{
"kind": "string",
"target": {
"kind": "string",
"id": "string",
"value": "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"
}
]
}