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

# Get logs for a Job

> Retrieve the logs for the Job with the specified Id. Required permissions: `ViewJobs`. *Note:* This is a beta endpoint with known limitations.



## OpenAPI

````yaml /api-specs/cloud/public-api.yaml get /api/jobs/beta/jobs/{jobId}/logs
openapi: 3.0.3
info:
  title: Domino Public API
  description: Domino Public API Endpoints
  version: cloud
servers: []
security:
  - DominoApiKey: []
  - BearerAuthentication: []
tags:
  - name: AIGateway
  - name: AppInstances
  - name: AppVersions
  - name: Apps
  - name: AsyncPredictions
  - name: AuditTrail
  - name: BillingTag
  - name: BillingTagSettings
  - name: Cost
  - name: CustomMetrics
  - name: DataSource
  - name: DatasetRw
  - name: DeploymentTargets
  - name: Environments
  - name: Extensions
  - name: GenAI
  - name: HardwareTier
  - name: Jobs
  - name: ModelAPI
  - name: ModelAPIVersion
  - name: ModelDeployment
  - name: Organizations
  - name: PPM
  - name: PersonalAccessToken
  - name: ProjectSharedDatasets
  - name: ProjectTemplates
  - name: Projects
  - name: ProjectsCommits
  - name: ProjectsFiles
  - name: RegisteredModels
  - name: ServiceAccounts
  - name: Users
  - name: Workspaces
paths:
  /api/jobs/beta/jobs/{jobId}/logs:
    get:
      tags:
        - Jobs
      summary: Get logs for a Job
      description: >-
        Retrieve the logs for the Job with the specified Id. Required
        permissions: `ViewJobs`. *Note:* This is a beta endpoint with known
        limitations.
      operationId: getJobLogs
      parameters:
        - description: Id of job to get logs for
          in: path
          name: jobId
          required: true
          schema:
            type: string
        - description: Type of log to retrieve. Case insensitive.
          in: query
          name: logType
          required: false
          schema:
            enum:
              - stdOut
              - stdErr
              - prepareOutput
              - complete
            type: string
        - description: >-
            Max number of log lines to fetch. Will not retrieve over 10000 log
            lines at a time.
          in: query
          name: limit
          required: false
          schema:
            type: integer
        - description: The epoch time in nanoseconds to start fetching from
          in: query
          name: latestTimeNano
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsEnvelopeV1'
          description: Success
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    LogsEnvelopeV1:
      properties:
        logs:
          $ref: '#/components/schemas/JobLogsV1'
        metadata:
          properties:
            notices:
              description: Notices relating to the request
              items:
                type: string
              type: array
            pagination:
              $ref: '#/components/schemas/LogsPaginationV1'
            requestId:
              description: Id used to correlate a request with server actions.
              example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
              type: string
          required:
            - pagination
            - requestId
            - notices
          type: object
      required:
        - logs
        - metadata
      type: object
    JobLogsV1:
      properties:
        helpLink:
          description: Suggestion link for helpful resources.
          example: Error. No such file or directory.
          type: string
        isComplete:
          description: Whether all logs for the job have been retrieved.
          example: true
          type: boolean
        logContent:
          items:
            $ref: '#/components/schemas/LogContentV1'
          type: array
        problem:
          description: Description of issue that occurred in a job.
          example: >-
            python: can't open file 'invalid.py': [Errno 2] No such file or
            directory
          type: string
      required:
        - logContent
        - isComplete
      type: object
    LogsPaginationV1:
      properties:
        latestTimeNano:
          description: >-
            Time of last log. Can be used to specify only logs after a certain
            time.
          example: '1647051415275957459'
          type: string
        limit:
          description: Max number of log messages to retrieve.
          example: 10
          type: integer
      required:
        - limit
      type: object
    FailureEnvelopeV1:
      properties:
        errors:
          description: Errors that caused a request to fail
          items:
            type: string
          type: array
        requestId:
          description: Id used to correlate a request with server actions.
          example: bbd78579-93c4-45ee-a983-0d5c8da6d5b1
          type: string
      required:
        - requestId
        - errors
      type: object
    LogContentV1:
      properties:
        log:
          description: Log message
          example: >-
            Pulling image
            "172.20.22.242:5000/noahjax11699-compute/environment:622a6879dde1a920fcccfef5-1"
          type: string
        logType:
          $ref: '#/components/schemas/LogTypeV1'
        size:
          description: Length of log line.
          example: 94
          type: integer
        timestamp:
          description: Time logs were written.
          example: '2022-03-12T02:13:51.616Z'
          format: date-time
          type: string
      required:
        - timestamp
        - logType
        - log
        - size
      type: object
    LogTypeV1:
      description: Type of log. Complete includes all log types.
      enum:
        - stdOut
        - stdErr
        - prepareOutput
        - complete
      type: string
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: >-
        The current user cannot perform this operation because they are not
        logged in
    '403':
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FailureEnvelopeV1'
      description: The current user is not authorized to perform this operation
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  securitySchemes:
    DominoApiKey:
      in: header
      name: X-Domino-Api-Key
      type: apiKey
    BearerAuthentication:
      in: header
      name: Authorization
      type: apiKey

````