---
title: "Get governance policy"
method: GET
path: "/policies/{policyName}"
tags: ["policies"]
---

# Get governance policy

`GET /policies/{policyName}`

## Request

- Base URL: `https://api.blaxel.ai/v0`
- URL: `https://api.blaxel.ai/v0/policies/{policyName}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `/oauth/authorize`
    - Client credentials
    - Token URL: `/oauth/token` scopes: `policies:get`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/blaxel/apis/blaxel-control-plane/docs/policies/:policyName/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns detailed information about a governance policy including its type (location, flavor, or maxToken), restrictions, and which resource types it applies to.

## Response `200`

successful operation

- Policy: Rule that controls how a deployment is made and served (e.g. location restrictions)
  - `metadata` Metadata, required: Owner fields for Persistence
    - `createdAt` string: The date and time when the resource was created
    - `updatedAt` string: The date and time when the resource was updated
    - `createdBy` string: The user or service account who created the resource
    - `updatedBy` string: The user or service account who updated the resource
    - `displayName` string: Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
    - `externalId` string: Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
    - `labels` MetadataLabels: Key-value pairs for organizing and filtering resources. Labels can be used to categorize resources by environment, project, team, or any custom taxonomy.
    - `name` string, required: Unique identifier for the resource within the workspace. Must be lowercase alphanumeric with hyphens, max 49 characters. Immutable after creation.
    - `plan` string: Billing plan tier applied to this resource (inherited from workspace account)
    - `url` string: Auto-generated endpoint URL for accessing this resource (for agents, functions, models, sandboxes)
    - `workspace` string: Name of the workspace this resource belongs to (read-only, set automatically)
  - `spec` PolicySpec, required: Policy specification
    - `flavors` Flavor[]: Types of hardware available for deployments
      - `name` string: Flavor name (e.g. t4)
      - `type` 'cpu' | 'gpu': Flavor type (e.g. cpu, gpu)
    - `locations` PolicyLocation[]: PolicyLocations is a local type that wraps a slice of Location
      - `name` string: Policy location name
      - `type` 'location' | 'country' | 'continent': Policy location type
    - `maxTokens` PolicyMaxTokens: PolicyMaxTokens is a local type that wraps a slice of PolicyMaxTokens
      - `granularity` string: Granularity
      - `input` integer: Input
      - `output` integer: Output
      - `ratioInputOverOutput` integer: RatioInputOverOutput
      - `step` integer: Step
      - `total` integer: Total
    - `resourceTypes` PolicyResourceType[]: PolicyResourceTypes is a local type that wraps a slice of PolicyResourceType
    - `sandbox` boolean: Sandbox mode
    - `type` 'location' | 'flavor' | 'maxToken': Policy type, can be location or flavor
  - `usage` PolicyUsageCounts: Per-resource counts of how many resources reference a policy. Computed by the policies listing endpoint to avoid client-side fan-out across the agents/models/functions/sandboxes/jobs listings.
    - `agents` integer
    - `functions` integer
    - `jobs` integer
    - `models` integer
    - `sandboxes` integer

---

[API](https://skmtc.dev/blaxel/apis/blaxel-control-plane.md) - [All operations](https://skmtc.dev/blaxel/apis/blaxel-control-plane/llms.txt) - [OpenAPI document](https://skmtc.dev/blaxel/apis/blaxel-control-plane/revisions/dfa264bc72ee?raw)
