latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Policy Builder

List policy rules

Lists all policy rules for an enterprise.

get/api/policy/v1/enterprises/{enterpriseId}/rules

Path parameters

enterpriseIdstring required

Your Enterprise Id.

Query parameters

createdDateGtestring date-time

The date and time of the earliest policy rule creation to return. The date and time must be in ISO 8601 format.

createdDateLtestring date-time

The date and time of the latest policy rule creation to return. The date and time must be in ISO 8601 format.

evaluationIdstring

The id of the Evaluation.

evaluationStatus'TRIGGERED' | 'NOT_TRIGGERED'

Status of the Evaluation

namestring

A string to match the names of the policy rules against.

status'PENDING' | 'ACTIVE' | 'INACTIVE' | 'INACTIVE_HIDDEN' | 'DENIED' | 'PENDING_APPROVAL' | 'UNLOCK_PENDING'

Statuses of the returned policy rules, one or more may be provided.

scopes'wallet.segregated' | 'policies.management'

scopes of the returned policy rules. One or more may be provided. For example, the All Wallets scope. See also the List scopes API.

touchpointsstring

The Touchpoints of the returned policy rules. One or more may be provided. For example, the Transfer from a Wallet Touchpoint. See also the List scope Touchpoints API.

idstring

Id of the policy rule.

limitinteger

How many policy rules to return per page of results. Default: 20, Maximum: 100.

prevIdinteger

The nextBatchPrevId returned by the last call to the same API. Used to retrieve the next page of results.

filteringConditionParameterNamestring

You can retrieve the policy rules that match a given set of Filtering Conditions by providing the parameter name and value of the Filtering Conditions you are interested in. See also Filtering Conditions. In addition, you could add Dynamic parameter for filtering rules based on specific criteria. Format: <table>.<property>.parameters.<key>=<values>

  • <table>: (Required) The table name. Valid values are filteringCondition, action, or condition.
  • <property>: (Optional) The name of the property.
  • parameters: (Fixed) Indicates parameters section.
  • <key>: (Required) The key in the table's parameters column to search against.
  • <values>: (Optional) Comma-separated list of values to match.

Response

Paginated list of policy rules.

nextBatchPrevIdstring required

The value to pass as the prevId to the API for getting the next page.

Example response

{
  "rules": [
    {
      "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"
    }
  ]
}