> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primeintellect.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Sandbox Egress Policy Endpoint

> Get the desired and applied egress policy of a VM sandbox.

## Rate Limit

300 requests per 60 seconds per IP and token per sandbox.


## OpenAPI

````yaml https://api.primeintellect.ai/api/v1/sandbox/openapi.json get /api/v1/sandbox/{sandbox_id}/egress-policy
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/sandbox/{sandbox_id}/egress-policy:
    get:
      tags:
        - Sandbox
      summary: Get Sandbox Egress Policy Endpoint
      description: Get the desired and applied egress policy of a VM sandbox.
      operationId: >-
        get_sandbox_egress_policy_endpoint_api_v1_sandbox__sandbox_id__egress_policy_get
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            title: Sandbox Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxEgressPolicyStatusResponse'
        '401':
          description: Authorization failed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SandboxEgressPolicyStatusResponse:
      properties:
        policy:
          $ref: '#/components/schemas/SandboxEgressPolicyBody'
        generation:
          type: integer
          minimum: 0
          title: Generation
          description: Desired policy generation persisted by the platform.
        applied_generation:
          type: integer
          minimum: -1
          title: Applied Generation
          description: >-
            Generation last reported applied by the sandbox's node, or -1 when
            no network policy has been successfully applied.
        applied:
          type: boolean
          title: Applied
          description: >-
            Whether the node reports the exact desired generation as applied.
            Never derived from the platform database alone.
      type: object
      required:
        - policy
        - generation
        - applied_generation
        - applied
      title: SandboxEgressPolicyStatusResponse
      description: Desired vs applied egress policy state for a VM sandbox.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SandboxEgressPolicyBody:
      properties:
        allowlist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowlist
        denylist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Denylist
        rules:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/VmHeaderRule'
              type: object
            - type: 'null'
          title: Rules
      type: object
      title: SandboxEgressPolicyBody
      description: 'The desired egress policy: at most one list is non-null.'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VmHeaderRule:
      properties:
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
      type: object
      required:
        - headers
      title: VmHeaderRule
      description: |-
        Headers to set on HTTPS requests to one rule host.

        Each value is a template that may contain "${prime.secrets.<name>}"
        references; a set header replaces any same-name header the sandbox sent.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````