Hatchet Log API

The Log API from Hatchet — 3 operation(s) for log.

Documentation

Specifications

Code Examples

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-task-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-workflow-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-event-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-filter-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-webhook-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-task-event-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-v1-log-line-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-tenant-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-worker-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-rate-limit-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-api-token-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/json-schema/hatchet-workflow-schema.json

Other Resources

🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-task-get-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-workflow-run-trigger-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-event-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-filter-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-task-cancel-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-task-replay-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/v1-log-line-list-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/rate-limit-upsert-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/webhook-worker-create-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/hatchet/refs/heads/main/examples/worker-list-example.json
🔗
SDKs
https://pypi.org/project/hatchet-sdk/
🔗
SDKs
https://www.npmjs.com/package/@hatchet-dev/typescript-sdk
🔗
SDKs
https://github.com/hatchet-dev/hatchet/tree/main/sdks/go
🔗
SDKs
https://github.com/hatchet-dev/hatchet/tree/main/sdks/ruby
🔗
SelfHosting
https://docs.hatchet.run/self-hosting
🔗
SourceCode
https://github.com/hatchet-dev/hatchet

OpenAPI Specification

hatchet-log-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 1.0.0
  title: Hatchet API Token Log API
  description: The Hatchet API
servers:
- url: ''
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: Log
paths:
  /api/v1/stable/tasks/{task}/logs:
    get:
      x-resources:
      - tenant
      - task
      description: Lists log lines for a task
      operationId: v1-log-line:list
      parameters:
      - description: The task id
        in: path
        name: task
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The number to limit by
        in: query
        name: limit
        required: false
        schema:
          type: integer
          format: int64
      - description: The start time to get logs for
        in: query
        name: since
        required: false
        schema:
          type: string
          format: date-time
      - description: The end time to get logs for
        in: query
        name: until
        required: false
        schema:
          type: string
          format: date-time
      - description: A full-text search query to filter for
        in: query
        name: search
        required: false
        schema:
          type: string
      - description: The log level(s) to include
        in: query
        name: levels
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/V1LogLineLevel'
      - description: The direction to order by
        in: query
        name: order_by_direction
        required: false
        schema:
          $ref: '#/components/schemas/V1LogLineOrderByDirection'
      - description: The attempt number to filter for
        in: query
        name: attempt
        required: false
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1LogLineList'
          description: Successfully listed the events
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: List Log Lines
      tags:
      - Log
  /api/v1/stable/tenants/{tenant}/logs:
    get:
      x-resources:
      - tenant
      description: Lists log lines for a tenant
      operationId: v1-tenant-log-line:list
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The number to limit by
        in: query
        name: limit
        required: false
        schema:
          type: integer
          format: int64
      - description: The start time to get logs for
        in: query
        name: since
        required: false
        schema:
          type: string
          format: date-time
      - description: The end time to get logs for
        in: query
        name: until
        required: false
        schema:
          type: string
          format: date-time
      - description: A full-text search query to filter for
        in: query
        name: search
        required: false
        schema:
          type: string
      - description: The log level(s) to include
        in: query
        name: levels
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/V1LogLineLevel'
      - description: The direction to order by
        in: query
        name: order_by_direction
        required: false
        schema:
          $ref: '#/components/schemas/V1LogLineOrderByDirection'
      - description: The attempt number to filter for
        in: query
        name: attempt
        required: false
        schema:
          type: integer
      - description: The task external ID(s) to filter by
        in: query
        name: taskExternalIds
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
            minLength: 36
            maxLength: 36
      - description: The workflow id(s) to filter for
        in: query
        name: workflow_ids
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
            minLength: 36
            maxLength: 36
      - description: The step id(s) to filter for
        in: query
        name: step_ids
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
            minLength: 36
            maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1LogLineList'
          description: Successfully listed the logs
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
      summary: List Log Lines
      tags:
      - Log
  /api/v1/stable/tenants/{tenant}/log-point-metrics:
    get:
      x-resources:
      - tenant
      description: Get a minute by minute breakdown of log metrics for a tenant
      operationId: v1-tenant-log-line:get:point-metrics
      parameters:
      - description: The tenant id
        in: path
        name: tenant
        required: true
        schema:
          type: string
          format: uuid
          minLength: 36
          maxLength: 36
      - description: The start time to get logs for
        in: query
        name: since
        required: false
        schema:
          type: string
          format: date-time
      - description: The end time to get logs for
        in: query
        name: until
        required: false
        schema:
          type: string
          format: date-time
      - description: A full-text search query to filter for
        in: query
        name: search
        required: false
        schema:
          type: string
      - description: The log level(s) to include
        in: query
        name: levels
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/V1LogLineLevel'
      - description: The task external ID(s) to filter by
        in: query
        name: taskExternalIds
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
            minLength: 36
            maxLength: 36
      - description: The workflow id(s) to filter for
        in: query
        name: workflow_ids
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
            minLength: 36
            maxLength: 36
      - description: The step id(s) to filter for
        in: query
        name: step_ids
        required: false
        schema:
          type: array
          items:
            type: string
            format: uuid
            minLength: 36
            maxLength: 36
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1LogsPointMetrics'
          description: Successfully retrieved the log point metrics
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: A malformed or bad request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Forbidden
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrors'
          description: Not implemented
      summary: Get Log Point Metrics
      tags:
      - Log
