Chaos Mesh Events API

Query chaos experiment events and audit logs

OpenAPI Specification

chaos-mesh-events-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Chaos Mesh Dashboard Archives Events API
  description: The Chaos Mesh Dashboard API provides REST endpoints for managing chaos experiments, schedules, workflows, and events on Kubernetes clusters. Chaos Mesh is a cloud-native chaos engineering platform that supports fault injection into pods, nodes, networks, IO subsystems, and cloud provider resources. The Dashboard API is served by the chaos-dashboard component and is the backend for the Chaos Mesh web UI, accessible at /api on the dashboard server.
  version: '2.5'
  contact:
    name: Chaos Mesh Community
    url: https://chaos-mesh.org/community/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:2333/api
  description: Default Chaos Mesh Dashboard server
tags:
- name: Events
  description: Query chaos experiment events and audit logs
paths:
  /events:
    get:
      operationId: listEvents
      summary: Chaos Mesh List chaos events
      description: Returns a list of chaos experiment events from the Chaos Mesh event store. Events record state transitions and fault injection activities. Results can be filtered by object UID, namespace, name, kind, and time range.
      tags:
      - Events
      parameters:
      - name: object_id
        in: query
        description: Filter events by the UID of the associated experiment or workflow.
        required: false
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/namespaceParam'
      - name: name
        in: query
        description: Filter events by experiment name.
        required: false
        schema:
          type: string
      - name: kind
        in: query
        description: Filter events by chaos kind.
        required: false
        schema:
          type: string
      - name: start
        in: query
        description: Filter events from this timestamp (RFC3339).
        required: false
        schema:
          type: string
          format: date-time
      - name: end
        in: query
        description: Filter events up to this timestamp (RFC3339).
        required: false
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        description: Maximum number of events to return.
        required: false
        schema:
          type: integer
          minimum: 1
          default: 25
      responses:
        '200':
          description: List of events returned successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Event'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /events/{id}:
    get:
      operationId: getEvent
      summary: Chaos Mesh Get an event
      description: Returns a specific chaos event by its integer ID.
      tags:
      - Events
      parameters:
      - name: id
        in: path
        description: Integer ID of the event.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Event returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /events/workflow/{uid}:
    get:
      operationId: listWorkflowEvents
      summary: Chaos Mesh List events for a workflow
      description: Returns all events associated with a specific workflow and its related child experiments by the workflow UID.
      tags:
      - Events
      parameters:
      - $ref: '#/components/parameters/uidParam'
      responses:
        '200':
          description: List of workflow events returned successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Event'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /api/events:
    get:
      operationId: listEvents
      summary: Chaos Mesh List events
      description: Returns a list of events generated by chaos experiments, workflows, and schedules. Events capture state transitions, errors, and lifecycle changes. Can be filtered by object ID, namespace, name, kind, and type.
      tags:
      - Events
      parameters:
      - name: objectId
        in: query
        required: false
        description: UID of the object (experiment, workflow, or schedule) to filter events by.
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/NamespaceQuery'
      - $ref: '#/components/parameters/NameQuery'
      - $ref: '#/components/parameters/KindQuery'
      - name: type
        in: query
        required: false
        description: Event type filter, e.g., Normal or Warning.
        schema:
          type: string
      responses:
        '200':
          description: List of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Event_2'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Event_2:
      type: object
      description: An event record capturing a state transition or notable occurrence in the lifecycle of a chaos experiment, workflow, or schedule.
      properties:
        id:
          type: integer
          description: Auto-incremented database ID for the event.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the event was recorded.
        namespace:
          type: string
          description: Kubernetes namespace of the resource that generated the event.
        name:
          type: string
          description: Name of the resource that generated the event.
        kind:
          type: string
          description: Resource kind that generated the event.
        type:
          type: string
          description: Event type, such as Normal or Warning.
          enum:
          - Normal
          - Warning
        reason:
          type: string
          description: Machine-readable reason code for the event.
          example: Updated
        message:
          type: string
          description: Human-readable message describing what happened.
        object_id:
          type: string
          format: uuid
          description: UID of the experiment, workflow, or schedule that generated the event.
    ErrorResponse:
      type: object
      description: Error response returned when an API operation fails.
      properties:
        code:
          type: integer
          description: HTTP status code.
          example: 404
        message:
          type: string
          description: Human-readable error message.
          example: experiment not found
    Event:
      type: object
      description: A chaos experiment event recording a state transition or fault injection activity.
      properties:
        id:
          type: integer
          description: Integer ID of the event.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the event was recorded.
        kind:
          type: string
          description: Chaos kind associated with this event.
        name:
          type: string
          description: Name of the experiment that generated this event.
        namespace:
          type: string
          description: Kubernetes namespace of the experiment.
        object_id:
          type: string
          format: uuid
          description: UID of the associated experiment, schedule, or workflow.
        type:
          type: string
          description: Event type indicating what happened (e.g., EXPERIMENT_START, EXPERIMENT_END, FAULT_INJECTED, FAULT_RECOVERED).
        message:
          type: string
          description: Human-readable message describing the event.
    APIError:
      type: object
      description: Error response returned when an API request fails.
      required:
      - code
      - message
      properties:
        code:
          type: integer
          description: HTTP status code of the error.
        message:
          type: string
          description: Human-readable description of the error.
        full_text:
          type: string
          description: Full error text including stack trace or detailed cause.
  responses:
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized — authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Bad request — invalid parameters or request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError'
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError'
  parameters:
    uidParam:
      name: uid
      in: path
      description: UUID of the chaos resource.
      required: true
      schema:
        type: string
        format: uuid
    NameQuery:
      name: name
      in: query
      required: false
      description: Name substring to filter results by.
      schema:
        type: string
    KindQuery:
      name: kind
      in: query
      required: false
      description: Chaos type kind to filter by, such as PodChaos, NetworkChaos, IOChaos, StressChaos, HTTPChaos, TimeChaos, DNSChaos, or KernelChaos.
      schema:
        type: string
        enum:
        - PodChaos
        - NetworkChaos
        - IOChaos
        - StressChaos
        - HTTPChaos
        - TimeChaos
        - DNSChaos
        - KernelChaos
        - AWSChaos
        - GCPChaos
        - JVMChaos
        - PhysicalMachineChaos
    namespaceParam:
      name: namespace
      in: query
      description: Kubernetes namespace to scope the request to.
      required: false
      schema:
        type: string
    NamespaceQuery:
      name: namespace
      in: query
      required: false
      description: Kubernetes namespace to filter results by. If omitted, returns results from all namespaces.
      schema:
        type: string
        example: default
externalDocs:
  description: Chaos Mesh Documentation
  url: https://chaos-mesh.org/docs/