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

# Get a job

> Its status and counters; poll it while the job runs.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs/v2-json get /api/v2/projects/{projectId}/jobs/{jobId}
openapi: 3.0.0
info:
  title: MentionLab Public API v2
  description: ''
  version: 0.6.48
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/v2/projects/{projectId}/jobs/{jobId}:
    get:
      tags:
        - Jobs
      summary: Get a job
      description: Its status and counters; poll it while the job runs.
      operationId: JobsV2Controller_get_v2
      parameters:
        - name: jobId
          required: true
          in: path
          schema:
            type: string
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
        - name: projectId
          required: true
          in: path
          schema:
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobV2Response'
        '400':
          description: >-
            The request failed validation: the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: No such job in the project
components:
  schemas:
    JobV2Response:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the job, used to poll it and to list its executions
        status:
          type: string
          enum:
            - pending
            - processing
            - syncing
            - completed
            - failed
            - partial_failed
          description: >-
            Where the job stands. `syncing`: every execution is over and the
            results are not all readable yet
        createdBy:
          nullable: true
          description: Who launched the job; null for a scheduled job or an API key
          type: object
          allOf:
            - $ref: '#/components/schemas/JobCreatorV2'
        scheduleId:
          type: string
          format: uuid
          nullable: true
          description: >-
            The schedule that launched the job; null for a manual launch or a
            deleted schedule
        spentCredits:
          type: integer
          nullable: true
          description: Credits charged at launch, before any refund; null when not recorded
        totalExecutionCount:
          type: integer
          description: 'Executions the job holds: one per query, model and repeat'
        pendingExecutionCount:
          type: integer
          description: Executions with no answer yet
        retryingExecutionCount:
          type: integer
          description: Executions that failed an attempt and wait for another
        succeededExecutionCount:
          type: integer
          description: Executions that came back with an answer
        failedExecutionCount:
          type: integer
          description: Executions that gave up, their attempts spent
        themeAnalysis:
          type: string
          enum:
            - pending
            - processing
            - done
          nullable: true
          description: >-
            Where the theme analysis of the job's answers stands; null when the
            project runs none
          example: done
        createdAt:
          type: string
          format: date-time
          description: When the job was launched
        updatedAt:
          type: string
          format: date-time
          description: When a counter or the status last moved; a poller watches this
      required:
        - id
        - status
        - createdBy
        - scheduleId
        - spentCredits
        - totalExecutionCount
        - pendingExecutionCount
        - retryingExecutionCount
        - succeededExecutionCount
        - failedExecutionCount
        - themeAnalysis
        - createdAt
        - updatedAt
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode
    JobCreatorV2:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the user who launched the job
          example: 9f1c2d3e-4a5b-4c6d-8e7f-0a1b2c3d4e5f
        firstName:
          type: string
          description: Given name on that user's profile
          example: Ada
        lastName:
          type: string
          description: Family name on that user's profile
          example: Lovelace
        email:
          type: string
          description: Address that user signs in with
          example: ada.lovelace@example.com
      required:
        - id
        - firstName
        - lastName
        - email

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.