Lightrun Debug Cases API

Debug Cases API.

OpenAPI Specification

lightrun-debug-cases-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  description: Lightrun API documentation
  title: Lightrun Actions Debug Cases API
  version: v1
servers:
- url: http://localhost:8090
  description: Generated server url
tags:
- description: Debug Cases API.
  name: Debug Cases
paths:
  /api/v1/debug-cases:
    get:
      description: 'Get a list of all debug cases.


        **Required API permission level:** `DEV`'
      operationId: listDebugCases
      parameters:
      - description: Agent pool ID. Mandatory when RBAC is enabled. Ignored when RBAC is disabled.
        in: query
        name: agentPoolId
        required: false
        schema:
          type: string
      - description: Filter cases by the creation date. Date format is <YYYY-MM-DD>. (UTC)
        in: query
        name: createdAt
        required: false
        schema:
          type: string
          format: date
      - description: Filter cases by the user created.
        in: query
        name: createdBy
        required: false
        schema:
          type: string
      - description: Specifies a zero-based index of the results page to retrieve. The default is 0 (the first page).
        in: query
        name: page
        required: false
        schema:
          type: integer
          default: 0
          minimum: 0
      - description: The number of items to include on each page of results. The default is 20.
        in: query
        name: size
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
      - description: 'The sorting criteria in the format property (asc|desc), with ascending as the default. Multiple sort parameters can be chained to define primary, secondary, and further sorting levels (e.g., sort=field1,asc&sort=field2,desc). Sortable fields: name, description, createdBy, createdAt.'
        in: query
        name: sort
        required: false
        schema:
          type: array
          items:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiPageDebugCasePublicDTO'
          description: Retrieved all matching cases.
      security:
      - API Token: []
      summary: Get a list of cases
      tags:
      - Debug Cases
    post:
      description: 'Create a case.


        **Required API permission level:** `DEV`'
      operationId: createDebugCase
      parameters:
      - description: Agent pool ID. Mandatory when RBAC is enabled. Ignored when RBAC is disabled.
        in: query
        name: agentPoolId
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DebugCaseCreatePublicDTO'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebugCasePublicDTO'
          description: OK
      security:
      - API Token: []
      summary: Create a case
      tags:
      - Debug Cases
  /api/v1/debug-cases/{id}:
    get:
      description: 'Get a case by ID.


        **Required API permission level:** `DEV`'
      operationId: getDebugCase
      parameters:
      - description: Agent pool ID. Mandatory when RBAC is enabled. Ignored when RBAC is disabled.
        in: query
        name: agentPoolId
        required: false
        schema:
          type: string
      - description: Case ID.
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebugCasePublicDTO'
          description: OK
      security:
      - API Token: []
      summary: Get a case by ID
      tags:
      - Debug Cases
components:
  schemas:
    PublicApiPageDebugCasePublicDTO:
      type: object
      properties:
        hasMore:
          type: boolean
        items:
          type: array
          items:
            $ref: '#/components/schemas/DebugCasePublicDTO'
        limit:
          type: integer
          format: int32
        offset:
          type: integer
          format: int64
        total:
          type: integer
          format: int64
    SourceSummaryPublicDTO:
      type: object
      description: Source.
      properties:
        id:
          type: string
          description: Source ID.
          minLength: 1
        type:
          type: string
          description: Source type.
          enum:
          - CUSTOM_SOURCE
          - AGENT
          - TAG
      required:
      - id
      - type
    DebugCasePublicDTO:
      type: object
      description: Debug Runbook Case.
      properties:
        createdAt:
          type: string
          format: date-time
          description: Creation time.
        createdBy:
          type: string
          format: email
          description: Created by user.
        description:
          type: string
          description: Case description.
        hitCount:
          type: integer
          format: int32
          description: Hit count.
        id:
          type: string
          description: Case ID.
        name:
          type: string
          description: Case name.
        runbooksIds:
          type: array
          description: Runbook IDs.
          items:
            type: string
        source:
          $ref: '#/components/schemas/SourceSummaryPublicDTO'
          description: Source.
        updatedAt:
          type: string
          format: date-time
          description: Update time.
        updatedBy:
          type: string
          format: email
          description: Updated by user.
        webPortalPageLink:
          type: string
          description: Link to case details in the Lightrun Management Portal.
    DebugCaseCreatePublicDTO:
      type: object
      description: Create runbook case.
      properties:
        description:
          type: string
          description: Case description.
        name:
          type: string
          description: Case name.
          maxLength: 50
          minLength: 3
        source:
          $ref: '#/components/schemas/SourceSummaryPublicDTO'
          description: Source.
      required:
      - name
      - source
  securitySchemes:
    API Token:
      scheme: bearer
      type: http