Update trigger
This request changes trigger attributes.
Resource
PATCH /triggers/<OID>
Where OID
is the oid of the trigger
Parameters
None
Payload
Fields
Name | Patch Operations |
---|---|
type |
|
action |
|
condition |
|
value |
|
active |
|
countrySettings |
|
Properties List |
|
properties |
|
properties.name |
|
properties.value |
|
properties.objectValue |
|
Object Definition |
|
objectDefinition |
|
objectDefinition.commonName |
|
objectDefinition.fields |
|
objectDefinition.fields.type |
|
objectDefinition.fields.label |
|
objectDefinition.fields.value |
|
objectDefinition.fields.aggregation |
|
objectDefinition.fields.orderNumber |
|
Response
None
Context
Authorization |
User |
Errors
Example
PATCH https://xelion.nl/api/v1/master/triggers/1627410
change trigger direct member
{
"operations": [
{
"op": "replace",
"path": "/action",
"value": "system_command"
}
]
}
add new property to trigger, first add a new object with virtual id 1 and then set the submember(s) by adding replace operations on the virtual id '1'
{
"operations": [
{
"op": "add",
"path": "/properties/1",
},
{
"op": "replace",
"path": "/properties/1/name",
"value": "property2"
}
]
}
remove property from trigger, <OID> is the oid of the property
{
"operations": [
{
"op": "remove",
"path": "/properties/1726623"
}
]
}
change property submember, <OID> is the oid of the property
{
"operations": [
{
"op": "replace",
"path": "/properties/1726623/value",
"value": "0151234568"
}
]
}
change object definition submember, object definition is created automaticly when not yet existst
{
"operations": [
{
"op": "replace",
"path": "/objectDefinition/commonName",
"value": "callLog"
}
]
}
add new field to object definition, first add a new object with virtual id 1 and then set the submember(s) by adding replace operations on the virtual id '1'
{
"operations": [
{
"op": "add",
"path": "/objectDefinition/fields/1"
},
{
"op": "replace",
"path": "/objectDefinition/fields/1/value",
"value": "${date}"
}
]
}
change field submember of object definition, <OID> is the oid of the field
{
"operations": [
{
"op": "replace",
"path": "/objectDefinition/fields/1726623/value",
"value": "${callId}"
}
]
}
remove field from object definition, <OID> is the oid of the field
{
"operations": [
{
"op": "remove",
"path": "/objectDefinition/fields/1726623"
}
]
}
change aggregation submember from object definition field, <OID> is the oid of the field, aggregation is created automaticly when not yet existst. The aggregation member is an object definition, the object definition patch operations can also be applied to this aggregation.
{
"operations": [
{
"op": "replace",
"path": "/objectDefinition/fields/1726623/aggregation/commonName",
"value": "phoneLine"
}
]
}
remove aggregation from object definition field, <OID> is the oid of the field
{
"operations": [
{
"op": "remove",
"path": "/objectDefinition/fields/1726623/aggregation"
}
]
}
remove object definition
{
"operations": [
{
"op": "remove",
"path": "/objectDefinition"
}
]
}