Get policy rules

get/api/v2/enterprise/{enterpriseId}/policy/rules

Returns a page of policy rules matching the provided search criteria.

Path Parameters

  • enterpriseIdstringRequired
    Example: 59cd72485007a239fb00282ed480da1f
    Pattern: ^[0-9a-f]{32}$
    Min length: >= 1 characters

Query Parameters

  • walletIdstring
    Filter by wallet.
    Example: 59cd72485007a239fb00282ed480da1f
    Pattern: ^[0-9a-f]{32}$
    Min length: >= 1 characters
  • walletTypestring
    Filter by wallet type. Must not be used in conjunction with walletId.
    Min length: >= 1 characters
  • scopesarray[string]
    Scopes of the returned policy rules. One or more may be provided.
    Min length: >= 1 characters
  • touchpointsarray[string]
    The touch points of the returned policy rules. One or more may be provided.
    Min length: >= 1 characters
  • statusarray[string]
    Statuses of the returned policy rules. One or more may be provided.
    Enum: ACTIVE INACTIVE PENDING PENDING_APPROVAL DENIED UNLOCK_PENDING
  • namestring
    Filter by policy name.
    Example: Wallet Whitelist
    Min length: >= 1 characters
  • createdDateGtestring<date-time>
    Only return rules created from this date.
    Example: 2023-11-28T23:35:59.053Z
  • createdDateLtestring<date-time>
    Only return rules created up to this date.
    Example: 2023-11-28T23:35:59.053Z
  • evaluationIdstring
    Min length: >= 1 characters
  • evaluationStatusstring
    Enum: TRIGGERED NOT_TRIGGERED
  • involvingUserIdsarray[string]
    Min length: >= 1 characters
  • sortByarray[string]
    Enum: NAME LAST_TRIGGERED_DATE CREATED_DATE
  • orderarray[string]
    Enum: ASC DESC
  • limitstring<number>Default: 20
    How many policy rules to return per page of results. If the result set is truncated, use the "nextBatchPrevId" value to get the next batch.
    Maximum: <= 100
  • prevIdstring
    Min length: >= 1 characters
  • includeClausesboolean
    Return the next batch of results, based on the "nextBatchPrevId" value from the previous batch.

200 Response

rules array[object] required
A list of Policy Rules matching the search criteria.
id string required
Id of the Policy Rule. This identifier is not unique in isolation, it must be paired with an specific Policy Rule Version number to uniquely identified a particular version of a Policy Rule. A UUID.
Min length: >= 1 characters
Example: 306258df-dcab-489e-a9fe-ff28ce9fa312
uniqueId string required
The uniqueId of the Policy Rule version. A UUID.
Min length: >= 1 characters
Example: cb4e0a0a-2768-4024-904a-178ca6d2cd54
enterpriseId string required
The id of the Enterprise this Policy Rule belongs to.
Min length: >= 1 characters
Example: 59cd72485007a239fb00282ed480da1f
name string required
Human readable name of the rule
Min length: >= 1 characters
Example: My first policy rule
status string required
Indicates if the Policy Rule is considered in Evaluations. * "ACTIVE" - Will be Evaluated. * "INACTIVE" - Will NOT be Evaluated. * "DENIED" - The requested policy rule change was Denied. * "PENDING_APPROVAL" - This version of the policy rule is Pending Approval before it can be activated.
Allowed values: ACTIVE INACTIVE PENDING PENDING_APPROVAL DENIED UNLOCK_PENDING
Example: ACTIVE
version number required
The Policy Rule Version, an integer that is incremented each time the Policy Rule changes.
Default: 1
Example: 1
adminOnly boolean required
true, if the Policy Rule is a BitGo internal rule. Typically, this allows setting Global Policy Rules across enterprises.
Example: false
filteringConditions array[object] required
Filter by wallet type.
createdBy string required
The id of the user who created the Policy Rule or the string 'BitGo'.
Min length: >= 1 characters
Example: 5d1a5f2c8f0a9c001a5f2c8f0ad00000
modifiedBy string required
The id of the user requesting to modify the Policy Rule or the string 'BitGo'.
Min length: >= 1 characters
Example: 5d1a5f2c8f0a9c001a5f2c8f0ad00000
ip string
Min length: >= 1 characters
requestId string
Min length: >= 1 characters
previousUniqueId string
Min length: >= 1 characters
clauses array[object]
List of Policy Rule Clauses: a combination of Conditions and Actions.
lockModifiedBy string
The id of the user requesting to unlock the Policy Rule.
Min length: >= 1 characters
Example: 5d1a5f2c8f0a9c001a5f2c8f0ad00000
lockDate string
The timestamp until which the Policy Rule is unlocked. This is a string representing a date in ISO 8601 format.
Min length: >= 1 characters
nextBatchPrevId string
The value to pass as the prevId to the API for getting the next page
Min length: >= 1 characters

400 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id

401 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id

403 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id

404 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id