Blockstream Enterprise
ReferenceAPI ReferencePolicies

Get Policies

Get Policies.

Request

PoliciesGetRequest
interface PoliciesGetRequest {
  action: 'get'
  resource: string
  details?: {} | undefined
}

Prop

Type

Response

PoliciesGetResponse_success
interface PoliciesGetResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    plid: string
    name: string
    description: string | undefined
    resource: string
    action: string
    priority: number
    expression: string
    decision_on_true: 'ALLOW' | 'DENY' | 'REVIEW'
    review_expression: string | undefined
    created_at: string
    updated_at: string
    created_by: string
    updated_by: string
    status: 'success' | 'pending' | 'failed' | 'unauthorized' | 'rejected'
  }
  metadata: unknown
}

Prop

Type

PoliciesGetResponse_failed | pending | unauthorized | rejected
interface PoliciesGetResponse_failed | pending | unauthorized | rejected {
  status: 'failed' | 'pending' | 'unauthorized' | 'rejected'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
}

Prop

Type

Example

Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof resourceSchema.shape.policies.shape.get
>(
  {
    action: 'get',
    resource: '/policies/{id}',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page