components:
  schemas:
    V1LogLine:
      properties:
        createdAt:
          type: string
          format: date-time
          description: The creation date of the log line.
        message:
          type: string
          description: The log message.
        metadata:
          type: object
          description: The log metadata.
        taskExternalId:
          type: string
          description: The external ID of the task associated with the log line.
          format: uuid
          minLength: 36
          maxLength: 36
        taskDisplayName:
          type: string
          description: The display name of the task associated with the log line.
        retryCount:
          type: integer
          description: The retry count of the log line.
        attempt:
          type: integer
          description: The attempt number of the log line.
        level:
          $ref: '#/components/schemas/V1LogLineLevel'
          description: The log level.
      required:
      - createdAt
      - message
      - metadata
    PaginationResponse:
      type: object
      properties:
        current_page:
          type: integer
          description: the current page
          format: int64
          example: 2
        next_page:
          type: integer
          description: the next page
          format: int64
          example: 3
        num_pages:
          type: integer
          description: the total number of pages for listing
          format: int64
          example: 10
      example:
        next_page: 3
        num_pages: 10
        current_page: 2
    V1LogsPointMetric:
      type: object
      properties:
        time:
          type: string
          format: date-time
        DEBUG:
          type: integer
        INFO:
          type: integer
        WARN:
          type: integer
        ERROR:
          type: integer
      required:
      - time
      - DEBUG
      - INFO
      - WARN
      - ERROR
    V1LogsPointMetrics:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/V1LogsPointMetric'
    V1LogLineOrderByDirection:
      type: string
      enum:
      - ASC
      - DESC
    V1LogLineList:
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
        rows:
          items:
            $ref: '#/components/schemas/V1LogLine'
          type: array
    APIErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/APIError'
      required:
      - errors
    V1LogLineLevel:
      type: string
      enum:
      - DEBUG
      - INFO
      - WARN
      - ERROR
    APIError:
      type: object
      properties:
        code:
          type: integer
          description: a custom Hatchet error code
          format: uint64
          example: 1400
        field:
          type: string
          description: the field that this error is associated with, if applicable
          example: name
        description:
          type: string
          description: a description for this error
          example: A descriptive error message
        docs_link:
          type: string
          description: a link to the documentation for this error, if it exists
          example: github.com/hatchet-dev/hatchet
      required:
      - description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    cookieAuth:
      type: apiKey
      in: cookie
      name: hatchet
    customAuth:
      type: http
      scheme: bearer