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

# Get policy

> Gets the currently active policy in Oso Cloud. The policy is expressed as a string containing [Polar](https://www.osohq.com/docs/modeling-in-polar/reference) code.



## OpenAPI

````yaml get /policy
openapi: 3.1.0
info:
  title: Oso Cloud HTTP API
  version: 0.1.0
  description: >-
    <p>Oso Cloud exposes an HTTP API that you can use to make queries directly,
    without using one of the clients.</p><p>For endpoints that require
    authentication, pass your API key as an HTTP Bearer Auth payload.</p><p>For
    example, using curl: <code>curl -H &quot;Authorization: Bearer
    $OSO_AUTH&quot; https://cloud.osohq.com/api/</code></p>
servers:
  - url: https://api.osohq.com/api/
security: []
paths:
  /policy:
    get:
      tags:
        - Policy
      description: >-
        Gets the currently active policy in Oso Cloud. The policy is expressed
        as a string containing
        [Polar](https://www.osohq.com/docs/modeling-in-polar/reference) code.
      operationId: get_policy
      parameters:
        - name: id
          in: query
          schema:
            type: integer
            format: int64
            nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPolicyResult'
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - ApiKey: []
components:
  schemas:
    GetPolicyResult:
      type: object
      properties:
        policy:
          allOf:
            - $ref: '#/components/schemas/Policy'
          nullable: true
    ApiError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Policy:
      type: object
      required:
        - src
      properties:
        filename:
          type: string
          nullable: true
        src:
          type: string
  securitySchemes:
    ApiKey:
      description: Requires an API key to access.
      type: http
      scheme: bearer
      bearerFormat: Bearer e_0123_123_token0123

````