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

# Get all policies



## OpenAPI

````yaml get /v1/sla/policy
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: '1.0'
  contact: {}
servers:
  - url: https://sla.thena.ai
security: []
tags:
  - name: Thena Platform APIs
    description: ''
paths:
  /v1/sla/policy:
    get:
      tags:
        - SLA Policies
      summary: Get all policies
      parameters:
        - name: teamId
          required: true
          in: query
          description: The unique identifier of the team
          schema:
            example: team-123456
            type: string
        - name: entityType
          required: true
          in: query
          description: The type of the entity
          schema:
            example: ticket
            type: string
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CommonSLAPolicyResponse'
        '401':
          description: User is not authenticated!
        '403':
          description: User does not have access to this resource!
        '404':
          description: Resource not found!
        '429':
          description: Too many requests!
        '500':
          description: Something went wrong!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    CommonSLAPolicyResponse:
      type: object
      properties:
        name:
          type: string
          description: The name of the policy
          example: High Priority Ticket SLA
        description:
          type: string
          description: The description of the policy
          example: SLA policy for handling high priority tickets
        entityType:
          type: string
          description: The type of the entity
          example: ticket
        filter:
          description: The filter of the policy
          allOf:
            - $ref: '#/components/schemas/TopLevelFilterDto'
        policyMetrics:
          description: The metrics of the policy
          type: array
          items:
            $ref: '#/components/schemas/PolicyMetricDto'
        pauseConditions:
          description: The pause conditions of the policy
          allOf:
            - $ref: '#/components/schemas/TopLevelFilterDto'
        teamId:
          type: string
          description: The unique identifier of the team
        organizationId:
          type: string
          description: The unique identifier of the organization
        version:
          type: number
          description: The version number of the policy
        priority:
          type: number
          description: The priority of the policy
        isActive:
          type: boolean
          description: Whether the policy is active
        uid:
          type: string
          description: The unique identifier string of the policy
        createdAt:
          format: date-time
          type: string
          description: The creation timestamp of the policy
        updatedAt:
          format: date-time
          type: string
          description: The last update timestamp of the policy
      required:
        - name
        - description
        - entityType
        - filter
        - policyMetrics
        - pauseConditions
        - teamId
        - organizationId
        - version
        - priority
        - isActive
        - uid
        - createdAt
        - updatedAt
    TopLevelFilterDto:
      type: object
      properties:
        all:
          description: All conditions that must be met
          example:
            - entity: ticket
              field: status
              operator: equals
              values:
                - label: Open
          type: array
          items:
            $ref: '#/components/schemas/FilterDto'
        any:
          description: Any of these conditions must be met
          example:
            - entity: ticket
              field: priority
              operator: in
              values:
                - label: High Priority
                - label: Medium Priority
          type: array
          items:
            $ref: '#/components/schemas/FilterDto'
    PolicyMetricDto:
      type: object
      properties:
        metric:
          type: string
          description: The type of SLA metric
          enum:
            - first_time_response
            - next_time_response
            - total_resolution_time
            - update_time
          example: FIRST_RESPONSE_TIME
        default:
          type: boolean
          description: Whether this is the default metric
          example: true
        durationInMinutes:
          type: string
          description: The duration in minutes for the metric
          example: '120'
        specific:
          description: Specific filters for this metric
          example:
            - entity: ticket
              field: priority
              operator: equals
              values:
                - label: High Priority
              durationInMinutes: '60'
          type: array
          items:
            $ref: '#/components/schemas/FilterDto'
      required:
        - metric
        - default
        - durationInMinutes
    FilterDto:
      type: object
      properties:
        entity:
          type: string
          description: The entity of the filter
          example: ticket
        field:
          type: string
          description: The field of the filter
          example: priority
        operator:
          type: string
          description: The operator of the filter
          example: equals
        values:
          description: The values of the filter
          example:
            - label: High Priority
          type: array
          items:
            $ref: '#/components/schemas/FilterValueDto'
        durationInMinutes:
          type: string
          description: The duration in minutes of the filter
          example: '60'
      required:
        - entity
        - field
        - operator
        - values
    FilterValueDto:
      type: object
      properties:
        label:
          type: string
          description: The label of the filter value
          example: High Priority
        id:
          type: string
          description: The id of the filter value
          example: priority-1
      required:
        - label

````