latestOpenAPI 3.0.32026-08-224982,0272.8 MB
e445c15e5bee
Policy Builder
Update policy rule
Updates a policy rule, resulting in a new version number that's equal to the highest existing version plus 1. The ID of the policy rule remains the unchanged.
put/api/policy/v1/enterprises/{enterpriseId}/touchpoints/{touchpointName}/rules/{id}
Path parameters
enterpriseIdstring required
Your Enterprise Id.
touchpointNamestring required
The name of the Touchpoint.
idstring required
Id of the policy rule.
Request body
Example request
{
"name": "Get approval if transferring more than 2 BTC in a minute",
"clauses": [
{
"conditions": [
{
"name": "transfer.amount",
"parameters": {
"operator": ">",
"amount": "100000000",
"coin": "btc"
},
"operator": "AND"
}
],
"actions": [
{
"name": "approvals.always.deny"
}
]
}
],
"filteringConditions": [
{
"name": "wallet.ids"
}
],
"lockType": "PERMANENT",
"lockDate": "2023-11-13T14:49:48.830522Z"
}Response
The updated policy rule
Example response
{
"id": "306258df-dcab-489e-a9fe-ff28ce9fa312",
"uniqueId": "cb4e0a0a-2768-4024-904a-178ca6d2cd54",
"name": "My first policy rule",
"status": "ACTIVE",
"version": 1,
"touchpointId": "0a244ae3-26cf-48ed-9854-edd5b9751f3e",
"touchpointLabel": "Transfer from a Wallet",
"scopeId": "08a3f714-c330-41e6-bd83-bad3a8d37188",
"scopeLabel": "All Wallets",
"clauses": [
{
"actions": [
{
"name": "approvals.always.deny"
}
],
"conditions": [
{
"name": "transfer.amount",
"parameters": {
"operator": ">",
"amount": "100000000",
"coin": "btc"
},
"operator": "AND"
}
]
}
],
"filteringConditions": [
{
"name": "wallet.type"
}
],
"lockType": "PERMANENT",
"lockDate": "2023-11-13T14:49:48.830522Z",
"enterpriseId": "5d1a5f2c8f0a9c001a5f2c8f0ad00000",
"organizationId": "5d1a5f2c8f0a9c001a5f2c8f0ad00000",
"lastTriggeredDate": "2023-11-13T14:49:48.830522Z",
"lastTriggeredEvaluationId": "306258df-dcab-489e-a9fe-ff28ce9fa312",
"createdBy": "5d1a5f2c8f0a9c001a5f2c8f0ad00000",
"modifiedBy": "5d1a5f2c8f0a9c001a5f2c8f0ad00000",
"createdDate": "2023-11-13T14:49:48.830522Z",
"modifiedDate": "2023-11-13T14:49:48.830522Z",
"lockModifiedBy": "5d1a5f2c8f0a9c001a5f2c8f0ad00000",
"evaluationId": "306258df-dcab-489e-a9fe-ff28ce9fa312"
}