Aleph Alpha Events API

Endpoints for handling Events. Events capture detailed information about specific occurrences within a Span. This includes logs, exceptions, and other relevant data points that provide a granular view of the operations within a Span. Events are crucial for diagnosing issues and understanding the execution context.

OpenAPI Specification

aleph-alpha-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PhariaStudio Events API
  version: 0.1.0
  description: Endpoints for handling Events. Events capture detailed information about specific occurrences within a Span. This includes logs, exceptions, and other relevant data points that provide a granular view of the operations within a Span. Events are crucial for diagnosing issues and understanding the execution context.
servers:
- url: '{host}/v1/studio'
  variables:
    host:
      default: https://api.pharia.example.com
security:
- BearerAuth: []
tags:
- name: Events
  description: Endpoints for handling Events. Events capture detailed information about specific occurrences within a Span. This includes logs, exceptions, and other relevant data points that provide a granular view of the operations within a Span. Events are crucial for diagnosing issues and understanding the execution context.
paths:
  /projects/{project_id}/traces/{trace_id}/spans/{span_id}/events:
    post:
      tags:
      - Events
      summary: Create Span Event
      description: Create a new `Event`. You can only add an `Event` to an active `Span`. The client is responsible to create and manage the ID of each event, the server does not accept events with the same ID.
      operationId: create_span_event_projects__project_id__traces__trace_id__spans__span_id__events_post
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: trace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Trace Id
      - name: span_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Span Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventResponse-Input'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                format: uuid
                title: Response Create Span Event Projects  Project Id  Traces  Trace Id  Spans  Span Id  Events Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Events
      summary: Get Many Events
      description: Get all events of a span.
      operationId: get_many_events_projects__project_id__traces__trace_id__spans__span_id__events_get
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: trace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Trace Id
      - name: span_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Span Id
      - name: page
        in: query
        required: false
        schema:
          type: integer
          exclusiveMinimum: 0
          description: The page number to retrieve. Starts at 1.
          default: 1
          title: Page
        description: The page number to retrieve. Starts at 1.
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          exclusiveMinimum: 0
          description: The number of items per page.
          default: 25
          title: Size
        description: The number of items per page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedResponse_EventResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /projects/{project_id}/traces/{trace_id}/spans/{span_id}/events/{event_id}:
    get:
      tags:
      - Events
      summary: Get Event
      description: Get a `Event` by its id.
      operationId: get_event_projects__project_id__traces__trace_id__spans__span_id__events__event_id__get
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Project Id
      - name: trace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Trace Id
      - name: span_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Span Id
      - name: event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse-Output'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    EventResponse-Output:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when this resource was created in UTC.
        created_by:
          type: string
          title: Created By
          description: The ID of the user that created the resource.
          examples:
          - '12345'
        id:
          type: string
          format: uuid
          title: Id
          description: The unique id of the event.
          examples:
          - 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          title: Name
          description: The name of the event.
          examples:
          - Event
        body:
          anyOf:
          - $ref: '#/components/schemas/JsonSerializable-Output'
          - type: 'null'
          description: The body of the event.
          examples:
          - key: value
        message:
          type: string
          title: Message
          description: The message of the event.
          examples:
          - Message
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: The timestamp when this event was created.
          examples:
          - '2024-01-01 12:34:56.123456+00:00'
      type: object
      required:
      - created_at
      - created_by
      - id
      - name
      - body
      - message
      - timestamp
      title: EventResponse
    PagedResponse_EventResponse_:
      properties:
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        num_pages:
          type: integer
          title: Num Pages
        items:
          items:
            $ref: '#/components/schemas/EventResponse-Output'
          type: array
          title: Items
          default: []
      type: object
      required:
      - total
      - page
      - size
      - num_pages
      title: PagedResponse[EventResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EventResponse-Input:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when this resource was created in UTC.
        created_by:
          type: string
          title: Created By
          description: The ID of the user that created the resource.
          examples:
          - '12345'
        id:
          type: string
          format: uuid
          title: Id
          description: The unique id of the event.
          examples:
          - 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          title: Name
          description: The name of the event.
          examples:
          - Event
        body:
          anyOf:
          - $ref: '#/components/schemas/JsonSerializable-Input'
          - type: 'null'
          description: The body of the event.
          examples:
          - key: value
        message:
          type: string
          title: Message
          description: The message of the event.
          examples:
          - Message
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: The timestamp when this event was created.
          examples:
          - '2024-01-01 12:34:56.123456+00:00'
      type: object
      required:
      - created_at
      - created_by
      - id
      - name
      - body
      - message
      - timestamp
      title: EventResponse
    JsonSerializable-Input:
      anyOf:
      - type: integer
      - type: number
      - type: string
      - type: boolean
      - items:
          $ref: '#/components/schemas/JsonSerializable-Input'
        type: array
      - additionalProperties:
          $ref: '#/components/schemas/JsonSerializable-Input'
        type: object
      - type: 'null'
    JsonSerializable-Output:
      anyOf:
      - type: integer
      - type: number
      - type: string
      - type: boolean
      - items:
          $ref: '#/components/schemas/JsonSerializable-Output'
        type: array
      - additionalProperties:
          $ref: '#/components/schemas/JsonSerializable-Output'
        type: object
      - type: 'null'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT