> ## 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 the duration left for a job



## OpenAPI

````yaml get /v1/sla/duration
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/duration:
    get:
      tags:
        - SLA Duration
      summary: Get the duration left for a job
      parameters:
        - name: organizationId
          required: true
          in: query
          description: The unique identifier of the organization
          schema:
            example: org-123456
            type: string
        - name: teamId
          required: true
          in: query
          description: The unique identifier of the team
          schema:
            example: team-123456
            type: string
        - name: entityId
          required: true
          in: query
          description: The unique identifier of the entity
          schema:
            example: entity-123456
            type: string
        - name: entityType
          required: true
          in: query
          description: The type of the entity
          schema:
            example: issue
            type: string
        - name: metric
          required: true
          in: query
          description: The metric to be used for the SLA job
          schema:
            example: response_time
            enum:
              - first_time_response
              - next_time_response
              - total_resolution_time
              - update_time
            type: string
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobDurationLeftResponse'
        '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:
    JobDurationLeftResponse:
      type: object
      properties:
        durationToBreachWorkingMinutes:
          type: number
          description: The remaining duration in working minutes until SLA breach
          example: 120
        status:
          type: string
          description: The current status of the SLA job
          example: running
          enum:
            - scheduled
            - running
            - achieved
            - breached
            - cancelled
            - paused
            - not_scheduled
            - resumed
        nextAttemptAt:
          format: date-time
          type: string
          description: The timestamp for the scheduled next attempt
          example: '2024-03-21T10:00:00Z'
        pausedAt:
          format: date-time
          type: string
          description: The timestamp when the job was paused
          example: '2024-03-21T10:00:00Z'
        resumedAt:
          format: date-time
          type: string
          description: The timestamp when the job was resumed
          example: '2024-03-21T10:00:00Z'
        pausedDurationInWorkingMinutes:
          type: number
          description: The paused duration in working minutes
          example: 120
        breachedAt:
          format: date-time
          type: string
          description: The timestamp when the job was breached
          example: '2024-03-21T10:00:00Z'
        achievedAt:
          format: date-time
          type: string
          description: The timestamp when the job was achieved
          example: '2024-03-21T10:00:00Z'
        cancelledAt:
          format: date-time
          type: string
          description: The timestamp when the job was cancelled
          example: '2024-03-21T10:00:00Z'
        createdAt:
          format: date-time
          type: string
          description: The timestamp when the job was created
          example: '2024-03-21T10:00:00Z'
      required:
        - durationToBreachWorkingMinutes
        - status
        - nextAttemptAt
        - pausedAt
        - resumedAt
        - pausedDurationInWorkingMinutes
        - breachedAt
        - achievedAt
        - cancelledAt
        - createdAt

````