REST APIPolicyPolicy Builder

GET

Returns a policy rule by its ID. If version is passed, returns the most recent INACTIVE policy rule. If version isn't passed, returns the currently ACTIVE policy rule.

Path Params

  • enterpriseId string required
    Your Enterprise Id.
  • id string required
    Id of the policy rule.

Query Params

  • version number
    Version of the policy rule to return.

Responses

200
A successful policy rule details response

Response Body

object

A Policy Rule, the combination of a Scope, a Touchpoint, Conditions, and Actions. It allows you to define what needs to happen (Actions) before a user can execute a sensitive operation (Touchpoint) on a Scope (e.g. a Wallet) depending on the specific details of the operation (Conditions). See Concepts.
  • 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.
  • uniqueId string required
    The uniqueId of the Policy Rule version. A UUID.
  • name string required
    Human readable name of the rule.
  • status string enum 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.
    • UNLOCK_PENDING - This version of the policy rule is created when a request to unlock a policy is initiated.
    ACTIVEINACTIVEDENIEDPENDING_APPROVALUNLOCK_PENDING
  • version integer
    The Policy Rule Version, an integer that is incremented each time the Policy Rule changes.

    Defaults to 1

  • adminOnly boolean required
    true, if the Policy Rule is a BitGo internal rule. Typically, this allows setting Global Policy Rules across enterprises.
  • touchpointId string required
    The id of the Touchpoint associated with the Policy Rule. A UUID.
  • touchpointLabel string required
    Label of the Touchpoint associated with the Policy Rule. For example the Transfer from a Wallet Touchpoint.
  • scopeId string required
    The id of the Scope associated with the Policy Rule. A UUID.
  • scopeLabel string required
    Label of the Scope associated with the Policy Rule. For example the All Wallets Scope.
  • clauses array of objects required
    List of Policy Rule Clauses: a combination of Conditions and Actions.
    clauses object
    • actions array of objects

      ANY OF

      • name string enum required
        Name of the associated Action.
        approvals.always.deny
    • conditions array of objects

      ANY OF

      • name string enum required
        Name of the condition.
        transfer.amount
      • parameters object required
        Data required to evaluate the condition.
        parameters object
        • operator string enum required
          The comparison operator to use when comparing the transfer amount with the given limit
          >>=<<=
        • amount string required
          The transfer amount is compared with this limit.
        • coin string required
          This condition only applies to transfers of this currency (USD applies to all transfers).
      • operator string enum
        Boolean operators that join Conditions, and/or Actions. Must be null on the last Condition or Action, or if there is only one Condition or Action, must be non-null on all others.
        ANDOR
  • filteringConditions array of objects required
    List of Filtering Conditions that must trigger for this Policy Rule to be Evaluated.

    ANY OF

    • name string enum required
      Name of the condition.
      wallet.type
    • parameters object required
      Required data needed to evaluate the Filtering Condition.
      parameters object
      • walletType array of string enums required
        hotcustodialtrading
  • locked boolean required
    true, if the Policy Rule is locked, false otherwise.
  • lockType string enum required

    Indicates how the Policy Rule is locked.

    • LOCK_AFTER_DATE - Will lock after the lockDate set on the Policy Rule.
    • PERMANENT - Is permanently locked.
    LOCK_AFTER_DATEPERMANENT
  • lockDate string date-time
    The date after which the Policy Rule will be locked. Only applicable if the Policy Rule is locked with LOCK_AFTER_DATE.
  • enterpriseId string
    The id of the Enterprise this Policy Rule belongs to.
  • organizationId string
    The id of the Organization this Policy Rule belongs to.
  • lastTriggeredDate string date-time
    The date when the Policy Rule was last triggered. Only applicable if the Policy Rule is locked with LOCK_AFTER_DATE.
  • lastTriggeredEvaluationId string
    The id of the Evaluation that last triggered the Policy Rule. A UUID.
  • createdBy string required
    The id of the user who created the Policy Rule or the string "BitGo".
  • modifiedBy string required
    The id of the user who last modified the Policy Rule or the string "BitGo".
  • createdDate string date-time required
    The date when the Policy Rule was created. A timestamp.
  • modifiedDate string date-time required
    The date when the Policy Rule was last modified. A timestamp.
  • lockModifiedBy string
    The id of the user who last modified the lock of the Policy Rule.
  • evaluationId string
    The id of the Evaluation that was done when this Policy Rule version was requested to be created, modified or deleted. A UUID.
401
Unauthorized

Response Body

object

  • code string
  • message string
  • status integer
403
Forbidden

Response Body

object

  • code string
  • message string
  • status integer
404
The specified resource was not found

Response Body

object

  • code string
  • message string
  • status integer
500
Server Error - Transient error please try again

Response Body

object

  • code string
  • message string
  • status integer