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

# Get task run logs

> Get a page of a task run's own logs.

Page with `since`; a page ends with `nextSince`, null once the run has
finished and every line has been returned.

An empty page means nothing new has been logged yet, not that the run is
over: keep polling while `nextSince` is non-null. Nothing here ever says
"give up" — a run that never starts never logs, so what bounds the polling
is the run's own state from `GET /task-runs/{taskRunId}`, not this endpoint.



## OpenAPI

````yaml https://api.cloud.wherobots.com/openapi.json get /task-runs/{taskRunId}/logs
openapi: 3.1.0
info:
  title: Wherobots Cloud API
  description: |-
    Wherobots Cloud API OpenAPI specification.

        These are the API docs for the Wherobots API. You can use this to test out the API and see what it does.
        The underlying OPENAPI spec can be found at /openapi.json. This can be used to generate clients for the API.

        The Authorize button below will allow you to input an access token to authenticate to our API.
        Then all of the requests on the page should work.
        
  version: 0.0.1
servers:
  - url: https://api.cloud.wherobots.com
    description: Wherobots Cloud API
security: []
paths:
  /task-runs/{taskRunId}/logs:
    get:
      tags:
        - task-runs
      summary: Get task run logs
      description: >-
        Get a page of a task run's own logs.


        Page with `since`; a page ends with `nextSince`, null once the run has

        finished and every line has been returned.


        An empty page means nothing new has been logged yet, not that the run is

        over: keep polling while `nextSince` is non-null. Nothing here ever says

        "give up" — a run that never starts never logs, so what bounds the
        polling

        is the run's own state from `GET /task-runs/{taskRunId}`, not this
        endpoint.
      operationId: getTaskRunLogs
      parameters:
        - name: taskRunId
          in: path
          required: true
          schema:
            type: string
            description: The id of the task run.
            title: Taskrunid
          description: The id of the task run.
        - name: since
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$
              - type: 'null'
            description: >-
              Only return lines logged after this instant, exclusive: the
              previous page's nextSince. A UTC RFC 3339 instant with up to
              nanosecond precision, e.g. '2026-06-04T18:01:12.680610267Z'. Omit
              for the first page.
            title: Since
          description: >-
            Only return lines logged after this instant, exclusive: the previous
            page's nextSince. A UTC RFC 3339 instant with up to nanosecond
            precision, e.g. '2026-06-04T18:01:12.680610267Z'. Omit for the first
            page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunLogsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: No task run of this id the caller's organization owns
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '410':
          description: The run's logs are past retention
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '502':
          description: The log store could not return the logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerToken: []
        - wherobotsApiKey: []
components:
  schemas:
    TaskRunLogsResponse:
      properties:
        taskRunId:
          type: string
          title: Taskrunid
        items:
          items:
            $ref: '#/components/schemas/TaskRunLogEntry'
          type: array
          title: Items
        nextSince:
          anyOf:
            - type: string
              pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$
              description: >-
                A UTC instant carried to the nanosecond, e.g.
                '2026-06-04T18:01:12.680610267Z'. A string, not a date-time: log
                timestamps are nanoseconds, and every datetime type in this
                stack rounds them off to microseconds. Emitted with as many
                fractional digits as the value needs, up to 9; 0 to 9 are
                accepted.
              example: '2026-06-04T18:01:12.680610267Z'
            - type: 'null'
          title: Nextsince
      type: object
      required:
        - taskRunId
      title: TaskRunLogsResponse
      description: |-
        e.g.
        {
          "taskRunId": "npqy9q19q4wlm3",
          "items": [
            {"timestamp": "2026-06-04T18:01:12.680610267Z", "level": "INFO",
             "message": "Starting SAM 3 inference."}
          ],
          "nextSince": "2026-06-04T18:01:12.680610267Z"
        }
    ErrorBody:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorInfo'
          type: array
          title: Errors
          description: A list of errors that occurred
        requestId:
          type: string
          title: Requestid
          description: A unique identifier for the request that caused the error
      type: object
      required:
        - errors
        - requestId
      title: ErrorBody
    TaskRunLogEntry:
      properties:
        timestamp:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$
          title: Timestamp
          description: >-
            A UTC instant carried to the nanosecond, e.g.
            '2026-06-04T18:01:12.680610267Z'. A string, not a date-time: log
            timestamps are nanoseconds, and every datetime type in this stack
            rounds them off to microseconds. Emitted with as many fractional
            digits as the value needs, up to 9; 0 to 9 are accepted.
          example: '2026-06-04T18:01:12.680610267Z'
        level:
          type: string
          title: Level
        message:
          type: string
          title: Message
      type: object
      required:
        - timestamp
        - level
        - message
      title: TaskRunLogEntry
      description: |-
        e.g. {"timestamp": "2026-06-04T18:01:12.680610267Z", "level": "INFO",
              "message": "Starting SAM 3 inference."}

        ``level`` is whatever the log backend parsed out of the line, "UNKNOWN"
        when it could not tell.
    ErrorInfo:
      properties:
        code:
          $ref: '#/components/schemas/ErrorClass'
          description: The error code
        message:
          type: string
          title: Message
          description: A human-readable message describing the error
        details:
          type: string
          title: Details
          description: Details about the error
        path:
          type: string
          title: Path
          description: The path to the field that caused the error
        suggestion:
          type: string
          title: Suggestion
          description: Suggested action to resolve the error
          default: >-
            Contact us at support@wherobots.com to get help with resolving your
            error.
        documentation_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentation Url
          description: URL to related documentation
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
          description: The field that caused the error if applicable
      type: object
      required:
        - code
        - message
        - details
        - path
      title: ErrorInfo
    ErrorClass:
      type: string
      enum:
        - BAD_REQUEST_ERROR
        - CONFLICT_ERROR
        - INVALID_INPUT_ERROR
        - INTERNAL_SERVER_ERROR
        - UNAUTHORIZED_ERROR
        - INSUFFICIENT_PERMISSIONS_ERROR
        - THIRD_PARTY_PERMISSIONS_ERROR
        - NOT_FOUND_ERROR
        - INSUFFICIENT_QUOTA_ERROR
        - REQUEST_ENTITY_TOO_LARGE
        - FOREIGN_CATALOG_CONNECTION_FAILED
        - RATE_LIMIT_ERROR
        - RESOURCE_BUSY
        - TIMEOUT_ERROR
        - ACCOUNT_NOT_PROVISIONED
        - BAD_GATEWAY_ERROR
        - GATEWAY_TIMEOUT_ERROR
        - NOT_IMPLEMENTED_ERROR
        - GONE_ERROR
      title: ErrorClass
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
    wherobotsApiKey:
      type: apiKey
      description: A Wherobots-generated API key
      in: header
      name: X-API-Key

````

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