openapi: 3.0.1
info:
  title: Testkube Control Plane API
  description: API for Testkube Control Plane
  contact:
    email: info@testkube.io
  version: 1.0.0
servers:
  - url: https://api.testkube.io
    description: Testkube Cloud Control Plane API Endpoint
  - url: https://<your-testkube-api-host>
    description: Testkube On-Prem API Endpoint
paths:
  /organizations:
    get:
      summary: List organizations
      description: List organizations
      operationId: listOrganizations
      parameters:
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          $ref: '#/components/responses/Organizations'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
    post:
      summary: Create new organization
      description: Create organization
      operationId: createOrganization
      requestBody:
        $ref: '#/components/requestBodies/Organization'
      responses:
        '200':
          $ref: '#/components/responses/Organization'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
  /organizations/{id}:
    get:
      summary: Get organization by ID
      description: Get organization by ID
      operationId: getOrganization
      responses:
        '200':
          description: get organization response body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete organization
      description: Deletes organization
      operationId: deleteOrganization
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
    patch:
      summary: Update organization
      description: Update organization with given request body
      operationId: updateOrganization
      requestBody:
        $ref: '#/components/requestBodies/Organization'
      responses:
        '200':
          $ref: '#/components/responses/Organization'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/agents:
    get:
      summary: List agents used in the organization
      description: List agents used in the organization.
      operationId: listAgents
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/Agent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Create a new agent in the organization
      description: Create a new agent in the organization.
      operationId: createAgent
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 40
                  pattern: ^[a-z0-9]([a-z0-9-.]*[a-z0-9])?$
                labels:
                  type: object
                  additionalProperties:
                    type: string
                environments:
                  description: Environment IDs where the agent is restricted to.
                  type: array
                  items:
                    type: string
                capabilities:
                  description: Capabilities enabled for this agent.
                  type: array
                  items:
                    $ref: '#/components/schemas/AgentCapability'
                runnerPolicy:
                  $ref: '#/components/schemas/AgentRunnerPolicy'
                floating:
                  type: boolean
              required:
                - name
                - environments
        required: true
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Agent'
                  - type: object
                    properties:
                      secretKey:
                        type: string
                    required:
                      - secretKey
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentIDQP'
      - $ref: '#/components/parameters/AgentCapabilityQP'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Offset'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/IncludeDeleted'
  /organizations/{id}/agents/{agentID}:
    get:
      summary: Get agent from the organization
      description: Get agent from the organization.
      operationId: getAgent
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete agent in the organization
      description: Delete agent in the organization.
      operationId: deleteAgent
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update agent data in the organization
      description: Update agent data in the organization.
      operationId: updateAgent
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                runnerPolicy:
                  type: object
                  properties:
                    requiredMatch:
                      type: array
                      items:
                        type: string
                labels:
                  type: object
                  additionalProperties:
                    type: string
                disabled:
                  type: boolean
                environments:
                  description: Environment IDs where the agent is restricted to.
                  type: array
                  items:
                    type: string
        required: true
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/AgentName'
      - $ref: '#/components/parameters/IncludeDeleted'
  /organizations/{id}/agents/{agentID}/commands:
    get:
      summary: '[internal] Get commands for this super agent'
      description: >-
        Get commands for this super agent. This endpoint is deprecated and will
        be removed in the near future.
      operationId: getSuperAgentCommands
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperAgentCommands'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/AgentName'
  /organizations/{id}/agents/{agentID}/secret-key:
    get:
      summary: Get the secret key for selected agent.
      description: Get the secret key for selected agent.
      operationId: getAgentSecretKey
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  secretKey:
                    type: string
                required:
                  - secretKey
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Regenerate the secret key for selected agent.
      description: Regenerate the secret key for selected agent.
      operationId: regenerateAgentSecretKey
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  secretKey:
                    type: string
                required:
                  - secretKey
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/AgentName'
  /organizations/{id}/audit:
    get:
      summary: Retrieve a list of application audit logs
      description: >
        Fetch a paginated list of audit logs detailing actions performed on
        application resources.

        This includes actions such as resource creation, updates, and deletions,
        along with metadata

        about the entities involved and the context in which the actions
        occurred.


        The logs provide visibility into operations for auditing and compliance
        purposes,

        and may be filtered or limited by the parameters provided.
      operationId: listApplicationAuditLogs
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/EnvironmentIDQP'
        - $ref: '#/components/parameters/StartDateTime'
        - $ref: '#/components/parameters/EndDateTime'
        - $ref: '#/components/parameters/Subject'
        - $ref: '#/components/parameters/EventType'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PageSize'
      responses:
        '200':
          $ref: '#/components/responses/PaginatedApplicationAuditLog'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
  /organizations/{id}/audit/export:
    get:
      summary: Download an export of application audit logs
      description: >
        Download an export of application audit logs in a structured format,
        such as CSV or JSON,

        for the specified organization. The export includes detailed information
        about actions

        performed on application resources, including the entities involved, the
        context in which

        the actions occurred, and metadata about the operations.


        The export provides a comprehensive record of operations for auditing
        and compliance purposes,

        and can be used to analyze and visualize the history of changes to
        application resources.
      operationId: exportApplicationAuditLog
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/EnvironmentIDQP'
        - $ref: '#/components/parameters/StartDateTime'
        - $ref: '#/components/parameters/EndDateTime'
        - $ref: '#/components/parameters/Subject'
        - $ref: '#/components/parameters/EventType'
        - $ref: '#/components/parameters/ExportFormat'
      responses:
        '200':
          $ref: '#/components/responses/ExportedApplicationAuditLog'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
  /organizations/{id}/audit/filters/subject:
    get:
      summary: Returns a list of distinct values for the subject filter.
      description: >
        Returns a list of distinct values for the subject filter based on the
        provided query parameters.

        The subject filter is used to filter audit logs based on the entity that
        performed the action,

        such as a user, API token... This endpoint provides a list of distinct

        subjects that can be used to filter audit logs by the entity that
        performed the action.
      operationId: getAuditLogSubjectFilterValues
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/EnvironmentIDQP'
        - $ref: '#/components/parameters/StartDateTime'
        - $ref: '#/components/parameters/EndDateTime'
        - $ref: '#/components/parameters/EventType'
      responses:
        '200':
          $ref: '#/components/responses/AuditLogSubjectFilterValues'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
  /organizations/{id}/audit/keymap:
    get:
      summary: Retrieve a keymap of application audit log types
      description: >
        Retrieve a keymap that provides mappings of various audit log
        attributes, such as event types,

        actions, entity types, and sources, for the specified organization.


        This keymap helps interpret the structure and meaning of audit logs by
        mapping internal identifiers

        to their corresponding human-readable descriptions. It can be used to
        facilitate the analysis and

        display of audit logs by providing context for different events,
        actions, and entities involved in the

        logged operations.
      operationId: getApplicationAuditLogKeymap
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          $ref: '#/components/responses/ApplicationAuditLogKeymap'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      security:
        - BearerAuth: []
  /organizations/{id}/boards:
    get:
      summary: List board summaries
      description: Lists the summaries of the boards in your organization.
      operationId: listBoards
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BoardSummary'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    post:
      summary: Create a board
      description: Creates a board.
      operationId: createBoard
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The display name of the new board
                  type: string
                slug:
                  description: The slug of the new board
                  type: string
                description:
                  description: The description of the new board
                  type: string
              required:
                - name
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Board'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/boards/{boardID}:
    get:
      summary: Get a board
      description: Get a board by its `id` or `slug`.
      operationId: getBoard
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Board'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete a board
      description: Deletes a board.
      operationId: deleteBoard
      responses:
        '204':
          description: Delete Success
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update a board
      description: Updates a board's details, content or layout.
      operationId: updateBoard
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The new display name of this board.
                  type: string
                description:
                  description: The new description of this board.
                  type: string
                slug:
                  description: The new slug of this board.
                  type: string
                layout: {}
                content:
                  description: A patch for the content of this board.
                  type: object
                  properties:
                    action:
                      type: string
                      enum:
                        - create
                        - update
                        - delete
                    content_kind:
                      type: string
                    content_id:
                      type: string
                    content_data: {}
                  required:
                    - action
                    - content_kind
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Board'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/BoardID'
  /organizations/{id}/credentials:
    get:
      summary: List credentials used in the organization
      description: List credentials used in the organization.
      operationId: listCredentials
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Create a new credential in the organization
      description: Create a new credential in the organization.
      operationId: createCredential
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The identifier for the credential.
                  type: string
                type:
                  description: >-
                    The type of credential (secret, variable, or vault).
                    Defaults to secret if not specified.
                  type: string
                  enum:
                    - secret
                    - variable
                    - vault
                base64:
                  description: Base64-encoded value for the credential.
                  type: string
                environmentId:
                  description: Environment ID where the credential is restricted to.
                  type: string
                workflowName:
                  description: Workflow Name where the credential is restricted to.
                  type: string
              required:
                - name
                - base64
        required: true
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/Conflict'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentIDQP'
  /organizations/{id}/credentials/{credentialName}:
    get:
      summary: Get credential in the organization
      description: >-
        Get credential details. Variables will include their decrypted value,
        secrets will not.
      operationId: getCredential
      responses:
        '200':
          $ref: '#/components/responses/Credential'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete credential in the organization
      description: Delete credential in the organization.
      operationId: deleteCredential
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update value of the credential in the organization
      description: Update value of the credential in the organization.
      operationId: updateCredential
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                base64:
                  description: Base64-encoded value for the credential.
                  type: string
              required:
                - base64
        required: true
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/CredentialName'
  /organizations/{id}/environments:
    get:
      summary: List environments
      description: List environments from the active organization
      operationId: listEnvironments
      parameters:
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          $ref: '#/components/responses/Environments'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Create new environment
      description: Create test environment
      operationId: createEnvironment
      requestBody:
        $ref: '#/components/requestBodies/Environment'
      responses:
        '200':
          $ref: '#/components/responses/Environment'
        '400':
          $ref: '#/components/responses/BadRequestError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete environments
      description: Deletes all or labeled environments
      operationId: deleteEnvironments
      parameters:
        - $ref: '#/components/parameters/Name'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/environments/{environmentID}:
    get:
      summary: Get environment by ID
      description: Get test environment by ID from CRD in kubernetes cluster
      operationId: getEnvironment
      responses:
        '200':
          $ref: '#/components/responses/Environment'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete test environment
      description: Deletes a test environment
      operationId: deleteEnvironment
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    patch:
      summary: Update environment
      description: Update environment with given request body
      operationId: updateEnvironment
      requestBody:
        $ref: '#/components/requestBodies/Environment'
      responses:
        '200':
          $ref: '#/components/responses/Environment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
  /organizations/{id}/environments/{environmentID}/collaborators:
    get:
      summary: Lists all collaborators for this environment
      description: Lists all collaborators for this environment.
      operationId: listEnvironmentCollaborators
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Collaborator'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Adds many collaborators to this environment
      description: Adds many collaborators to this environment.
      operationId: addManyEnvironmentCollaborators
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                collaborators:
                  description: The collaborators to add to this environment.
                  type: array
                  items:
                    type: string
                role:
                  description: The role to assign to all collaborators.
                  type: string
              required:
                - collaborators
                - role
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  collaborators:
                    type: array
                    items:
                      $ref: '#/components/schemas/Collaborator'
                  failed:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - BearerAuth: []
    delete:
      summary: Remove many collaborators from this environment
      description: Remove many collaborators from this environment.
      operationId: removeManyEnvironmentCollaborators
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                collaborators:
                  description: The collaborators to remove from this environment.
                  type: array
                  items:
                    type: string
              required:
                - collaborators
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  failed:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
  /organizations/{id}/environments/{environmentID}/credentials:
    get:
      summary: List credentials in the environment
      description: >-
        List credentials in the environment. Use filter=all to include
        organization-level credentials that are not overridden by
        environment-level credentials.
      operationId: listEnvironmentCredentials
      parameters:
        - name: filter
          in: query
          description: >-
            Optional filter to include organization-level credentials. Use 'all'
            to merge org and env credentials, excluding org credentials that are
            overridden by env credentials with the same name.
          schema:
            type: string
            enum:
              - all
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Create a new credential in the environment
      description: Create a new credential in the environment.
      operationId: createEnvironmentCredential
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The identifier for the credential.
                  type: string
                type:
                  description: >-
                    The type of credential (secret, variable, or vault).
                    Defaults to secret if not specified.
                  type: string
                  enum:
                    - secret
                    - variable
                    - vault
                base64:
                  description: Base64-encoded value for the credential.
                  type: string
              required:
                - name
                - base64
        required: true
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/Conflict'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
  /organizations/{id}/environments/{environmentID}/credentials/{credentialName}:
    get:
      summary: Get credential in the environment
      description: >-
        Get credential details. Variables will include their decrypted value,
        secrets will not.
      operationId: getEnvironmentCredential
      responses:
        '200':
          $ref: '#/components/responses/Credential'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete credential in the environment
      description: Delete credential in the environment.
      operationId: deleteEnvironmentCredential
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update value of the credential in the environment
      description: Update value of the credential in the environment.
      operationId: updateEnvironmentCredential
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                base64:
                  description: Base64-encoded value for the credential.
                  type: string
              required:
                - base64
        required: true
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/CredentialName'
  /organizations/{id}/environments/{environmentID}/executions:
    get:
      summary: Get recent executions
      description: Get recent executions
      operationId: listExecutions
      responses:
        '200':
          $ref: '#/components/responses/ExecutionRefs'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/Kind'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/TextSearch'
      - $ref: '#/components/parameters/Status'
      - $ref: '#/components/parameters/TagSelector'
      - $ref: '#/components/parameters/Runner'
      - $ref: '#/components/parameters/Health'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/artifact-archive:
    get:
      summary: Get artifact archive
      description: Get artifact archive
      operationId: getArtifactArchive
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/OptionalTestName'
      - $ref: '#/components/parameters/FilterTestsuiteName'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/artifacts:
    post:
      summary: Get artifact
      description: Get artifact
      operationId: getArtifactPost
      requestBody:
        $ref: '#/components/requestBodies/ServeArtifact'
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/OptionalTestName'
      - $ref: '#/components/parameters/FilterTestsuiteName'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/artifacts/{artifactID}:
    get:
      summary: Get artifact
      description: Get artifact
      operationId: getArtifact
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/ArtifactID'
      - $ref: '#/components/parameters/OptionalTestName'
      - $ref: '#/components/parameters/FilterTestsuiteName'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/download-artifact/{artifactID}:
    get:
      summary: Download artifact
      description: Download artifact
      operationId: downloadArtifact
      responses:
        '307':
          description: Redirection to download artifact
          headers:
            Location:
              description: artifact presigned url
              schema:
                type: string
                format: uri
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/ArtifactID'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/events:
    get:
      summary: Get events that regard this execution.
      description: Get events that regard this execution
      operationId: getExecutionEvents
      responses:
        '200':
          description: Testkube event
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestkubeEvent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - name: series
        in: query
        description: Whether to group isomorphic events or keep a flat list of events.
        schema:
          type: boolean
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/junit:
    get:
      summary: Get JUnit report for execution
      description: Returns JUnit report for the specified execution
      operationId: getExecutionJUnitReports
      responses:
        '200':
          $ref: '#/components/responses/JUnitReports'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/logs:
    get:
      summary: Get Testkube Pro logs for execution
      description: Get Logs separately from execution
      operationId: getExecutionLogs
      responses:
        '200':
          $ref: '#/components/responses/Logs'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - name: from
        in: query
        description: line number from which logs should be returned
        required: true
        schema:
          type: integer
      - name: to
        in: query
        description: line number to which logs should be returned
        required: true
        schema:
          type: integer
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/serve-artifact:
    post:
      summary: Serve artifact
      description: Serve artifact
      operationId: serveArtifactPost
      requestBody:
        $ref: '#/components/requestBodies/ServeArtifact'
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/OptionalTestName'
      - $ref: '#/components/parameters/FilterTestsuiteName'
  /organizations/{id}/environments/{environmentID}/executions/{executionID}/serve-artifact/{artifactID}:
    get:
      summary: Serve artifact
      description: Serve artifact
      operationId: serveArtifact
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '410':
          $ref: '#/components/responses/GoneError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/ArtifactID'
      - $ref: '#/components/parameters/OptionalTestName'
      - $ref: '#/components/parameters/FilterTestsuiteName'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/{executionID}/artifacts:
    post:
      summary: Get Test Workflow artifact
      description: Get Test Workflow artifact with artifactID
      operationId: getTestWorkflowArtifactPost
      requestBody:
        $ref: '#/components/requestBodies/ServeArtifact'
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/{executionID}/artifacts/{artifactID}:
    get:
      summary: Get Test Workflow artifact
      description: Get Test Workflow artifact
      operationId: getTestWorkflowArtifact
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/ArtifactID'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/{executionID}/download-artifact/{artifactID}:
    get:
      summary: Download test workflow artifact
      description: Download test workflow artifact
      operationId: downloadTestWorkflowArtifact
      responses:
        '307':
          description: Redirection to download artifact
          headers:
            Location:
              description: artifact presigned url
              schema:
                type: string
                format: uri
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/ArtifactID'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/{executionID}/logs:
    get:
      summary: Get Test Workflow logs URL
      description: Get Test Workflow logs URL
      operationId: getTestWorkflowLogsURL
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/{executionID}/serve-artifact:
    post:
      summary: Serve artifact
      description: Serve artifact
      operationId: serveTestWorkflowArtifactPost
      requestBody:
        $ref: '#/components/requestBodies/ServeArtifact'
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/OptionalTestName'
      - $ref: '#/components/parameters/FilterTestsuiteName'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/{executionID}/serve-artifact/{artifactID}:
    get:
      summary: Serve Test Workflow artifact
      description: Serve Test workflow artifact
      operationId: serveTestWorkflowArtifact
      responses:
        '200':
          $ref: '#/components/responses/ArtifactURL'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/ExecutionID'
      - $ref: '#/components/parameters/ArtifactID'
  /organizations/{id}/environments/{environmentID}/test-workflow-executions/summaries:
    get:
      summary: Get execution summaries in bulk
      description: Returns a map of execution ID to JSON summary for MCP query tools
      operationId: getTestWorkflowExecutionSummariesBulk
      parameters:
        - name: workflowName
          in: query
          description: Filter by workflow name
          schema:
            type: string
        - name: status
          in: query
          description: Filter by execution status
          schema:
            type: string
        - name: textSearch
          in: query
          description: Text search filter
          schema:
            type: string
        - name: pageSize
          in: query
          description: Maximum number of executions to return (default 50, max 100)
          schema:
            type: integer
            maximum: 100
            default: 50
      responses:
        '200':
          description: Map of execution ID to JSON summary
          content:
            application/json:
              schema:
                description: Map where key is execution ID and value is JSON summary
                type: object
                additionalProperties:
                  type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
  /organizations/{id}/environments/{environmentID}/test-workflows/{testWorkflowName}:
    delete:
      summary: Delete test workflow
      description: Deletes test workflow executions
      operationId: deleteTestWorkflowExecutions
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/TestWorkflowName'
  /organizations/{id}/environments/{environmentID}/test-workflows/{testWorkflowName}/credentials:
    get:
      summary: List credentials for the test workflow
      description: >-
        List credentials for the specified test workflow. Use filter=all to
        include organization and environment credentials that are not overridden
        by workflow-level credentials.
      operationId: listWorkflowCredentials
      parameters:
        - name: filter
          in: query
          description: >-
            Optional filter to include organization and environment credentials.
            Use 'all' to merge org, env, and workflow credentials, with workflow
            overriding env and org, and env overriding org for credentials with
            the same name.
          schema:
            type: string
            enum:
              - all
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  elements:
                    type: array
                    items:
                      $ref: '#/components/schemas/Credential'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Create a new credential for the test workflow
      description: Create a new credential for the specified test workflow.
      operationId: createWorkflowCredential
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The identifier for the credential.
                  type: string
                type:
                  description: >-
                    The type of credential (secret, variable, or vault).
                    Defaults to secret if not specified.
                  type: string
                  enum:
                    - secret
                    - variable
                    - vault
                base64:
                  description: Base64-encoded value for the credential.
                  type: string
              required:
                - name
                - base64
        required: true
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credential'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/Conflict'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/TestWorkflowName'
  /organizations/{id}/environments/{environmentID}/test-workflows/{testWorkflowName}/credentials/{credentialName}:
    get:
      summary: Get credential for the test workflow
      description: >-
        Get credential details. Variables will include their decrypted value,
        secrets will not.
      operationId: getWorkflowCredential
      responses:
        '200':
          $ref: '#/components/responses/Credential'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete credential for the test workflow
      description: Delete credential for the specified test workflow.
      operationId: deleteWorkflowCredential
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update value of the credential for the test workflow
      description: Update value of the credential for the specified test workflow.
      operationId: updateWorkflowCredential
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                base64:
                  description: Base64-encoded value for the credential.
                  type: string
              required:
                - base64
        required: true
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
      - $ref: '#/components/parameters/TestWorkflowName'
      - $ref: '#/components/parameters/CredentialName'
  /organizations/{id}/environments/{environmentID}/test-workflows/definitions:
    get:
      summary: Get workflow definitions in bulk
      description: Returns a map of workflow name to YAML definition for MCP query tools
      operationId: getTestWorkflowDefinitionsBulk
      parameters:
        - name: selector
          in: query
          description: Label selector to filter workflows
          schema:
            type: string
        - name: resourceGroup
          in: query
          description: Resource group to filter workflows
          schema:
            type: string
        - name: pageSize
          in: query
          description: Maximum number of workflows to return (default 50, max 100)
          schema:
            type: integer
            maximum: 100
            default: 50
      responses:
        '200':
          description: Map of workflow name to YAML definition
          content:
            application/json:
              schema:
                description: Map where key is workflow name and value is YAML definition
                type: object
                additionalProperties:
                  type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/EnvironmentID'
  /organizations/{id}/environments/{environmentId}/agent/executions:
    get:
      summary: Get all test executions
      description: Returns array of test executions
      operationId: listExecutions
      parameters:
        - $ref: '#/components/parameters/TestName'
        - $ref: '#/components/parameters/Type'
        - $ref: '#/components/parameters/TextSearch'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/PageIndex'
        - $ref: '#/components/parameters/ExecutionsStatusFilter'
        - $ref: '#/components/parameters/StartDateFilter'
        - $ref: '#/components/parameters/EndDateFilter'
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionsResult'
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting test executions from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Starts new test executions
      description: >-
        New test executions returns new executions details on successful
        executions start
      operationId: executeTests
      parameters:
        - $ref: '#/components/parameters/Namespace'
        - $ref: '#/components/parameters/Selector'
        - $ref: '#/components/parameters/ExecutionSelector'
        - $ref: '#/components/parameters/ConcurrencyLevel'
      requestBody:
        description: body passed to configure executions
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecutionRequest'
        required: true
      responses:
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExecutionResult'
        '400':
          description: problem with request body
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: test not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with test executions
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/executions/{executionID}:
    get:
      summary: Get test execution by ID
      description: Returns execution with given executionID
      operationId: getExecutionByID
      parameters:
        - $ref: '#/components/parameters/executionID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Execution'
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting test executions from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with reading secrets from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/executions/{id}/artifact-archive:
    get:
      summary: Download artifact archive
      description: Download the artifact archive from the given execution
      operationId: downloadArchive
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/Mask'
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting artifact archive from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/executions/{id}/artifacts:
    get:
      summary: Get execution's artifacts by ID
      description: Returns artifacts of the given executionID
      operationId: getExecutionArtifacts
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Artifact'
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting execution's artifacts from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/executions/{id}/artifacts/{filename}:
    get:
      summary: Download artifact
      description: Download the artifact file from the given execution
      operationId: downloadFile
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/Filename'
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting artifacts from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/executions/{id}/logs:
    get:
      summary: Get execution's logs by ID
      description: Returns logs of the given executionID
      operationId: getExecutionLogs
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExecutorOutput'
        '500':
          description: problem with getting execution's logs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/executions/{id}/logs/v2:
    get:
      summary: Get execution's logs by ID version 2
      description: Returns logs of the given executionID version 2
      operationId: getExecutionLogsV2
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LogV2'
        '500':
          description: problem with getting execution's logs version 2
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions:
    get:
      summary: List test workflow executions
      description: List test workflow executions
      operationId: listTestWorkflowExecutions
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/TagSelector'
        - $ref: '#/components/parameters/ActorName'
        - $ref: '#/components/parameters/ActorType'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowExecutionsResult'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Execute test workflows
      description: Execute test workflows in the kubernetes cluster
      operationId: executeTestWorkflows
      parameters:
        - $ref: '#/components/parameters/Selector'
        - $ref: '#/components/parameters/ConcurrencyLevel'
      requestBody:
        description: test workflow execution request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowExecutionRequest'
        required: true
      responses:
        '200':
          description: successful execution
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowExecution'
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions/{executionID}:
    get:
      summary: Get test workflow execution
      description: Get test workflow execution details
      operationId: getTestWorkflowExecution
      parameters:
        - $ref: '#/components/parameters/executionID'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowExecution'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions/{executionID}/abort:
    post:
      summary: Abort test workflow execution
      description: Abort test workflow execution
      operationId: abortTestWorkflowExecution
      parameters:
        - $ref: '#/components/parameters/executionID'
        - $ref: '#/components/parameters/ForceAgent'
      responses:
        '204':
          description: no content
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions/{executionID}/artifact-archive:
    get:
      summary: Download test workflow artifact archive
      description: Download the artifact archive from the given execution
      operationId: downloadTestWorkflowArtifactArchive
      parameters:
        - $ref: '#/components/parameters/executionID'
        - $ref: '#/components/parameters/Mask'
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting artifact archive from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions/{executionID}/artifacts:
    get:
      summary: Get test workflow execution's artifacts by ID
      description: Returns artifacts of the given executionID
      operationId: getTestWorkflowExecutionArtifacts
      parameters:
        - $ref: '#/components/parameters/executionID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Artifact'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting execution's artifacts from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions/{executionID}/artifacts/{filename}:
    get:
      summary: Download test workflow artifact
      description: Download the artifact file from the given execution
      operationId: downloadTestWorkflowArtifact
      parameters:
        - $ref: '#/components/parameters/executionID'
        - $ref: '#/components/parameters/Filename'
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: execution not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting artifacts from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-executions/{executionID}/rerun:
    post:
      summary: Rerun test workflow execution
      description: Rerun test workflow execution
      operationId: rerunTestWorkflowExecution
      parameters:
        - $ref: '#/components/parameters/executionID'
      requestBody:
        description: test workflow running context
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowRunningContext'
        required: true
      responses:
        '200':
          description: successful execution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflowExecution'
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-templates:
    get:
      summary: List test workflow templates
      description: List test workflow templates from the kubernetes cluster
      operationId: listTestWorkflowTemplates
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowTemplate'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    put:
      summary: Validate test workflow template
      description: Validate test workflow template specification against CRD schema
      operationId: validateTestWorkflowTemplate
      requestBody:
        description: test workflow template body
        content:
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '204':
          description: no content
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Create test workflow template
      description: Create test workflow template in the kubernetes cluster
      operationId: createTestWorkflowTemplate
      requestBody:
        description: test workflow template body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowTemplate'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful creation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowTemplate'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete test workflow templates
      description: Delete test workflow templates from the kubernetes cluster
      operationId: deleteTestWorkflowTemplates
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '204':
          description: no content
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-templates/{id}:
    get:
      summary: Get test workflow template details
      description: Get test workflow template details from the kubernetes cluster
      operationId: getTestWorkflowTemplate
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflowTemplate'
            text/yaml:
              schema:
                type: string
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    put:
      summary: Update test workflow template details
      description: Update test workflow template details in the kubernetes cluster
      operationId: updateTestWorkflowTemplate
      parameters:
        - $ref: '#/components/parameters/ID'
      requestBody:
        description: test workflow template body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowTemplate'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflowTemplate'
            text/yaml:
              schema:
                type: string
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete test workflow template
      description: Delete test workflow template from the kubernetes cluster
      operationId: deleteTestWorkflowTemplate
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '204':
          description: no content
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-with-executions:
    get:
      summary: List test workflows with latest execution
      description: List test workflows from the kubernetes cluster with latest execution
      operationId: listTestWorkflowWithExecutions
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowWithExecutionSummary'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-with-executions/{id}:
    get:
      summary: Get test workflow details with latest execution
      description: >-
        Get test workflow details from the kubernetes cluster with latest
        execution
      operationId: getTestWorkflowWithExecution
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflowWithExecution'
            text/yaml:
              schema:
                type: string
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflow-with-executions/{id}/tags:
    get:
      summary: List test workflow execution tags
      description: List test workflow execution tags for all executed test workflows
      operationId: listTestWorkflowWithExecutionTags
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  app:
                    - backend
                  env:
                    - prod
                  toDelete:
                    - 'yes'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows:
    get:
      summary: List test workflows
      description: List test workflows from the kubernetes cluster
      operationId: listTestWorkflows
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflow'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    put:
      summary: Validate test workflow
      description: Validate test workflow specification against CRD schema
      operationId: validateTestWorkflow
      requestBody:
        description: test workflow body
        content:
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '204':
          description: no content
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Create test workflow
      description: Create test workflow in the kubernetes cluster
      operationId: createTestWorkflow
      requestBody:
        description: test workflow body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflow'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful creation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflow'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete test workflows
      description: Delete test workflows from the kubernetes cluster
      operationId: deleteTestWorkflows
      parameters:
        - $ref: '#/components/parameters/Selector'
        - $ref: '#/components/parameters/TestWorkflowNames'
      responses:
        '204':
          description: no content
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}:
    get:
      summary: Get test workflow details
      description: Get test workflow details from the kubernetes cluster
      operationId: getTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflow'
            text/yaml:
              schema:
                type: string
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    put:
      summary: Update test workflow details
      description: Update test workflow details in the kubernetes cluster
      operationId: updateTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
      requestBody:
        description: test workflow body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflow'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflow'
            text/yaml:
              schema:
                type: string
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete test workflow
      description: Delete test workflow from the kubernetes cluster
      operationId: deleteTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/SkipDeleteExecutions'
        - $ref: '#/components/parameters/SkipDeleteCRD'
      responses:
        '204':
          description: no content
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: the resource has not been found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/abort:
    post:
      summary: Abort all test workflow executions
      description: Abort all test workflow executions
      operationId: abortAllTestWorkflowExecutions
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '204':
          description: no content
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/executions:
    get:
      summary: List test workflow executions
      description: List test workflow executions
      operationId: listTestWorkflowExecutionsByTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/TagSelector'
        - $ref: '#/components/parameters/ActorName'
        - $ref: '#/components/parameters/ActorType'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowExecutionsResult'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Execute test workflow
      description: Execute test workflow in the kubernetes cluster
      operationId: executeTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/TestWorkflowExecutionName'
      requestBody:
        description: test workflow execution request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowExecutionRequest'
        required: true
      responses:
        '200':
          description: successful execution
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestWorkflowExecution'
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/executions/{executionID}:
    get:
      summary: Get test workflow execution
      description: Get test workflow execution details
      operationId: getTestWorkflowExecutionByTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/executionID'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflowExecution'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/executions/{executionID}/abort:
    post:
      summary: Abort test workflow execution
      description: Abort test workflow execution
      operationId: abortTestWorkflowExecutionByTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/executionID'
        - $ref: '#/components/parameters/ForceAgent'
      responses:
        '204':
          description: no content
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/executions/{executionID}/rerun:
    post:
      summary: Rerun test workflow execution
      description: Rerun test workflow execution
      operationId: rerunTestWorkflowExecutionByTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/executionID'
      requestBody:
        description: test workflow running context
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowRunningContext'
        required: true
      responses:
        '200':
          description: successful execution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestWorkflowExecution'
        '400':
          description: problem with body parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/metrics:
    get:
      summary: Get test workflow metrics
      description: Get metrics of test workflow executions
      operationId: getTestWorkflowMetrics
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionsMetrics'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '402':
          description: missing Pro subscription for a commercial feature
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/test-workflows/{id}/tags:
    get:
      summary: List test workflow execution tags
      description: List test workflow execution tags for all executed test workflows
      operationId: listTestWorkflowTagsByTestWorkflow
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: string
                example:
                  app:
                    - backend
                  env:
                    - prod
                  toDelete:
                    - 'yes'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/triggers:
    get:
      summary: List test triggers
      description: List test triggers from the kubernetes cluster
      operationId: listTestTriggers
      parameters:
        - $ref: '#/components/parameters/Namespace'
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful list operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestTrigger'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Create new test trigger
      description: Create new test trigger CRD inside a Kubernetes cluster
      operationId: createTestTrigger
      requestBody:
        description: test trigger body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestTriggerUpsertRequest'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestTrigger'
            text/yaml:
              schema:
                type: string
        '400':
          description: >-
            problem with test trigger definition - probably some bad input
            occurs (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete test triggers
      description: Deletes all or labeled test triggers
      operationId: deleteTestTriggers
      parameters:
        - $ref: '#/components/parameters/Namespace'
        - $ref: '#/components/parameters/Selector'
      responses:
        '204':
          description: no content
        '400':
          description: problem with selector parsing - probably some bad input occurs
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: test trigger not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    patch:
      summary: Bulk update test triggers
      description: Updates test triggers provided as an array in the request body
      operationId: bulkUpdateTestTriggers
      requestBody:
        description: array of test trigger upsert requests
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TestTriggerUpsertRequest'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestTrigger'
        '400':
          description: >-
            problem with test trigger definition - probably some bad input
            occurs (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/triggers/{id}:
    get:
      summary: Get test trigger by ID
      description: Get test trigger by ID from CRD in kubernetes cluster
      operationId: getTestTriggerByID
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/Namespace'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestTrigger'
            text/yaml:
              schema:
                type: string
        '404':
          description: test trigger not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete test trigger
      description: Deletes a test trigger
      operationId: deleteTestTrigger
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/Namespace'
      responses:
        '204':
          description: no content
        '404':
          description: test trigger not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    patch:
      summary: Update test trigger
      description: Update test trigger
      operationId: updateTestTrigger
      parameters:
        - $ref: '#/components/parameters/ID'
        - $ref: '#/components/parameters/Namespace'
        - name: mode
          in: query
          description: >
            Update mode for the trigger. When set to "replace", the entire
            trigger 

            is replaced with the request body (full replacement semantics). When
            not 

            set or set to any other value, merge semantics are used where only 

            non-null fields from the request are applied to the existing
            trigger.

            This is used by cloud-api to signal that the original request was
            YAML.
          schema:
            type: string
            enum:
              - replace
      requestBody:
        description: test trigger upsert request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestTriggerUpsertRequest'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestTrigger'
        '400':
          description: >-
            problem with test trigger definition - probably some bad input
            occurs (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: test trigger not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/webhook-templates:
    get:
      summary: List webhook templates
      description: List webhook templates available in cluster
      operationId: listWebhookTemplates
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebhookTemplate'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with input for CRD generation
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with read information from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Create new webhook template
      description: Create new webhook template based on variables passed in request
      operationId: createWebhookTemplate
      requestBody:
        description: webhook template request body data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTemplateCreateRequest'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            text/yaml:
              schema:
                type: string
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTemplate'
        '400':
          description: >-
            problem with webhook template definition - probably some bad input
            occurs (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete webhook templates
      description: Deletes labeled webhook templates
      operationId: deleteWebhookTemplates
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '204':
          description: no content
        '502':
          description: problem with read information from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/webhook-templates/{id}:
    get:
      summary: Get webhook template details
      description: Returns webhook template
      operationId: getWebhookTemplate
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTemplate'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with input for CRD generation
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: webhook template not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting webhook template data
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete webhook template
      description: Deletes webhook template by its name
      operationId: deleteWebhookTemplate
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '204':
          description: webhook template deleted successfuly
        '404':
          description: webhook template not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    patch:
      summary: Update new webhook template
      description: Update new webhook template based on variables passed in request
      operationId: updateWebhookTemplate
      parameters:
        - $ref: '#/components/parameters/ID'
      requestBody:
        description: webhook template request body data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTemplateUpdateRequest'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTemplate'
        '400':
          description: >-
            problem with webhook template definition - probably some bad input
            occurs (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: webhook template not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/webhooks:
    get:
      summary: List webhooks
      description: List webhooks available in cluster
      operationId: listWebhooks
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with input for CRD generation
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with read information from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    post:
      summary: Create new webhook
      description: Create new webhook based on variables passed in request
      operationId: createWebhook
      requestBody:
        description: webhook request body data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreateRequest'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            text/yaml:
              schema:
                type: string
        '201':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: >-
            problem with webhook definition - probably some bad input occurs
            (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete webhooks
      description: Deletes labeled webhooks
      operationId: deleteWebhooks
      parameters:
        - $ref: '#/components/parameters/Selector'
      responses:
        '204':
          description: no content
        '502':
          description: problem with read information from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/environments/{environmentId}/agent/webhooks/{id}:
    get:
      summary: Get webhook details
      description: Returns webhook
      operationId: getWebhook
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
            text/yaml:
              schema:
                type: string
        '400':
          description: problem with input for CRD generation
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: webhook not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '500':
          description: problem with getting webhook data
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    delete:
      summary: Delete webhook
      description: Deletes webhook by its name
      operationId: deleteWebhook
      parameters:
        - $ref: '#/components/parameters/ID'
      responses:
        '204':
          description: webhook deleted successfuly
        '404':
          description: webhook not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    patch:
      summary: Update new webhook
      description: Update new webhook based on variables passed in request
      operationId: updateWebhook
      parameters:
        - $ref: '#/components/parameters/ID'
      requestBody:
        description: webhook request body data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
          text/yaml:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: >-
            problem with webhook definition - probably some bad input occurs
            (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '404':
          description: webhook not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        '502':
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    parameters:
      - name: id
        in: path
        description: organizationId
        required: true
        schema:
          type: string
      - name: environmentId
        in: path
        description: environmentID
        required: true
        schema:
          type: string
  /organizations/{id}/groups:
    get:
      summary: List organization groups
      description: Lists the projects in an organization.
      operationId: listResourceGroups
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResourceGroup'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    post:
      summary: Create a resource group
      description: Creates a resource group.
      operationId: createResourceGroup
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Display name of the resource group
                  type: string
                slug:
                  description: Human- and URL friendly identifier.
                  type: string
                description:
                  description: Description of the resource group
                  type: string
              required:
                - name
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceGroup'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/groups/{groupID}:
    get:
      summary: Get a resource group
      description: Get a resource group by its `id`.
      operationId: getResourceGroup
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceGroup'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete a resource group
      description: Deletes a resource group.
      operationId: deleteResourceGroup
      responses:
        '204':
          description: Delete Success
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update a resource group
      description: Updates a resource groups information.
      operationId: updateResourceGroup
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Name of the resource group
                  type: string
                description:
                  description: Description of the resource group
                  type: string
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceGroup'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/GroupID'
  /organizations/{id}/groups/{groupID}/collaborators:
    get:
      summary: Lists all collaborators for this resource group
      description: Lists all collaborators for this resource group.
      operationId: listResourceGroupCollaborators
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Collaborator'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Adds all collaborators to this resource group
      description: Adds all collaborators to this resource group.
      operationId: addManyResourceGroupCollaborators
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                collaborators:
                  description: The collaborators to add to this resource group.
                  type: array
                  items:
                    type: string
                role:
                  description: The role to assign to all collaborators.
                  type: string
              required:
                - collaborators
                - role
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  collaborators:
                    type: array
                    items:
                      $ref: '#/components/schemas/Collaborator'
                  failed:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - BearerAuth: []
    delete:
      summary: Remove many members from this group
      description: Remove many members from this access group.
      operationId: removeManyResourceGroupCollaborators
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                collaborators:
                  description: The collaborators to remove from this group.
                  type: array
                  items:
                    type: string
              required:
                - collaborators
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  failed:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/GroupID'
  /organizations/{id}/insights/executions:
    get:
      summary: Get environment execution duration stats
      description: Get environment execution duration stats
      operationId: getExecutionInsights
      responses:
        '200':
          $ref: '#/components/responses/EnvironmentDurationStats'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/StartDateTime'
      - $ref: '#/components/parameters/EndDateTime'
      - $ref: '#/components/parameters/GroupBy'
      - $ref: '#/components/parameters/Environment'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/Status'
      - $ref: '#/components/parameters/Workflow'
  /organizations/{id}/insights/series:
    get:
      summary: Get time series insights
      description: Get time series insights
      operationId: getTimeSeriesInsights
      responses:
        '200':
          $ref: '#/components/responses/TimeSeriesData'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/StartDateTime'
      - $ref: '#/components/parameters/EndDateTime'
      - $ref: '#/components/parameters/Measure'
      - $ref: '#/components/parameters/Aggregate'
      - $ref: '#/components/parameters/Segment'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/Status'
      - $ref: '#/components/parameters/Workflow'
      - $ref: '#/components/parameters/Environment'
  /organizations/{id}/insights/series/executions:
    get:
      summary: Get execution references
      description: Get references to executions from insights
      operationId: listInsightExecutions
      responses:
        '200':
          description: Response
          headers:
            Link:
              $ref: '#/components/headers/link'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExecutionRef'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/StartDateTime'
      - $ref: '#/components/parameters/EndDateTime'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/Status'
      - $ref: '#/components/parameters/Workflow'
      - $ref: '#/components/parameters/Environment'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PageSize'
  /organizations/{id}/insights/stats:
    get:
      summary: Get environment execution count stats
      description: Get environment execution count stats
      operationId: getPassFailInsights
      responses:
        '200':
          $ref: '#/components/responses/EnvironmentExecutionStats'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/StartDateTime'
      - $ref: '#/components/parameters/EndDateTime'
      - $ref: '#/components/parameters/Workflow'
      - $ref: '#/components/parameters/Environment'
      - $ref: '#/components/parameters/Selector'
  /organizations/{id}/insights/workflows:
    get:
      summary: Get environment workflow summaries
      description: Get environment workflow summaries
      operationId: getWorkflowSummaryInsights
      responses:
        '200':
          $ref: '#/components/responses/EnvironmentWorkflowSummaries'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/StartDateTime'
      - $ref: '#/components/parameters/EndDateTime'
      - $ref: '#/components/parameters/Environment'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/Status'
      - $ref: '#/components/parameters/Workflow'
  /organizations/{id}/invites:
    get:
      summary: List organization invites
      description: Lists all invites for an organization.
      operationId: listInvites
      parameters:
        - name: status
          in: query
          description: The status of the invites.
          schema:
            type: string
            enum:
              - pending
              - revoked
              - accepted
              - declined
              - failed
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Invite'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    post:
      summary: Invite users to the organization
      description: Invites one or more users to this organization.
      operationId: createInvites
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                emails:
                  description: Email of the invitee.
                  type: array
                  items:
                    type: string
                role:
                  description: >-
                    The role that will be assigned to the person after
                    accepting.
                  type: string
                teams:
                  description: >-
                    Teams which the person will get access to after accepting
                    the invite.
                  type: array
                  items:
                    type: string
                envs:
                  description: >-
                    Environments which the person will get access to after
                    accepting the invite.
                  type: array
                  items:
                    type: string
                envRole:
                  description: >-
                    The role that will be assigned to the person's environments
                    after accepting.
                  type: string
              required:
                - emails
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  invites:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invite'
                  failed:
                    type: array
                    items:
                      type: string
                required:
                  - invites
                  - failed
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/invites/{inviteID}:
    get:
      summary: Get organization invite
      description: Get an invite for an organization with given id.
      operationId: getInvite
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invite'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Updates an organization invite
      description: Updates an organization invite.
      operationId: updateInvite
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  description: >-
                    The role that will be assigned to the person after
                    accepting.
                  type: string
                teams:
                  description: >-
                    Teams which the person will get access to after accepting
                    the invite.
                  type: array
                  items:
                    type: string
                envs:
                  description: >-
                    Environments which the person will get access to after
                    accepting the invite.
                  type: array
                  items:
                    type: string
                envRole:
                  description: >-
                    The role that will be assigned to the person's environments
                    after accepting.
                  type: string
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invite'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/InviteID'
  /organizations/{id}/invites/{inviteID}/resend:
    post:
      summary: Resend organization invite
      description: Resend an invite for an organization with given id.
      operationId: resendInvite
      responses:
        '201':
          $ref: '#/components/responses/NoContent'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/InviteID'
  /organizations/{id}/invites/{inviteID}/revoke:
    post:
      summary: Revoke organization invite
      description: Revoke an invite for an organization with given id.
      operationId: revokeInvite
      responses:
        '201':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/InviteID'
  /organizations/{id}/members:
    get:
      summary: Get organization members
      description: Get organizations members
      operationId: getOrganizationMembers
      responses:
        '200':
          $ref: '#/components/responses/Members'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - name: emailSearch
        in: query
        description: Filter members by email
        schema:
          type: string
  /organizations/{id}/members/{memberEmail}:
    delete:
      summary: Remove user from organization
      description: Remove user from organization
      operationId: deleteOrganizationMember
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequestError'
      security:
        - BearerAuth: []
    patch:
      summary: Update org member role
      description: Update all organization members
      operationId: updateOrganizationMemberRole
      requestBody:
        $ref: '#/components/requestBodies/MemberRoleChange'
      responses:
        '200':
          $ref: '#/components/responses/Member'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/MemberEmail'
  /organizations/{id}/members/{memberEmail}/permissions:
    get:
      summary: Get member permissions
      description: Retrieve the permissions for a specific member in an organization.
      operationId: getOrganizationMemberPermissions
      parameters:
        - name: id
          in: path
          description: The ID of the organization
          required: true
          schema:
            type: string
        - name: memberEmail
          in: path
          description: The email of the member
          required: true
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/MemberPermissionsResponse'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /organizations/{id}/teams:
    get:
      summary: List organization teams
      description: Lists the teams in an organization.
      operationId: listTeams
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Team'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    post:
      summary: Create a team
      description: Creates a team.
      operationId: createTeam
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: Display name of the team
                  type: string
                slug:
                  description: Human- and URL friendly identifier.
                  type: string
                description:
                  description: Description of the team
                  type: string
              required:
                - name
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/teams/{teamID}:
    get:
      summary: Get a team
      description: Get a team by its `id` or `slug.
      operationId: getTeam
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete a team
      description: Deletes a team.
      operationId: deleteTeam
      responses:
        '204':
          description: Delete Success
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    patch:
      summary: Update a team
      description: Updates a team's information.
      operationId: updateTeam
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: The new name of the team.
                  type: string
                description:
                  description: The new description of this team.
                  type: string
                slug:
                  description: The new slug of this team.
                  type: string
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/TeamID'
  /organizations/{id}/teams/{teamID}/members:
    get:
      summary: Lists all members for this team
      description: Lists all members for this team.
      operationId: listTeamMembers
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamMember'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Adds members to this team
      description: Adds many members to this team.
      operationId: addTeamMembers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                users:
                  description: The users to add to this environment.
                  type: array
                  items:
                    type: string
              required:
                - users
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  users:
                    type: array
                    items:
                      $ref: '#/components/schemas/TeamMember'
                  failed:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - BearerAuth: []
    delete:
      summary: Remove many members from this team
      description: Remove many members from this team.
      operationId: removeTeamMembers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                users:
                  description: The users to remove from this team.
                  type: array
                  items:
                    type: string
              required:
                - users
        required: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  failed:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/TeamID'
  /organizations/{id}/tokens:
    get:
      summary: List API Tokens
      description: Lists API Tokens for an Organization
      operationId: listAPITokens
      parameters:
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          $ref: '#/components/responses/Tokens'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    post:
      summary: Create API Token
      description: Creates an API Token for an Organization
      operationId: createAPIToken
      requestBody:
        $ref: '#/components/requestBodies/Token'
      responses:
        '200':
          $ref: '#/components/responses/Token'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
  /organizations/{id}/tokens/{tokenID}:
    get:
      summary: Get API Token
      description: >-
        Gets an API Token for an Organization. Only SCIM tokens can be
        retrieved, other token types will return Forbidden.
      operationId: getOrganizationToken
      responses:
        '200':
          $ref: '#/components/responses/Token'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - BearerAuth: []
    delete:
      summary: Delete API Token
      description: Deletes an API Token for an Organization
      operationId: deleteAPIToken
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/TokenID'
  /organizations/invites/{inviteID}/accept:
    get:
      summary: Accept email invite
      description: accept email invite
      operationId: acceptOrganizationEmailInvite
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  org:
                    type: string
                required:
                  - org
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      deprecated: true
      security:
        - BearerAuth: []
    parameters:
      - $ref: '#/components/parameters/InviteID'
  /status-pages/{statusPageID}:
    get:
      summary: Get status pages by ID
      description: Returns a status page for the given statusPageID
      operationId: getPublicStatusPageByID
      parameters:
        - name: statusPageID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusPage'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /status-pages/{statusPageID}/incidents:
    get:
      summary: Get incidents for status page
      description: Returns the list of incidents for the given statusPageID
      operationId: getPublicIncidentsByStatusPageID
      parameters:
        - $ref: '#/components/parameters/StatusPageID'
      responses:
        '200':
          $ref: '#/components/responses/Incidents'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /users/{id}/settings:
    get:
      summary: User settings, global for Testkube Pro or Enterprise
      description: Get API info like current version
      operationId: getUserSettings
      responses:
        '200':
          $ref: '#/components/responses/Settings'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      summary: Update setting for given parameter
      description: Update setting for given user
      operationId: updateUserSettings
      requestBody:
        $ref: '#/components/requestBodies/SettingUpsert'
      responses:
        '200':
          $ref: '#/components/responses/Setting'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '405':
          $ref: '#/components/responses/MethodNotAllowedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    parameters:
      - $ref: '#/components/parameters/ID'
  /users/preferences:
    post:
      summary: Create user preferences
      description: Create user preferences
      operationId: createUserPreferences
      requestBody:
        $ref: '#/components/requestBodies/Preferences'
      responses:
        '201':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
components:
  schemas:
    AIAssistant:
      type: object
      properties:
        id:
          description: Unique identifier of the AI assistant
          type: string
        name:
          description: Display name of the AI assistant
          type: string
        description:
          description: Optional description of the AI assistant
          type: string
        instructions:
          description: System prompt/instructions for the assistant
          type: string
        mcpServers:
          description: MCP server configurations for this assistant
          type: array
          items:
            $ref: '#/components/schemas/AssistantMCPServerConfig'
        labels:
          description: Labels for categorization
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
    AIAssistantCreate:
      type: object
      properties:
        name:
          description: Display name of the AI assistant
          type: string
        description:
          description: Optional description of the AI assistant
          type: string
        instructions:
          description: System prompt/instructions for the assistant
          type: string
        mcpServers:
          description: MCP server configurations for this assistant
          type: array
          items:
            $ref: '#/components/schemas/AssistantMCPServerConfig'
        labels:
          description: Labels for categorization
          type: object
          additionalProperties:
            type: string
      required:
        - name
        - instructions
    AIAssistantList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AIAssistant'
    AIAssistantUpdate:
      type: object
      properties:
        name:
          description: Display name of the AI assistant
          type: string
        description:
          description: Optional description of the AI assistant
          type: string
        instructions:
          description: System prompt/instructions for the assistant
          type: string
        mcpServers:
          description: MCP server configurations for this assistant
          type: array
          items:
            $ref: '#/components/schemas/AssistantMCPServerConfig'
        labels:
          description: Labels for categorization
          type: object
          additionalProperties:
            type: string
    AWSElasticBlockStoreVolumeSource:
      description: >-
        awsElasticBlockStore represents an AWS Disk resource that is attached to
        a kubelet's host machine and then exposed to the pod. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
      type: object
      properties:
        fsType:
          description: >-
            fsType is the filesystem type of the volume that you want to mount.
            Tip: Ensure that the filesystem type is supported by the host
            operating system. Examples: "ext4", "xfs", "ntfs". Implicitly
            inferred to be "ext4" if unspecified. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
            TODO: how do we prevent errors in the filesystem from compromising
            the machine
          type: string
        partition:
          description: >-
            partition is the partition in the volume that you want to mount. If
            omitted, the default is to mount by volume name. Examples: For
            volume /dev/sda1, you specify the partition as "1". Similarly, the
            volume partition for /dev/sda is "0" (or you can leave the property
            empty).
          type: integer
          format: int32
        readOnly:
          description: >-
            readOnly value true will force the readOnly setting in VolumeMounts.
            More info:
            https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
          type: boolean
        volumeID:
          description: >-
            volumeID is unique ID of the persistent disk resource in AWS (Amazon
            EBS volume). More info:
            https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
          type: string
      required:
        - volumeID
    Affinity:
      type: object
      properties:
        nodeAffinity:
          $ref: '#/components/schemas/NodeAffinity'
        podAffinity:
          $ref: '#/components/schemas/PodAffinity'
        podAntiAffinity:
          $ref: '#/components/schemas/PodAffinity'
    Agent:
      type: object
      properties:
        id:
          description: The unique identifier for the agent.
          type: string
        name:
          description: The unique name for the agent.
          type: string
        version:
          description: Last acknowledged agent version.
          type: string
        namespace:
          description: Last acknowledged agent namespace.
          type: string
        disabled:
          description: Is the Agent disabled?
          type: boolean
        labels:
          type: object
          additionalProperties:
            type: string
        environments:
          description: Environments where the agent is restricted to.
          type: array
          items:
            $ref: '#/components/schemas/AgentEnvironment'
        capabilities:
          description: Capabilities enabled for this agent.
          type: array
          items:
            $ref: '#/components/schemas/AgentCapability'
        runnerPolicy:
          $ref: '#/components/schemas/AgentRunnerPolicy'
        floating:
          type: boolean
        accessedAt:
          description: When it has been read last time by execution.
          type: string
          format: date-time
        createdAt:
          description: When it has been created last time.
          type: string
          format: date-time
        deletedAt:
          description: When it has been deleted.
          type: string
          format: date-time
        isSuperAgent:
          description: Whether this is a super agent.
          type: boolean
      required:
        - id
        - name
        - createdAt
        - floating
    AgentCapability:
      type: string
      enum:
        - runner
        - listener
        - gitops
        - webhooks
        - cloud-webhooks
        - cron-delegation
    AgentEnvironment:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
      required:
        - id
        - slug
        - name
    AgentRunnerPolicy:
      type: object
      properties:
        requiredMatch:
          type: array
          items:
            type: string
      required:
        - requiredMatch
    Any: {}
    ApiInfo:
      type: object
      properties:
        version:
          description: API version
          type: string
      required:
        - version
    AppArmorProfile:
      type: object
      properties:
        type:
          type: string
        localhostProfile:
          $ref: '#/components/schemas/BoxedString'
    ApplicationAuditEvent:
      description: Represents an audit event for application operations.
      type: object
      properties:
        id:
          description: Unique identifier for the audit event
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        createdAt:
          description: Timestamp when the event was created
          type: string
          format: date-time
          example: '2023-09-24T18:35:24Z'
        eventType:
          description: The type of the event
          type: string
        objects:
          description: List of objects the action was performed on
          type: array
          items:
            $ref: '#/components/schemas/Entity'
        subject:
          $ref: '#/components/schemas/Entity'
        source:
          description: Source of the event from where it originated
          type: string
          example: ui
        scope:
          description: Scope of the event - organization, environment, etc.
          type: string
          example: organization
        action:
          description: Action performed on the object
          type: string
          example: token.created
        metadata:
          $ref: '#/components/schemas/ApplicationAuditEventMetadata'
      required:
        - id
        - createdAt
        - eventType
        - objects
        - subject
        - source
        - scope
        - action
        - metadata
    ApplicationAuditEventMetadata:
      description: >
        Metadata object containing key-value pairs with additional information.

        This can store data such as environment IDs, organization IDs, or any
        custom information.
      type: object
      additionalProperties:
        type: string
    ApplicationAuditLog:
      description: List of audit events
      type: array
      items:
        $ref: '#/components/schemas/ApplicationAuditEvent'
    ApplicationAuditLogKeymap:
      description: >
        Represents a keymap that defines various audit-related types such as
        event types, actions, entity types,

        and sources. Each map contains a set of key-value pairs where keys
        represent internal identifiers and

        values represent human-readable descriptions.
      type: object
      properties:
        eventTypes:
          description: >
            A key-value map where keys are event types and values are
            descriptions or labels of the event types.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Field'
        actions:
          description: >
            A key-value map where keys are action types and values are
            descriptions or labels of the actions.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Field'
        entityTypes:
          description: >
            A key-value map where keys are entity types and values are
            descriptions or labels of the entity types.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Field'
        sources:
          description: >
            A key-value map where keys are sources and values are descriptions
            or labels of the sources.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Field'
      required:
        - eventTypes
        - actions
        - entityTypes
        - sources
    Artifact:
      description: API server artifact
      type: object
      properties:
        name:
          description: artifact file path
          type: string
        size:
          description: file size in bytes
          type: integer
        executionName:
          description: execution name that produced the artifact
          type: string
          example: test-1
        status:
          type: string
          enum:
            - ready
            - processing
            - failed
    ArtifactRequest:
      description: artifact request body with test artifacts
      type: object
      properties:
        storageClassName:
          description: artifact storage class name for container executor
          type: string
          example: artifact-volume-local
        volumeMountPath:
          description: artifact volume mount path for container executor
          type: string
        dirs:
          description: artifact directories for scraping
          type: array
          items:
            type: string
        masks:
          description: regexp to filter scraped artifacts, single or comma separated
          type: array
          items:
            type: string
        storageBucket:
          description: artifact bucket storage
          type: string
          example: test1-artifacts
        omitFolderPerExecution:
          description: don't use a separate folder for execution artifacts
          type: boolean
        sharedBetweenPods:
          description: whether to share volume between pods
          type: boolean
        useDefaultStorageClassName:
          description: whether to use default storage class name
          type: boolean
        sidecarScraper:
          description: run scraper as pod sidecar container
          type: boolean
    ArtifactURL:
      type: object
      properties:
        url:
          description: Download URL for the artifact
          type: string
      required:
        - url
    ArtifactUpdateRequest:
      description: artifact request update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/ArtifactRequest'
    AssertionResult:
      description: execution result data
      type: object
      properties:
        name:
          type: string
          example: assertion1
        status:
          type: string
          enum:
            - passed
            - failed
        errorMessage:
          type: string
          nullable: true
    AssistantMCPServerConfig:
      type: object
      properties:
        mcpServerId:
          description: ID of the MCP server to use
          type: string
        tools:
          description: Per-tool configuration keyed by tool name
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssistantMCPServerToolConfig'
      required:
        - mcpServerId
    AssistantMCPServerToolConfig:
      description: Per-tool configuration for an MCP server in an assistant
      type: object
      properties:
        enabled:
          description: Whether the tool is enabled
          type: boolean
          default: false
        autoApproved:
          description: Whether tool calls are auto-approved (no HITL prompt)
          type: boolean
          default: false
    AssistantSession:
      type: object
      properties:
        id:
          description: Unique identifier of the session
          type: string
        assistantId:
          description: ID of the AI assistant
          type: string
        name:
          description: Generated session name based on user input
          type: string
        status:
          $ref: '#/components/schemas/SessionStatus'
        instructions:
          description: Instructions/prompt for this session
          type: string
        executionContext:
          $ref: '#/components/schemas/ExecutionContext'
        error:
          description: Error message if the session failed
          type: string
        toolCalls:
          description: Tool calls made during this session
          type: array
          items:
            $ref: '#/components/schemas/SessionToolCall'
        startedAt:
          description: When the session started executing
          type: string
          format: date-time
        finishedAt:
          description: When the session finished
          type: string
          format: date-time
        createdBy:
          $ref: '#/components/schemas/SessionMessageActor'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        isArchived:
          description: Whether this session has been archived
          type: boolean
        inputTokens:
          description: Total input (prompt) tokens consumed across all invocations
          type: integer
          format: int64
        outputTokens:
          description: Total output (completion) tokens consumed across all invocations
          type: integer
          format: int64
        totalTokens:
          description: Total tokens consumed (input + output) across all invocations
          type: integer
          format: int64
        model:
          description: LLM model name used for generation
          type: string
      required:
        - id
        - assistantId
        - status
    AssistantSessionCreate:
      type: object
      properties:
        instructions:
          description: Instructions/prompt for this session
          type: string
        executionContext:
          $ref: '#/components/schemas/ExecutionContext'
    AuditLogDistinctSubjects:
      description: >-
        A key-value map where keys are entity types and values are distinct
        subjects.
      type: object
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/Entity'
    AuthOrganization:
      description: '[internal] An organization that can be joined.'
      type: object
      properties:
        id:
          description: ID is the identifier of this organization.
          type: string
        name:
          description: Name is the name of the organization
          type: string
        slug:
          description: Slug is the slug of this organization
          type: string
        memberCount:
          description: UserCount is the number of members within this organization.
          type: string
      required:
        - id
        - name
        - slug
        - memberCount
    AzureDiskVolumeSource:
      description: >-
        azureDisk represents an Azure Data Disk mount on the host and bind mount
        to the pod.
      type: object
      properties:
        cachingMode:
          $ref: '#/components/schemas/BoxedString'
        diskName:
          description: diskName is the Name of the data disk in the blob storage
          type: string
        diskURI:
          description: diskURI is the URI of data disk in the blob storage
          type: string
        fsType:
          $ref: '#/components/schemas/BoxedString'
        kind:
          $ref: '#/components/schemas/BoxedString'
        readOnly:
          description: >-
            readOnly Defaults to false (read/write). ReadOnly here will force
            the ReadOnly setting in VolumeMounts.
          type: boolean
      required:
        - diskName
        - diskURI
    AzureFileVolumeSource:
      description: >-
        azureFile represents an Azure File Service mount on the host and bind
        mount to the pod.
      type: object
      properties:
        readOnly:
          description: >-
            readOnly defaults to false (read/write). ReadOnly here will force
            the ReadOnly setting in VolumeMounts.
          type: boolean
        secretName:
          description: >-
            secretName is the  name of secret that contains Azure Storage
            Account Name and Key
          type: string
        shareName:
          description: shareName is the azure share Name
          type: string
      required:
        - secretName
        - shareName
    BasicObject:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
    BasicObjectWithOptionalID:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Board:
      type: object
      properties:
        id:
          description: The identifier of this board.
          type: string
        slug:
          description: A human- and url-friendly identifier of this board.
          type: string
        name:
          description: The name of this board.
          type: string
        description:
          description: The description of this board
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        layout: {}
        content:
          description: The content of this board.
          type: object
          properties:
            reports:
              type: array
              items:
                $ref: '#/components/schemas/Report'
            custom:
              type: array
              items:
                type: object
      required:
        - id
        - slug
        - name
        - createdAt
        - updatedAt
        - creator
        - shared
        - content
        - layout
    BoardSummary:
      type: object
      properties:
        id:
          description: The identifier of this board.
          type: string
        slug:
          description: A human- and url-friendly identifier of this board.
          type: string
        name:
          description: The name of this board.
          type: string
        description:
          description: The description of this board
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - slug
        - name
        - createdAt
        - updatedAt
        - shared
    BoxedBoolean:
      type: object
      properties:
        value:
          type: boolean
      required:
        - value
    BoxedInteger:
      type: object
      properties:
        value:
          type: integer
      required:
        - value
    BoxedString:
      type: object
      properties:
        value:
          type: string
      required:
        - value
    BoxedStringList:
      type: object
      properties:
        value:
          type: array
          items:
            type: string
      required:
        - value
    CSIVolumeSource:
      description: >-
        Represents a source location of a volume to mount, managed by an
        external CSI driver
      type: object
      properties:
        driver:
          description: driver is the name of the CSI driver that handles this volume.
          type: string
        readOnly:
          $ref: '#/components/schemas/BoxedBoolean'
        fsType:
          $ref: '#/components/schemas/BoxedString'
        volumeAttributes:
          description: >-
            volumeAttributes stores driver-specific properties that are passed
            to the CSI driver. Consult your driver's documentation for supported
            values.
          type: object
          additionalProperties:
            type: string
        nodePublishSecretRef:
          $ref: '#/components/schemas/LocalObjectReference'
    CephFSVolumeSource:
      description: >-
        cephFS represents a Ceph FS mount on the host that shares a pod's
        lifetime
      type: object
      properties:
        monitors:
          description: >-
            monitors is Required: Monitors is a collection of Ceph monitors More
            info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
          type: array
          items:
            type: string
        path:
          description: >-
            path is Optional: Used as the mounted root, rather than the full
            Ceph tree, default is /
          type: string
        readOnly:
          description: >-
            readOnly is Optional: Defaults to false (read/write). ReadOnly here
            will force the ReadOnly setting in VolumeMounts. More info:
            https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
          type: boolean
        secretFile:
          description: >-
            secretFile is Optional: SecretFile is the path to key ring for User,
            default is /etc/ceph/user.secret More info:
            https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
          type: string
        secretRef:
          $ref: '#/components/schemas/LocalObjectReference'
        user:
          description: >-
            user is optional: User is the rados user name, default is admin More
            info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
          type: string
      required:
        - monitors
    ClaimSource:
      type: object
      properties:
        resourceClaimName:
          $ref: '#/components/schemas/BoxedString'
        resourceClaimTemplateName:
          $ref: '#/components/schemas/BoxedString'
    Collaborator:
      type: object
      properties:
        kind:
          description: Either user or team.
          type: string
        id:
          description: The identifier of this collaborator.
          type: string
        name:
          description: The display name of this collaborator.
          type: string
        createdAt:
          description: The timestamp at which this collaborator was added.
          type: string
          format: date-time
        role:
          description: The role of this collaborator
          type: string
        email:
          description: The email of this user. Null in case of a team.
          type: string
        slug:
          description: The slug of this team. Null in case of a user.
          type: string
        memberCount:
          description: The number of members in this team. Null in case of a user.
          type: integer
      required:
        - id
        - name
        - createdAt
        - kind
        - role
    ConcurrentRunnersTimeSeriesEntry:
      type: object
      properties:
        ts:
          type: string
          format: date-time
        last:
          type: integer
        min:
          type: integer
        max:
          type: integer
        avg:
          type: number
      required:
        - ts
        - last
        - min
        - max
        - avg
    Config:
      description: Testkube API config data structure
      type: object
      properties:
        id:
          type: string
        clusterId:
          type: string
        enableTelemetry:
          type: boolean
      required:
        - id
        - clusterId
        - enableTelemetry
    ConfigMapEnvSource:
      type: object
      properties:
        name:
          type: string
        optional:
          type: boolean
          nullable: true
          default: false
      required:
        - name
    ConfigMapRef:
      description: Testkube internal reference for data in Kubernetes config maps
      type: object
      properties:
        namespace:
          description: object kubernetes namespace
          type: string
        name:
          description: object name
          type: string
        key:
          description: object key
          type: string
      required:
        - name
        - key
    ConfigMapVolumeSource:
      description: configMap represents a configMap that should populate this volume
      type: object
      properties:
        defaultMode:
          $ref: '#/components/schemas/BoxedInteger'
        items:
          description: >-
            items if unspecified, each key-value pair in the Data field of the
            referenced ConfigMap will be projected into the volume as a file
            whose name is the key and content is the value. If specified, the
            listed keys will be projected into the specified paths, and unlisted
            keys will not be present. If a key is specified which is not present
            in the ConfigMap, the volume setup will error unless it is marked
            optional. Paths must be relative and may not contain the '..' path
            or start with '..'.
          type: array
          items:
            description: Maps a string key to a path within a volume.
            type: object
            properties:
              key:
                description: key is the key to project.
                type: string
              mode:
                $ref: '#/components/schemas/BoxedInteger'
              path:
                description: >-
                  path is the relative path of the file to map the key to. May
                  not be an absolute path. May not contain the path element
                  '..'. May not start with the string '..'.
                type: string
            required:
              - key
              - path
        name:
          description: >-
            Name of the referent. More info:
            https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
            TODO: Add other useful fields. apiVersion, kind, uid?
          type: string
        optional:
          description: optional specify whether the ConfigMap or its keys must be defined
          type: boolean
    ConfigSummary:
      type: object
      properties:
        exists:
          type: boolean
        overrides:
          type: boolean
        sensitive:
          type: boolean
        truncated:
          type: boolean
      required:
        - exists
        - overrides
        - sensitive
        - truncated
    ContentGitAuthType:
      description: auth type for git requests
      type: string
      enum:
        - basic
        - header
    Credential:
      type: object
      properties:
        name:
          description: The identifier for the credential.
          type: string
        type:
          description: The type of credential (secret, variable, or vault).
          type: string
          enum:
            - secret
            - variable
            - vault
        value:
          description: >-
            The value of the credential (only included for variables, not
            secrets).
          type: string
        reference:
          description: >-
            The credential reference that can be used in test workflow
            expressions.
          type: string
        environmentId:
          description: Environment ID where the credential is restricted to.
          type: string
        workflowName:
          description: Workflow Name where the credential is restricted to.
          type: string
        executionId:
          description: Execution ID where the credential is restricted to.
          type: string
        accessedAt:
          description: When it has been read last time by execution.
          type: string
          format: date-time
        createdAt:
          description: When it has been created last time.
          type: string
          format: date-time
        updatedAt:
          description: When its value has been updated last time.
          type: string
          format: date-time
      required:
        - name
        - createdAt
        - updatedAt
    DebugInfo:
      description: Testkube debug info
      type: object
      properties:
        clientVersion:
          type: string
          example: 1.4.9
        serverVersion:
          type: string
          example: v1.4.9
        clusterVersion:
          type: string
          example: v1.23.4
        apiLogs:
          type: array
          items:
            type: string
          example:
            - logline1
            - logline2
            - logline3
        operatorLogs:
          type: array
          items:
            type: string
          example:
            - logline1
            - logline2
            - logline3
    DownloadArtifactOptions:
      description: options to download artifacts from previous steps
      type: object
      properties:
        allPreviousSteps:
          type: boolean
          default: false
        previousStepNumbers:
          description: previous step numbers starting from 1
          type: array
          items:
            type: integer
        previousTestNames:
          description: previous test names
          type: array
          items:
            type: string
    EmptyDirVolumeSource:
      description: >-
        emptyDir represents a temporary directory that shares a pod's lifetime.
        More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
      type: object
      properties:
        medium:
          description: >-
            medium represents what type of storage medium should back this
            directory. The default is "" which means to use the node's default
            medium. Must be an empty string (default) or Memory. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#emptydir
          type: string
        sizeLimit:
          $ref: '#/components/schemas/BoxedString'
    Entity:
      description: Holds information about an action participant.
      type: object
      properties:
        id:
          description: Unique identifier for the entity
          type: string
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          description: Name of the entity.
          type: string
          example: John Doe
        metadata:
          $ref: '#/components/schemas/ApplicationAuditEventMetadata'
        entityType:
          description: Type of the entity.
          type: string
          example: user
      required:
        - id
        - name
        - uri
        - entityType
    EnvFromSource:
      type: object
      properties:
        prefix:
          type: string
        configMapRef:
          $ref: '#/components/schemas/ConfigMapEnvSource'
        secretRef:
          $ref: '#/components/schemas/SecretEnvSource'
    EnvReference:
      description: Reference to env resource
      type: object
      properties:
        reference:
          $ref: '#/components/schemas/LocalObjectReference'
        mount:
          description: whether we shoud mount resource
          type: boolean
          example: /etc/data
        mountPath:
          description: where we shoud mount resource
          type: string
        mapToVariables:
          description: whether we shoud map to variables from resource
          type: boolean
          default: false
      required:
        - reference
    EnvStatus:
      type: object
      properties:
        status:
          description: State of the environment
          type: string
          enum:
            - Green
            - Yellow
            - Red
            - Gray
          example: Green
        sourceOfTruth:
          description: Whether this environment is the source of truth in CP.
          type: boolean
          example: true
      required:
        - status
    EnvVar:
      type: object
      properties:
        global:
          $ref: '#/components/schemas/BoxedBoolean'
        name:
          type: string
        value:
          type: string
        valueFrom:
          $ref: '#/components/schemas/EnvVarSource'
    EnvVarSource:
      description: EnvVarSource represents a source for the value of an EnvVar.
      type: object
      properties:
        configMapKeyRef:
          description: Selects a key of a ConfigMap.
          type: object
          properties:
            key:
              description: The key to select.
              type: string
            name:
              description: >-
                Name of the referent. More info:
                https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                TODO: Add other useful fields. apiVersion, kind, uid?
              type: string
            optional:
              description: Specify whether the ConfigMap or its key must be defined
              type: boolean
              nullable: true
          required:
            - key
        fieldRef:
          $ref: '#/components/schemas/FieldRef'
        resourceFieldRef:
          $ref: '#/components/schemas/ResourceFieldRef'
        secretKeyRef:
          description: Selects a key of a secret in the pod's namespace
          type: object
          properties:
            key:
              description: >-
                The key of the secret to select from.  Must be a valid secret
                key.
              type: string
            name:
              description: >-
                Name of the referent. More info:
                https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                TODO: Add other useful fields. apiVersion, kind, uid?
              type: string
            optional:
              description: Specify whether the Secret or its key must be defined
              type: boolean
              nullable: true
          required:
            - key
    Environment:
      allOf:
        - $ref: '#/components/schemas/BasicObject'
        - type: object
          properties:
            slug:
              description: Human- and URL friendly identifier
              type: string
              example: demo-environment
            connected:
              description: State of the agent connection
              type: boolean
              example: true
            status:
              description: State of the environment
              type: string
              enum:
                - Green
                - Yellow
                - Red
              example: Green
            organizationID:
              description: organizationID
              type: string
              example: 733420bd-7e56-461f-8431-6378759e60ae
            sourceOfTruthSince:
              description: >-
                The time stamp during which this environment became the source
                of truth.
              type: string
              format: date-time
            agentToken:
              description: agent token for environment
              type: string
              example: tkcagnt_adead343112adeadcaaaaa221daee2
            connectCommand:
              description: >-
                command to connect existing Testkube OSS installation to the
                Testkube Pro
              type: string
              example: testkube pro connect --agent-key tkcagnt_111
            disconnectCommand:
              description: >-
                command to disconnect from testkube pro and get back to
                standalone OSS mode
              type: string
              example: testkube pro disconnect
            installCommand:
              description: command to install/upgrade agent
              type: string
              example: >-
                helm upgrade --install --create-namespace testkube
                testkube/testkube --set
                testkube-api.cloud.url=agent.example.com:443 --set
                testkube-api.cloud.key=<api-key> --set
                testkube-api.minio.enabled=false --set mongodb.enabled=false
                --namespace testkube
            installCommandCli:
              description: command to install/upgrade agent
              type: string
              example: >-
                testkube init-cloud --agent-key tkcagnt_111 --agent-url
                agent.example.com:443
            configureContextCommand:
              description: command to configure
              type: string
              example: >-
                testkube context set --api-url https://api.example.com --api-key
                <api-key> --agent-url https://agent.example.com --agent-key
                <agent-key>
            features:
              type: array
              items:
                $ref: '#/components/schemas/EnvironmentFeature'
            runDockerCommand:
              description: command to run Docker agent
              type: string
              example: >-
                docker run -d --privileged --name=testkube-agent -e AGENT_KEY=AK
                kubeshop/testkube-agent:1.2.3
            runDockerCommandCli:
              description: command to run Docker agent
              type: string
              example: testkube docker init --agent-token=AK --org-id=org --env-id=env
            upgradeDockerCommand:
              description: command to upgrade Docker agent
              type: string
              example: >-
                docker exec testkube-agent helm upgrade testkube
                testkube/testkube --namespace testkube --set
                testkube-api.minio.enabled=false --set mongodb.enabled=false
                --set testkube-api.cloud.key=AK --set
                testkube-api.cloud.url=api.testkube.io:999 --set
                testkube-api.dockerImageVersion=1.2.3
            upgradeDockerCommandCli:
              description: command to upgrade Docker agent
              type: string
              example: testkube upgrade
            cloudStorage:
              description: should this environment store data in the control plane
              type: boolean
            newArchitecture:
              description: should this environment use the new architecture
              type: boolean
            runnerJoinToken:
              description: token to register a runner with the environment
              type: string
            runnerConcurrencyLimit:
              description: The global runner capacity for this environment.
              type: integer
            environmentQueueLimit:
              description: The queue limit for this environment.
              type: integer
            installRunnerCommand:
              description: command to install runner
              type: string
              example: >-
                helm install --create-namespace runner testkube/testkube-runner
                --set runner.register.token=<runner-token> --set
                runner.orgId=<org-id> --namespace testkube
    EnvironmentDurationStats:
      description: >-
        Average workflow execution duration and execution count statistics
        grouped by status.
      type: object
      properties:
        count:
          $ref: '#/components/schemas/ExecutionsCountByGrouping'
        duration:
          $ref: '#/components/schemas/ExecutionsDurationByGrouping'
      required:
        - count
        - duration
    EnvironmentExecutionStats:
      description: >-
        Overall statistics, including totals, ratio, and statistics for passed
        and failed executions.
      type: object
      properties:
        ratioStats:
          $ref: '#/components/schemas/GroupedExecutionsRatioStats'
        totalStats:
          $ref: '#/components/schemas/GroupedExecutionsStats'
        failedStats:
          $ref: '#/components/schemas/GroupedExecutionsStats'
      required:
        - ratioStats
        - totalStats
        - failedStats
    EnvironmentFeature:
      type: object
      properties:
        name:
          description: feature name
          type: string
        displayName:
          description: feature display name
          type: string
        description:
          description: feature description
          type: string
        learnMoreUrl:
          description: URL to learn more about the feature
          type: string
          format: uri
        enabled:
          description: is feature enabled?
          type: boolean
      required:
        - name
        - enabled
    EnvironmentFeatures:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/EnvironmentRole'
        features:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentFeature'
      required:
        - role
        - features
    EnvironmentMember:
      type: object
      properties:
        email:
          description: user email
          type: string
          example: jack.the.ripper@testkube.io
        status:
          $ref: '#/components/schemas/MemberStatus'
        role:
          $ref: '#/components/schemas/EnvironmentRole'
        inviteID:
          description: Current Invite ID
          type: string
          example: 1234567890-12312321-123123-3333
        invitingEmail:
          description: Inviting user email
          type: string
          example: pikachu@testkube.io
      required:
        - email
    EnvironmentMembers:
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentMember'
    EnvironmentRole:
      type: string
      enum:
        - read
        - run
        - write
        - admin
        - artifact
    EnvironmentUsage:
      type: object
      properties:
        organizationId:
          description: organization id
          type: string
        environmentId:
          description: environment id
          type: string
        usersCount:
          description: number of users in an environment
          type: integer
        stats:
          $ref: '#/components/schemas/UsageStats'
      required:
        - organizationId
        - environmentId
        - usersCount
        - stats
    EnvironmentVersion:
      type: object
      properties:
        environmentId:
          description: environment id
          type: string
        environmentName:
          description: environment name
          type: string
        version:
          description: version string in semver form e.g. 1.0.0
          type: string
        needUpdate:
          description: is agent version outdated
          type: boolean
          default: false
        dockerImageVersion:
          description: docker image version
          type: string
          example: 2.1.2
      required:
        - environmentId
        - environmentName
        - version
        - needUpdate
    EnvironmentWorkflowSummaries:
      description: A list of environment workflow summaries.
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentWorkflowSummary'
    EnvironmentWorkflowSummary:
      type: object
      properties:
        name:
          description: The name of the workflow.
          type: string
        totalExecutionCount:
          description: The total number of executions.
          type: integer
          format: int32
        failedExecutionCount:
          description: The number of failed executions.
          type: integer
          format: int32
        averageDuration:
          description: The average execution duration in milliseconds.
          type: integer
          format: int64
        p95Duration:
          description: The p95 execution duration in milliseconds.
          type: integer
          format: int64
        lastRunAt:
          description: The timestamp of the last execution.
          type: string
          format: date-time
        labels:
          $ref: '#/components/schemas/Labels'
      required:
        - name
        - totalExecutionCount
        - failedExecutionCount
        - averageDuration
        - p95Duration
        - lastRunAt
        - labels
    Environments:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
      required:
        - elements
    Event:
      description: Event data
      type: object
      properties:
        id:
          description: UUID of event
          type: string
        streamTopic:
          description: stream topic
          type: string
        groupId:
          description: ID for event group
          type: string
        resource:
          $ref: '#/components/schemas/EventResource'
        resourceId:
          description: ID of resource
          type: string
        type:
          $ref: '#/components/schemas/EventType'
        testExecution:
          $ref: '#/components/schemas/Execution'
        testSuiteExecution:
          $ref: '#/components/schemas/TestSuiteExecution'
        testWorkflowExecution:
          $ref: '#/components/schemas/TestWorkflowExecution'
        clusterName:
          description: cluster name of event
          type: string
        envs:
          description: environment variables
          type: object
          additionalProperties:
            type: string
          example:
            WEBHOOK_PARAMETER: any value
        external:
          type: boolean
      required:
        - type
        - id
        - resourceId
        - resource
    EventResource:
      type: string
      enum:
        - test
        - testsuite
        - executor
        - trigger
        - webhook
        - webhooktemplate
        - testexecution
        - testsuiteexecution
        - testsource
        - testworkflow
        - testworkflowexecution
    EventResult:
      description: Listener result after sending particular event
      type: object
      properties:
        id:
          description: UUID of event
          type: string
        error:
          description: error message if any
          type: string
        result:
          description: result of event
          type: string
          format: error
      required:
        - type
    EventSeries:
      type: object
      properties:
        count:
          type: integer
        lastObservedTime:
          description: The timestamp at which this event last occurred.
          type: string
          format: date-time
      required:
        - count
        - lastObservedTime
    EventTarget:
      type: object
      properties:
        kind:
          type: string
        name:
          type: string
        uid:
          type: string
      required:
        - kind
    EventType:
      type: string
      enum:
        - start-test
        - end-test-success
        - end-test-failed
        - end-test-aborted
        - end-test-timeout
        - become-test-up
        - become-test-down
        - become-test-failed
        - become-test-aborted
        - become-test-timeout
        - start-testsuite
        - end-testsuite-success
        - end-testsuite-failed
        - end-testsuite-aborted
        - end-testsuite-timeout
        - become-testsuite-up
        - become-testsuite-down
        - become-testsuite-failed
        - become-testsuite-aborted
        - become-testsuite-timeout
        - queue-testworkflow
        - start-testworkflow
        - end-testworkflow-success
        - end-testworkflow-failed
        - end-testworkflow-aborted
        - end-testworkflow-canceled
        - end-testworkflow-not-passed
        - become-testworkflow-up
        - become-testworkflow-down
        - become-testworkflow-failed
        - become-testworkflow-aborted
        - become-testworkflow-canceled
        - become-testworkflow-not-passed
        - created
        - updated
        - deleted
    ExecAction:
      type: object
      properties:
        command:
          description: >-
            Command is the command line to execute inside the container, the
            working directory for the command is root ('/') in the container's
            filesystem. Exit status of 0 is treated as live/healthy and non-zero
            is unhealthy.
          type: array
          items:
            type: string
    Execution:
      description: test execution
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc4
        testName:
          description: unique test name (CRD Test name)
          type: string
          example: example-test
        testSuiteName:
          description: >-
            unique test suite name (CRD Test suite name), if it's run as a part
            of test suite
          type: string
          example: test-suite1
        testNamespace:
          description: test namespace
          type: string
          example: testkube
        testType:
          description: test type e.g. postman/collection
          type: string
          example: postman/collection
        name:
          description: execution name
          type: string
          example: test-suite1-example-test-1
        number:
          description: execution number
          type: integer
          example: 1
        envs:
          description: >-
            Environment variables passed to executor. Deprecated: use Basic
            Variables instead
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            record: 'true'
          deprecated: true
        command:
          description: executor image command
          type: array
          items:
            type: string
          example:
            - curl
        args:
          description: additional arguments/flags passed to executor binary
          type: array
          items:
            type: string
          example:
            - '--concurrency'
            - '2'
            - '--remote'
            - '--some'
            - blabla
        args_mode:
          description: usage mode for arguments
          type: string
          enum:
            - append
            - override
            - replace
        variables:
          $ref: '#/components/schemas/Variables'
        isVariablesFileUploaded:
          description: >-
            in case the variables file is too big, it will be uploaded to
            storage
          type: boolean
          example: false
        variablesFile:
          description: >-
            variables file content - need to be in format for particular
            executor (e.g. postman envs file)
          type: string
        testSecretUUID:
          description: test secret uuid
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        testSuiteSecretUUID:
          description: test suite secret uuid, if it's run as a part of test suite
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        content:
          $ref: '#/components/schemas/TestContent'
        startTime:
          description: test start time
          type: string
          format: date-time
        endTime:
          description: test end time
          type: string
          format: date-time
        duration:
          description: test duration
          type: string
          example: 88s
        durationMs:
          description: test duration in milliseconds
          type: integer
          example: 10000
        executionResult:
          $ref: '#/components/schemas/ExecutionResult'
          description: result get from executor
        labels:
          description: test and execution labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        uploads:
          description: list of file paths that need to be copied into the test from uploads
          type: array
          items:
            type: string
          example:
            - settings/config.txt
        bucketName:
          description: minio bucket name to get uploads from
          type: string
          example: execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43
        artifactRequest:
          $ref: '#/components/schemas/ArtifactRequest'
          description: configuration parameters for storing test artifacts
        preRunScript:
          description: script to run before test execution
          type: string
          example: echo -n '$SECRET_ENV' > ./secret_file
        postRunScript:
          description: script to run after test execution
          type: string
          example: sleep 30
        executePostRunScriptBeforeScraping:
          description: execute post run script before scraping (prebuilt executor only)
          type: boolean
        sourceScripts:
          description: run scripts using source command (container executor only)
          type: boolean
        runningContext:
          $ref: '#/components/schemas/RunningContext'
          description: running context for the test execution
        containerShell:
          description: shell used in container executor
          type: string
          example: /bin/sh
        testExecutionName:
          description: test execution name started the test execution
          type: string
        downloadArtifactExecutionIDs:
          description: execution ids for artifacts to download
          type: array
          items:
            type: string
        downloadArtifactTestNames:
          description: test names for artifacts to download from latest executions
          type: array
          items:
            type: string
        slavePodRequest:
          $ref: '#/components/schemas/PodRequest'
          description: configuration parameters for executed slave pods
        executionNamespace:
          description: namespace for test execution (Pro edition only)
          type: string
        disableWebhooks:
          description: whether webhooks on this execution are disabled
          type: boolean
          default: false
          example:
            - true
            - false
    ExecutionContext:
      type: object
      properties:
        executionId:
          description: ID of the test execution
          type: string
        executionName:
          description: Name of the test execution
          type: string
        workflowName:
          description: Name of the workflow (if applicable)
          type: string
    ExecutionContextTypeV2:
      type: string
      enum:
        - ui
        - cli
        - ci/cd
        - cron
        - testtrigger
        - kubernetesobject
        - execution
    ExecutionContextV2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ExecutionContextTypeV2'
        id:
          type: string
        name:
          type: string
      required:
        - type
    ExecutionCore:
      description: test execution core
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc4
        number:
          description: execution number
          type: integer
          example: 1
        startTime:
          description: test start time
          type: string
          format: date-time
        endTime:
          description: test end time
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/ExecutionStatus'
    ExecutionRef:
      type: object
      properties:
        id:
          description: The identifier of this execution.
          type: string
        name:
          description: The name of this execution.
          type: string
        environment:
          description: The environment in which this execution was run
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        workflowAnnotations:
          description: Annotations from the test workflow
          type: object
          additionalProperties:
            type: string
        kind:
          description: The test definition's kind. Either Test, TestSuite or TestWorkflow.
          type: string
        parent:
          description: The name of the test definition to which this execution belongs.
          type: string
        status:
          description: The status of this execution. Either passed, failed or skipped.
          type: string
        duration:
          description: The duration of this execution, in milliseconds.
          type: integer
          format: int32
        runAt:
          description: The moment this execution started.
          type: string
          format: date-time
        runnerId:
          description: The identifier of the runner that executed this execution.
          type: string
        tags:
          description: Tag values to pass to the test workflow execution
          type: object
          additionalProperties:
            type: string
        reports:
          description: generated reports from the steps, like junit
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowReport'
        runningContext:
          $ref: '#/components/schemas/TestWorkflowRunningContext'
        health:
          description: Health indicator for the workflow at the time of this execution
          allOf:
            - $ref: '#/components/schemas/TestWorkflowExecutionHealth'
        configParams:
          $ref: '#/components/schemas/TestWorkflowExecutionConfig'
      required:
        - id
        - name
        - environment
        - kind
        - parent
        - status
        - duration
        - runAt
    ExecutionReferenceV2:
      type: object
      properties:
        id:
          type: string
        number:
          type: integer
        name:
          type: string
        status:
          $ref: '#/components/schemas/ExecutionStatusV2'
        durationMs:
          type: integer
        runnerId:
          type: string
        assignedAt:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        tags:
          type: object
          additionalProperties:
            type: string
        resourceAggregations:
          type: boolean
        config:
          $ref: '#/components/schemas/ConfigSummary'
        reports:
          $ref: '#/components/schemas/ReportsSummary'
        silentMode:
          $ref: '#/components/schemas/SilentMode'
      required:
        - id
        - number
        - name
        - status
        - scheduledAt
        - resourceAggregations
    ExecutionRefs:
      type: object
      properties:
        count:
          description: >-
            The total amount of executions. For workflow-executions method, this
            may be -1 to indicate unknown total with more pages available.
          type: integer
        elements:
          description: >-
            A list of execution references of Test, Test Suites or Test
            Workflows.
          type: array
          items:
            $ref: '#/components/schemas/ExecutionRef'
        method:
          description: Indicates which method was used to generate this response.
          type: string
          enum:
            - all-executions
            - workflow-executions
        hasNextPage:
          description: >-
            Indicates if there are more pages available (only present for
            workflow-executions method).
          type: boolean
      required:
        - count
        - elements
        - method
    ExecutionRequest:
      description: test execution request body
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        name:
          description: test execution custom name
          type: string
          example: testing with 1000 users
        testSuiteName:
          description: >-
            unique test suite name (CRD Test suite name), if it's run as a part
            of test suite
          type: string
          example: test-suite1
        number:
          description: test execution number
          type: integer
        executionLabels:
          description: test execution labels
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            users: '3'
        namespace:
          description: test kubernetes namespace ("testkube" when not set)
          type: string
          example: testkube
        isVariablesFileUploaded:
          description: in case the variables file is too big, it will be uploaded
          type: boolean
          example: false
        variablesFile:
          description: >-
            variables file content - need to be in format for particular
            executor (e.g. postman envs file)
          type: string
        variables:
          $ref: '#/components/schemas/Variables'
        testSecretUUID:
          description: test secret uuid
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        testSuiteSecretUUID:
          description: test suite secret uuid, if it's run as a part of test suite
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        command:
          description: executor image command
          type: array
          items:
            type: string
          example:
            - curl
        args:
          description: additional executor binary arguments
          type: array
          items:
            type: string
          example:
            - '--repeats'
            - '5'
            - '--insecure'
        args_mode:
          description: usage mode for arguments
          type: string
          enum:
            - append
            - override
            - replace
        image:
          description: container image, executor will run inside this image
          type: string
          example: kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91
        imagePullSecrets:
          description: container image pull secrets
          type: array
          items:
            $ref: '#/components/schemas/LocalObjectReference'
        envs:
          description: >-
            Environment variables passed to executor. Deprecated: use Basic
            Variables instead
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            record: 'true'
          deprecated: true
        secretEnvs:
          description: >-
            Execution variables passed to executor from secrets. Deprecated: use
            Secret Variables instead
          type: object
          additionalProperties:
            type: string
          example:
            secret_Key_name2: secret-name
            secret_key_name1: secret-name
          deprecated: true
        sync:
          description: whether to start execution sync or async
          type: boolean
        httpProxy:
          description: http proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8080
        httpsProxy:
          description: https proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8081
        negativeTest:
          description: whether to run test as negative test
          type: boolean
          example: false
        isNegativeTestChangedOnRun:
          description: whether negativeTest was changed by user
          type: boolean
          example: false
        activeDeadlineSeconds:
          description: duration in seconds the test may be active, until its stopped
          type: integer
          format: int64
          example: 1
        uploads:
          description: list of file paths that need to be copied into the test from uploads
          type: array
          items:
            type: string
          example:
            - settings/config.txt
        bucketName:
          description: minio bucket name to get uploads from
          type: string
          example: execution-c01d7cf6-ec3f-47f0-9556-a5d6e9009a43
        artifactRequest:
          $ref: '#/components/schemas/ArtifactRequest'
          description: configuration parameters for storing test artifacts
        jobTemplate:
          description: job template extensions
          type: string
        jobTemplateReference:
          description: name of the template resource
          type: string
        cronJobTemplate:
          description: cron job template extensions
          type: string
        cronJobTemplateReference:
          description: name of the template resource
          type: string
        contentRequest:
          $ref: '#/components/schemas/TestContentRequest'
          description: adjusting parameters for test content
        preRunScript:
          description: script to run before test execution
          type: string
          example: echo -n '$SECRET_ENV' > ./secret_file
        postRunScript:
          description: script to run after test execution
          type: string
          example: sleep 30
        executePostRunScriptBeforeScraping:
          description: execute post run script before scraping (prebuilt executor only)
          type: boolean
        sourceScripts:
          description: run scripts using source command (container executor only)
          type: boolean
        scraperTemplate:
          description: scraper template extensions
          type: string
        scraperTemplateReference:
          description: name of the template resource
          type: string
        pvcTemplate:
          description: pvc template extensions
          type: string
        pvcTemplateReference:
          description: name of the template resource
          type: string
        envConfigMaps:
          description: config map references
          type: array
          items:
            $ref: '#/components/schemas/EnvReference'
        envSecrets:
          description: secret references
          type: array
          items:
            $ref: '#/components/schemas/EnvReference'
        runningContext:
          $ref: '#/components/schemas/RunningContext'
          description: running context for the test execution
        testExecutionName:
          description: test execution name started the test execution
          type: string
        downloadArtifactExecutionIDs:
          description: execution ids for artifacts to download
          type: array
          items:
            type: string
        downloadArtifactTestNames:
          description: test names for artifacts to download from latest executions
          type: array
          items:
            type: string
        slavePodRequest:
          $ref: '#/components/schemas/PodRequest'
          description: configuration parameters for executed slave pods
        executionNamespace:
          description: namespace for test execution (Pro edition only)
          type: string
        disableWebhooks:
          description: whether webhooks on this execution are disabled
          type: boolean
          default: false
          example:
            - true
            - false
    ExecutionResult:
      description: execution result returned from executor
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ExecutionStatus'
        output:
          description: >-
            RAW Test execution output, depends of reporter used in particular
            tool
          type: string
        outputType:
          description: output type depends of reporter used in particular tool
          type: string
          enum:
            - text/plain
            - application/junit+xml
            - application/json
        errorMessage:
          description: >-
            error message when status is error, separate to output as output can
            be partial in case of error
          type: string
        steps:
          description: execution steps (for collection of requests)
          type: array
          items:
            $ref: '#/components/schemas/ExecutionStepResult'
        reports:
          type: object
          properties:
            junit:
              type: string
      required:
        - status
    ExecutionStatus:
      type: string
      enum:
        - queued
        - running
        - passed
        - failed
        - aborted
        - timeout
        - skipped
        - canceled
    ExecutionStatusV2:
      type: string
      enum:
        - queued
        - running
        - paused
        - passed
        - failed
        - aborted
    ExecutionStepResult:
      description: execution result data
      type: object
      properties:
        name:
          description: step name
          type: string
          example: step1
        duration:
          type: string
          format: duration
          example: 10m0s
        status:
          description: execution step status
          type: string
          enum:
            - passed
            - failed
        assertionResults:
          type: array
          items:
            $ref: '#/components/schemas/AssertionResult'
      required:
        - name
        - status
    ExecutionSummary:
      description: Execution summary
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc4
        name:
          description: execution name
          type: string
          example: test-suite1-test1
        number:
          description: execution number
          type: integer
          example: 1
        testName:
          description: name of the test
          type: string
          example: test1
        testNamespace:
          description: name of the test
          type: string
          example: testkube
        testType:
          description: the type of test for this execution
          type: string
          example: postman/collection
        status:
          $ref: '#/components/schemas/ExecutionStatus'
        startTime:
          description: test execution start time
          type: string
          format: date-time
        endTime:
          description: test execution end time
          type: string
          format: date-time
        duration:
          description: calculated test duration
          type: string
          example: '00:00:13'
        durationMs:
          description: calculated test duration in ms
          type: integer
          example: 10000
        labels:
          description: test and execution labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        runningContext:
          $ref: '#/components/schemas/RunningContext'
          description: running context for the test execution
      required:
        - id
        - name
        - testName
        - testType
        - status
    ExecutionTarget:
      type: object
      properties:
        match:
          description: runner labels to match
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        not:
          description: runner labels to NOT match
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        replicate:
          description: list of runner labels to replicate the executions
          type: array
          items:
            type: string
    ExecutionTargetV2:
      type: object
      properties:
        match:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        not:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        replicate:
          type: array
          items:
            type: string
    ExecutionTotalsV2:
      type: object
      properties:
        queued:
          type: integer
        running:
          type: integer
        paused:
          type: integer
        passed:
          type: integer
        failed:
          type: integer
        aborted:
          type: integer
        canceled:
          type: integer
      required:
        - queued
        - running
        - paused
        - passed
        - failed
        - aborted
        - canceled
    ExecutionUpdateRequest:
      description: test execution request update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/ExecutionRequest'
    ExecutionsCountByGrouping:
      description: Statistics of executions, grouped by status.
      type: object
      properties:
        total:
          description: The total number of executions.
          type: integer
          format: int32
        values:
          $ref: '#/components/schemas/GroupedExecutionCountByGrouping'
      required:
        - total
        - values
    ExecutionsDurationByGrouping:
      description: >-
        Statistics of average execution durations in milliseconds, grouped by
        status.
      type: object
      properties:
        total:
          description: The total duration of all executions in milliseconds.
          type: integer
          format: int64
        values:
          $ref: '#/components/schemas/GroupedExecutionDurationsByGrouping'
      required:
        - total
        - values
    ExecutionsMetrics:
      type: object
      properties:
        passFailRatio:
          description: Percentage pass to fail ratio
          type: number
          example: 50
        executionDurationP50:
          description: 50th percentile of all durations
          type: string
          example: 7m2.71s
        executionDurationP50ms:
          description: 50th percentile of all durations in milliseconds
          type: integer
          example: 422
        executionDurationP90:
          description: 90th percentile of all durations
          type: string
          example: 7m2.71s
        executionDurationP90ms:
          description: 90th percentile of all durations in milliseconds
          type: integer
          example: 422
        executionDurationP95:
          description: 95th percentile of all durations
          type: string
          example: 7m2.71s
        executionDurationP95ms:
          description: 95th percentile of all durations in milliseconds
          type: integer
          example: 422
        executionDurationP99:
          description: 99th percentile of all durations
          type: string
          example: 7m2.71s
        executionDurationP99ms:
          description: 99th percentile of all durations in milliseconds
          type: integer
          example: 422
        totalExecutions:
          description: total executions number
          type: integer
          example: 2
        failedExecutions:
          description: failed executions number
          type: integer
          example: 1
        executions:
          description: List of test/testsuite executions
          type: array
          items:
            $ref: '#/components/schemas/ExecutionsMetricsExecutions'
    ExecutionsMetricsExecutions:
      type: object
      properties:
        executionId:
          type: string
        groupId:
          type: string
        duration:
          type: string
        durationMs:
          type: integer
        status:
          type: string
        name:
          type: string
        startTime:
          type: string
          format: date-time
        runnerId:
          type: string
    ExecutionsResult:
      description: the result for a page of executions
      type: object
      properties:
        totals:
          $ref: '#/components/schemas/ExecutionsTotals'
        filtered:
          $ref: '#/components/schemas/ExecutionsTotals'
        results:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionSummary'
      required:
        - totals
        - results
    ExecutionsTotals:
      description: various execution counters
      type: object
      properties:
        results:
          description: the total number of executions available
          type: integer
        passed:
          description: the total number of passed executions available
          type: integer
        failed:
          description: the total number of failed executions available
          type: integer
        queued:
          description: the total number of queued executions available
          type: integer
        running:
          description: the total number of running executions available
          type: integer
      required:
        - results
        - passed
        - failed
        - queued
        - running
        - paused
    Executor:
      description: CRD based executor data
      type: object
      properties:
        executorType:
          description: >-
            ExecutorType one of "rest" for rest openapi based executors or "job"
            which will be default runners for testkube soon
          type: string
        image:
          description: Image for kube-job
          type: string
        slaves:
          $ref: '#/components/schemas/SlavesMeta'
        imagePullSecrets:
          description: container image pull secrets
          type: array
          items:
            $ref: '#/components/schemas/LocalObjectReference'
        command:
          description: executor image command
          type: array
          items:
            type: string
          example:
            - curl
        args:
          description: additional executor binary argument
          type: array
          items:
            type: string
          example:
            - '--repeats'
            - '5'
            - '--insecure'
        types:
          description: >-
            Types defines what types can be handled by executor e.g.
            "postman/collection", ":curl/command" etc
          type: array
          items:
            type: string
        uri:
          description: URI for rest based executors
          type: string
        contentTypes:
          description: list of handled content types
          type: array
          items:
            type: string
        jobTemplate:
          description: Job template to launch executor
          type: string
        jobTemplateReference:
          description: name of the template resource
          type: string
        labels:
          description: executor labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        features:
          description: Available executor features
          type: array
          items:
            type: string
            enum:
              - artifacts
              - junit-report
        meta:
          $ref: '#/components/schemas/ExecutorMeta'
        useDataDirAsWorkingDir:
          description: use data dir as working dir for executor
          type: boolean
    ExecutorDetails:
      description: >-
        Executor details with Executor data and additional information like list
        of executions
      type: object
      properties:
        name:
          description: Executor name
          type: string
        executor:
          $ref: '#/components/schemas/Executor'
        executions:
          $ref: '#/components/schemas/ExecutionsResult'
    ExecutorMeta:
      description: Executor meta data
      type: object
      properties:
        iconURI:
          description: URI for executor icon
          type: string
          example: /assets/k6.jpg
        docsURI:
          description: URI for executor docs
          type: string
          example: https://docs.testkube.io/test-types/executor-k6
        tooltips:
          description: executor tooltips
          type: object
          additionalProperties:
            type: string
          example:
            general: please provide k6 test script for execution
    ExecutorMetaUpdate:
      description: Executor meta update data
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/ExecutorMeta'
    ExecutorOutput:
      description: CRD based executor data
      type: object
      properties:
        type:
          description: One of possible output types
          type: string
          enum:
            - error
            - log
            - event
            - result
        content:
          description: Message/event data passed from executor (like log lines etc)
          type: string
        result:
          $ref: '#/components/schemas/ExecutionResult'
          description: Execution result when job is finished
        time:
          description: Timestamp of log
          type: string
          format: date-time
          example: '2018-03-20T09:12:28Z'
      required:
        - type
    ExecutorUpdateRequest:
      description: executor update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Executor'
        - $ref: '#/components/schemas/ObjectRef'
    ExecutorUpsertRequest:
      description: executor create request body
      type: object
      required:
        - name
        - namespace
        - types
      allOf:
        - $ref: '#/components/schemas/Executor'
        - $ref: '#/components/schemas/ObjectRef'
    Features:
      type: object
      properties:
        testkubeMode:
          description: Enterprise / Pro mode
          type: string
          enum:
            - enterprise
            - cloud
        storageType:
          type: string
          enum:
            - s3
            - minio
            - gcs
      required:
        - testkubeMode
        - storageType
    Field:
      type: object
      properties:
        name:
          description: Name is a human-readable/pretty-printed name of the field.
          type: string
          example: Test Trigger
        description:
          description: // Description is description of the field.
          type: string
          example: Some description of a field
      required:
        - name
        - description
    FieldRef:
      description: >-
        Selects a field of the pod: supports metadata.name, metadata.namespace,
        `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
        spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP,
        status.podIPs.
      type: object
      properties:
        apiVersion:
          description: >-
            Version of the schema the FieldPath is written in terms of, defaults
            to "v1".
          type: string
        fieldPath:
          description: Path of the field to select in the specified API version.
          type: string
      required:
        - fieldPath
    GCEPersistentDiskVolumeSource:
      description: >-
        gcePersistentDisk represents a GCE Disk resource that is attached to a
        kubelet's host machine and then exposed to the pod. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
      type: object
      properties:
        fsType:
          description: >-
            fsType is filesystem type of the volume that you want to mount. Tip:
            Ensure that the filesystem type is supported by the host operating
            system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be
            "ext4" if unspecified. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
            TODO: how do we prevent errors in the filesystem from compromising
            the machine
          type: string
        partition:
          description: >-
            partition is the partition in the volume that you want to mount. If
            omitted, the default is to mount by volume name. Examples: For
            volume /dev/sda1, you specify the partition as "1". Similarly, the
            volume partition for /dev/sda is "0" (or you can leave the property
            empty). More info:
            https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
          type: integer
          format: int32
        pdName:
          description: >-
            pdName is unique name of the PD resource in GCE. Used to identify
            the disk in GCE. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
          type: string
        readOnly:
          description: >-
            readOnly here will force the ReadOnly setting in VolumeMounts.
            Defaults to false. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
          type: boolean
      required:
        - pdName
    GRPCAction:
      type: object
      properties:
        port:
          type: integer
        service:
          $ref: '#/components/schemas/BoxedString'
    GroupedExecutionCountByGrouping:
      description: >-
        An array of touples of string and int32 representing the execution
        grouping and count
      type: array
      items: {}
    GroupedExecutionDurationsByGrouping:
      description: >-
        An array of touples of string and int64 representing the execution
        grouping and average execution duration (milliseconds).
      type: array
      items: {}
    GroupedExecutionsCountByTimestamp:
      description: An array of touples representing counts of execution timestamp and count
      type: array
      items: {}
    GroupedExecutionsRatioByTimestamp:
      description: >-
        A map from string to float64 representing the ratio of executions,
        grouped by timestamp.
      type: array
      items: {}
    GroupedExecutionsRatioStats:
      description: Statistics of pass/fail ratio.
      type: object
      properties:
        total:
          description: The average pass ratio.
          type: number
          format: double
        values:
          $ref: '#/components/schemas/GroupedExecutionsRatioByTimestamp'
      required:
        - total
        - values
    GroupedExecutionsStats:
      description: Statistics of executions, including total and grouped counts.
      type: object
      properties:
        total:
          description: The total number of executions.
          type: integer
          format: int32
        values:
          $ref: '#/components/schemas/GroupedExecutionsCountByTimestamp'
      required:
        - total
        - values
    HTTPGetAction:
      type: object
      properties:
        path:
          type: string
        port:
          type: string
        host:
          type: string
        scheme:
          type: string
        httpHeaders:
          type: array
          items:
            $ref: '#/components/schemas/HTTPHeader'
    HTTPHeader:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
    HostAlias:
      type: object
      properties:
        ip:
          type: string
        hostnames:
          type: array
          items:
            type: string
    HostPathVolumeSource:
      description: >-
        hostPath represents a pre-existing file or directory on the host machine
        that is directly exposed to the container. This is generally used for
        system agents or other privileged things that are allowed to see the
        host machine. Most containers will NOT need this. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#hostpath ---
        TODO(jonesdl) We need to restrict who can use host directory mounts and
        who can/can not mount host directories as read/write.
      type: object
      properties:
        path:
          description: >-
            path of the directory on the host. If the path is a symlink, it will
            follow the link to the real path. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#hostpath
          type: string
        type:
          $ref: '#/components/schemas/BoxedString'
      required:
        - path
    HubspotVisitorSession:
      type: object
      properties:
        token:
          description: Hubspot visitor's session token
          type: string
          example: >-
            eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqb2huQGV4YW1wbGUuY29tIiwiYXVkIjoiMjM5MTY4MzIiLCJsYXN0X25hbWUiOiJFeGFtcGxlIiwiZXhwIjoxNjkzNDI3MTIwLCJpYXQiOjE2OTMzODM5MjAsImZpcnN0X25hbWUiOiJKb2huIn0.KFo8zTQOmBym0mN3haz72jW_Qb4RVFjs9IcG6_h7Lbo
      required:
        - token
    ImagePullPolicy:
      type: string
      enum:
        - Always
        - Never
        - IfNotPresent
    Incident:
      allOf:
        - $ref: '#/components/schemas/BasicObjectWithOptionalID'
        - type: object
          properties:
            name:
              description: Name of the incident
              type: string
              example: API migration problem
            severity:
              description: the severity of the outage caused by the incident
              type: string
              enum:
                - critical
                - major
                - minor
                - low
                - info
            visibility:
              description: specifies how public the incident is
              type: string
              enum:
                - draft
                - published
                - archived
            description:
              description: incident details in markdown
              type: string
              example: >-
                API Service was down due to unexpected changes in one of the
                dependencies.
            startDate:
              description: start of the incident
              type: string
              format: date-time
              nullable: true
            endDate:
              description: end of the incident
              type: string
              format: date-time
              nullable: true
          required:
            - name
            - severity
            - visibility
            - description
    Incidents:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Incident'
      required:
        - elements
    Invite:
      type: object
      properties:
        id:
          description: The identifier of this invite.
          type: string
        organization:
          description: The organization to which the invitee is invited.
          type: string
        status:
          description: The status of this invite.
          type: string
          enum:
            - pending
            - revoked
            - accepted
            - declined
            - failed
        email:
          description: The email of the invitee.
          type: string
        inviter:
          description: The email of the inviter.
          type: string
        token:
          description: >-
            The invite token that allows you to accept this invite. This will
            only be present when the invite email is an exact match with your
            user account.
          type: string
        role:
          description: >-
            The role that will be assigned to the user when he accepts the
            meeting.
          type: string
        envRole:
          description: >-
            The role that will be assigned to the user's envs when he accepts
            the meeting.
          type: string
        envs:
          description: >-
            The environments that will be assigned to the user when he accepts
            the meeting.
          type: array
          items:
            type: string
        teams:
          description: >-
            The teams that will be assigned to the user when he accepts the
            meeting.
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        revokedAt:
          type: string
          format: date-time
        acceptedAt:
          type: string
          format: date-time
        declinedAt:
          type: string
          format: date-time
      required:
        - id
        - organization
        - email
        - status
        - inviter
        - role
        - createdAt
        - updatedAt
    InvoiceDetails:
      type: object
      properties:
        total:
          description: total amount in cents
          type: integer
          example: 4500
        totalExcludingTax:
          description: total amount in cents
          type: integer
          example: 4500
        subscriptionId:
          description: subscription id
          type: string
          example: sub_1234567890
        currency:
          description: currency
          type: string
          example: usd
        customerEmail:
          type: string
          example: i@kubeshop.io
        billingReason:
          description: reason for billing
          type: string
          example: upcoming
        description:
          description: description of the invoice
          type: string
          example: Kubeshop Test Subscription
        periodStart:
          description: start of the period
          type: string
          format: date-time
          example: '2021-09-01T00:00:00Z'
        periodEnd:
          description: end of the period
          type: string
          format: date-time
          example: '2021-09-30T00:00:00Z'
      required:
        - total
        - totalExcludingTax
        - subscriptionId
        - currency
        - customerEmail
        - billingReason
        - description
        - periodStart
        - periodEnd
    JUnitReport:
      description: Represents the root element, which can contain one or more test suites
      type: object
      properties:
        name:
          type: string
        testSuites:
          type: array
          items:
            $ref: '#/components/schemas/JUnitTestSuite'
        summary:
          $ref: '#/components/schemas/JUnitTestSuitesSummary'
    JUnitTestCase:
      description: Represents an individual test case element
      type: object
      properties:
        _id:
          description: Internal ID, randomly generated
          type: string
        name:
          type: string
        className:
          type: string
        time:
          description: The total duration in milliseconds.
          type: integer
          format: int64
        status:
          type: string
        systemOut:
          type: string
        systemErr:
          type: string
        failure:
          type: string
      required:
        - _id
        - name
    JUnitTestSuite:
      description: Represents a test suite element
      type: object
      properties:
        testCases:
          type: array
          items:
            $ref: '#/components/schemas/JUnitTestCase'
        name:
          type: string
        tests:
          type: integer
        failures:
          type: integer
        errors:
          type: integer
        time:
          description: The duration in milliseconds.
          type: integer
          format: int64
        disabled:
          type: integer
        skipped:
          type: integer
        package:
          type: string
        properties:
          type: object
          additionalProperties:
            type: string
        systemOut:
          type: string
        systemErr:
          type: string
      required:
        - _id
        - testCases
        - name
    JUnitTestSuitesSummary:
      description: Summary of all test suites
      type: object
      properties:
        name:
          type: string
        time:
          description: The total duration in milliseconds.
          type: integer
          format: int64
        tests:
          type: integer
        failures:
          type: integer
        errors:
          type: integer
        disabled:
          type: integer
    JoinOrganization:
      description: Join Organization response data
      type: object
      properties:
        organizationId:
          type: string
        environments:
          type: array
          items:
            type: string
      required:
        - organizationId
        - environmentId
    LabelSelector:
      type: object
      properties:
        matchLabels:
          type: object
          additionalProperties:
            type: string
        matchExpressions:
          type: array
          items:
            $ref: '#/components/schemas/LabelSelectorRequirement'
    LabelSelectorRequirement:
      type: object
      properties:
        key:
          type: string
        operator:
          type: string
        values:
          type: array
          items:
            type: string
    Labels:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
      example:
        app:
          - backend
        env:
          - prod
    License:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          example: licenses
        name:
          type: string
          example: John Doe
        expiry:
          description: expiration date
          type: string
          format: date-time
          example: '2006-01-02T15:04:05Z'
        lastValidated:
          description: last validation date
          type: string
          format: date-time
          example: '2006-01-02T15:04:05Z'
        created:
          description: creation time
          type: string
          format: date-time
          example: '2006-01-02T15:04:05Z'
        updated:
          description: update time
          type: string
          format: date-time
          example: '2006-01-02T15:04:05Z'
        isTrial:
          description: is current license trial
          type: boolean
          default: false
        limits:
          $ref: '#/components/schemas/PlanLimits'
        llmKey:
          description: LLM key for onboarding and demo envs
          type: string
    LocalObjectReference:
      description: Reference to Kubernetes object
      type: object
      properties:
        name:
          type: string
    Log:
      type: object
      properties:
        lineNumber:
          description: line number in the log file
          type: integer
          example: 123
        severity:
          description: severity of the log
          type: string
          example: INFO
        line:
          description: log line
          type: string
          example: This is a log line
        timestamp:
          description: timestamp of the log
          type: string
          format: date-time
          example: '2006-01-02T15:04:05Z'
      required:
        - lineNumber
        - severity
        - line
        - timestamp
    LogV1:
      description: Log format version 1
      type: object
      properties:
        result:
          $ref: '#/components/schemas/ExecutionResult'
          description: output for previous log format
      required:
        - type
    LogV2:
      description: Log format version 2
      type: object
      properties:
        time:
          description: Timestamp of log
          type: string
          format: date-time
          example: '2018-03-20T09:12:28Z'
        content:
          description: Message/event data passed from executor (like log lines etc)
          type: string
        type:
          description: One of possible log types
          type: string
        source:
          description: One of possible log sources
          type: string
          enum:
            - job-pod
            - test-scheduler
            - container-executor
            - job-executor
        error:
          description: indicates a log error
          type: boolean
        version:
          description: One of possible log versions
          type: string
          enum:
            - v1
            - v2
        metadata:
          description: additional log details
          type: object
          additionalProperties:
            type: string
          example:
            argsl: passed command arguments
        v1:
          $ref: '#/components/schemas/LogV1'
          description: >-
            Old output - for backwards compatibility - will be removed for
            non-structured logs
      required:
        - logVersion
        - source
    Logs:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Log'
        stats:
          $ref: '#/components/schemas/LogsStats'
      required:
        - elements
        - stats
    LogsSearchKeyword:
      description: array of search strings and priorities
      type: object
      properties:
        priority:
          description: priority of the search keywords category
          type: integer
          example: 1
        color:
          description: color highlight of the matches in logs
          type: string
          example: '#53acf0'
        searchStrings:
          type: array
          items:
            description: search string for the log analysis
            type: string
          example:
            - failed to fetch
            - failed to connect
      required:
        - priority
        - color
        - searchStrings
      example:
        color: '#53acf0'
        priority: 1
        searchStrings:
          - failed to fetch, failed to connect
    LogsSearchKeywords:
      description: >-
        map with the key severity and value array of search strings and
        priorities
      type: object
      additionalProperties:
        $ref: '#/components/schemas/LogsSearchKeyword'
      example:
        error:
          color: '#53acf0'
          priority: 1
          searchStrings:
            - failed to fetch, failed to connect
    LogsStats:
      type: object
      properties:
        lines:
          description: number of lines in the log file
          type: integer
          example: 123
        bytes:
          description: size of the log file in bytes
          type: integer
          example: 123456
      required:
        - lines
        - bytes
    MCPOAuthAuthorizeRequest:
      description: Request to generate OAuth authorization URL
      type: object
      properties:
        redirectUri:
          description: Frontend callback URL after OAuth completes
          type: string
        responseMode:
          description: How to handle the OAuth response
          type: string
          enum:
            - popup
            - redirect
          default: popup
    MCPOAuthAuthorizeResponse:
      description: Response containing OAuth authorization URL
      type: object
      properties:
        authorizationUrl:
          description: URL to redirect user for OAuth authorization
          type: string
        state:
          description: Encrypted OAuth state parameter
          type: string
      required:
        - authorizationUrl
        - state
    MCPOAuthStatus:
      description: OAuth authentication status for a user
      type: object
      properties:
        authenticated:
          description: Whether the user has valid OAuth tokens
          type: boolean
        expiresAt:
          description: When the current access token expires
          type: string
          format: date-time
        scopes:
          description: Scopes granted by the OAuth provider
          type: array
          items:
            type: string
        needsReauth:
          description: Whether user needs to re-authenticate
          type: boolean
      required:
        - authenticated
    MCPOAuthTokens:
      description: OAuth tokens for MCP server authentication
      type: object
      properties:
        accessToken:
          description: OAuth access token
          type: string
        refreshToken:
          description: OAuth refresh token
          type: string
        tokenType:
          description: Token type (usually Bearer)
          type: string
        expiresAt:
          description: When the access token expires
          type: string
          format: date-time
        scopes:
          description: Scopes granted by the OAuth provider
          type: array
          items:
            type: string
        clientId:
          description: OAuth client ID from Dynamic Client Registration
          type: string
        clientSecret:
          description: OAuth client secret from Dynamic Client Registration
          type: string
      required:
        - accessToken
        - tokenType
    MCPServer:
      type: object
      properties:
        id:
          description: Unique identifier of the MCP server
          type: string
        name:
          description: Display name of the MCP server
          type: string
        description:
          description: Optional description of the MCP server
          type: string
        type:
          description: >-
            Type of MCP server connection (http for HTTP-based, sse for
            Server-Sent Events, stdio for local binaries)
          type: string
          enum:
            - http
            - sse
            - stdio
          default: http
        url:
          description: MCP server endpoint URL (required for http/sse type)
          type: string
        command:
          description: Command to execute for stdio type MCP servers
          type: string
        args:
          description: Arguments for the command (stdio type only)
          type: array
          items:
            type: string
        headers:
          description: Optional headers for MCP server requests
          type: object
          additionalProperties:
            type: string
        status:
          description: Connection status of the MCP server
          type: string
          enum:
            - unknown
            - active
            - error
        lastConnectedAt:
          description: Last successful connection time
          type: string
          format: date-time
        lastError:
          description: Last error message if status is error
          type: string
        authType:
          description: Authentication type for this MCP server
          type: string
          enum:
            - none
            - headers
            - oauth
          default: none
        oauthConfig:
          $ref: '#/components/schemas/MCPServerOAuthConfig'
        oauthAuthenticated:
          description: >-
            Whether the current user has authenticated with this OAuth MCP
            server
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - url
    MCPServerCreate:
      type: object
      properties:
        name:
          description: Display name of the MCP server
          type: string
        description:
          description: Optional description of the MCP server
          type: string
        type:
          description: >-
            Type of MCP server connection (http for HTTP-based, sse for
            Server-Sent Events, stdio for local binaries)
          type: string
          enum:
            - http
            - sse
            - stdio
          default: http
        url:
          description: MCP server endpoint URL (required for http/sse type)
          type: string
        command:
          description: Command to execute for stdio type MCP servers
          type: string
        args:
          description: Arguments for the command (stdio type only)
          type: array
          items:
            type: string
        headers:
          description: Optional headers for MCP server requests
          type: object
          additionalProperties:
            type: string
        authType:
          description: Authentication type for this MCP server
          type: string
          enum:
            - none
            - headers
            - oauth
          default: none
        oauthConfig:
          $ref: '#/components/schemas/MCPServerOAuthConfig'
      required:
        - name
        - url
    MCPServerList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/MCPServer'
    MCPServerOAuthConfig:
      description: OAuth 2.1 configuration for MCP server authentication
      type: object
      properties:
        clientId:
          description: OAuth client ID
          type: string
        clientSecret:
          description: OAuth client secret (write-only, not returned in responses)
          type: string
        authorizationUrl:
          description: OAuth authorization endpoint URL
          type: string
        tokenUrl:
          description: OAuth token endpoint URL
          type: string
        scopes:
          description: OAuth scopes to request
          type: array
          items:
            type: string
      required:
        - clientId
        - authorizationUrl
        - tokenUrl
    MCPServerTool:
      type: object
      properties:
        id:
          description: Unique identifier of the tool
          type: string
        mcpServerId:
          description: ID of the MCP server this tool belongs to
          type: string
        name:
          description: Name of the tool
          type: string
        description:
          description: Description of the tool
          type: string
        inputSchema:
          description: JSON Schema for tool input parameters
          type: object
          additionalProperties: true
        enabled:
          description: Whether the tool is enabled for use
          type: boolean
        available:
          description: Whether the tool is currently available on the MCP server
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - mcpServerId
        - name
        - enabled
        - available
    MCPServerToolList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/MCPServerTool'
    MCPServerToolUpdate:
      type: object
      properties:
        enabled:
          description: Whether the tool should be enabled
          type: boolean
    MCPServerUpdate:
      type: object
      properties:
        name:
          description: Display name of the MCP server
          type: string
        description:
          description: Optional description of the MCP server
          type: string
        type:
          description: >-
            Type of MCP server connection (http for HTTP-based, sse for
            Server-Sent Events, stdio for local binaries)
          type: string
          enum:
            - http
            - sse
            - stdio
        url:
          description: MCP server endpoint URL (required for http/sse type)
          type: string
        command:
          description: Command to execute for stdio type MCP servers
          type: string
        args:
          description: Arguments for the command (stdio type only)
          type: array
          items:
            type: string
        headers:
          description: Optional headers for MCP server requests
          type: object
          additionalProperties:
            type: string
        authType:
          description: Authentication type for this MCP server
          type: string
          enum:
            - none
            - headers
            - oauth
        oauthConfig:
          $ref: '#/components/schemas/MCPServerOAuthConfig'
    Member:
      type: object
      properties:
        id:
          type: string
        email:
          description: user email
          type: string
          example: jack.the.ripper@testkube.io
        status:
          $ref: '#/components/schemas/MemberStatus'
        role:
          $ref: '#/components/schemas/MemberRole'
        inviteID:
          description: Current Invite ID
          type: string
          example: 1234567890-12312321-123123-3333
        invitingEmail:
          description: Inviting user email
          type: string
          example: pikachu@testkube.io
        cascadedRoles:
          type: array
          items:
            type: string
        lastActivityAt:
          type: string
          format: date-time
      required:
        - email
    MemberRole:
      type: string
      enum:
        - owner
        - admin
        - biller
        - member
    MemberRoleChange:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/MemberRole'
      required:
        - role
    MemberStatus:
      description: Did Member confirmed organization subscription
      type: string
      enum:
        - Invited
        - Accepted
        - Rejected
        - Revoked
      example: Invited
    Members:
      type: array
      items:
        $ref: '#/components/schemas/Member'
    NFSVolumeSource:
      description: >-
        nfs represents an NFS mount on the host that shares a pod's lifetime
        More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
      type: object
      properties:
        path:
          description: >-
            path that is exported by the NFS server. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#nfs
          type: string
        readOnly:
          description: >-
            readOnly here will force the NFS export to be mounted with read-only
            permissions. Defaults to false. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#nfs
          type: boolean
        server:
          description: >-
            server is the hostname or IP address of the NFS server. More info:
            https://kubernetes.io/docs/concepts/storage/volumes#nfs
          type: string
      required:
        - path
        - server
    NodeAffinity:
      type: object
      properties:
        requiredDuringSchedulingIgnoredDuringExecution:
          $ref: '#/components/schemas/NodeSelector'
        preferredDuringSchedulingIgnoredDuringExecution:
          type: array
          items:
            $ref: '#/components/schemas/PreferredSchedulingTerm'
    NodeSelector:
      type: object
      properties:
        nodeSelectorTerms:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorTerm'
    NodeSelectorRequirement:
      type: object
      properties:
        key:
          type: string
        operator:
          type: string
        values:
          type: array
          items:
            type: string
    NodeSelectorTerm:
      type: object
      properties:
        matchExpressions:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorRequirement'
        matchFields:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorRequirement'
    ObjectRef:
      type: object
      properties:
        namespace:
          description: object kubernetes namespace
          type: string
          example: testkube
        name:
          description: object name
          type: string
          example: name
      required:
        - name
    Organization:
      allOf:
        - $ref: '#/components/schemas/BasicObject'
        - type: object
          properties:
            slug:
              description: Human- and URL friendly identifier
              type: string
              example: my-personal-org
            plan:
              $ref: '#/components/schemas/Plan'
            members:
              type: array
              items:
                $ref: '#/components/schemas/Member'
    OrganizationEnvironmentsVersions:
      type: object
      properties:
        latestAgentVersion:
          description: latest agent version
          type: string
        environments:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentVersion'
      required:
        - environments
        - latestAgentVersion
    OrganizationUsage:
      type: object
      properties:
        organizationId:
          description: organization id
          type: string
        stats:
          $ref: '#/components/schemas/UsageStats'
        environmentsCount:
          description: number of environments in organization
          type: integer
        usersCount:
          description: number of users in organization
          type: integer
        persistentRunnersCount:
          description: number of persistent runners in organization
          type: integer
        environments:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentUsage'
        maxTestResults:
          description: Max number of test results
          type: integer
          example: 12
        usedTestResults:
          description: number of used test results
          type: integer
          example: 12
        maxReadOnlyUsers:
          description: Max number of read-only users
          type: integer
          example: 12
        usedReadOnlyUsers:
          description: number of used read-only users
          type: integer
          example: 12
        maxFullUsers:
          description: Max number of full users
          type: integer
          example: 12
        usedFullUsers:
          description: number of used full users
          type: integer
          example: 12
        ssoAllowed:
          description: Is custom SSO allowed
          type: boolean
        rbacAllowed:
          description: Is custom RBAC allowed
          type: boolean
        maxConcurrentFloatingRunners:
          description: Max number of floating runners running in parallel
          type: integer
          example: 3
        maxPersistentRunners:
          description: Max number of persistent runners
          type: integer
          example: 3
        isTrial:
          description: is current license trial
          type: boolean
          default: false
        licenseType:
          description: license type
          type: string
          example: trial
        licenseExpiration:
          description: expiration date
          type: string
          format: date-time
          example: '2006-01-02T15:04:05Z'
      required:
        - organizationId
        - stats
        - environmentsCount
        - usersCount
    Organizations:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Organization'
      required:
        - elements
    PersistentVolumeClaimVolumeSource:
      description: >-
        persistentVolumeClaimVolumeSource represents a reference to a
        PersistentVolumeClaim in the same namespace. More info:
        https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
      type: object
      properties:
        claimName:
          description: >-
            claimName is the name of a PersistentVolumeClaim in the same
            namespace as the pod using this volume. More info:
            https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
          type: string
        readOnly:
          description: >-
            readOnly Will force the ReadOnly setting in VolumeMounts. Default
            false.
          type: boolean
      required:
        - claimName
    Plan:
      allOf:
        - $ref: '#/components/schemas/BasicObject'
        - type: object
          properties:
            name:
              $ref: '#/components/schemas/PlanName'
            status:
              $ref: '#/components/schemas/PlanStatus'
            customerId:
              description: External Customer ID for Stripe
              type: string
            checkoutSessionId:
              description: external checkout session id
              type: string
              example: cs_2039092394029043
            subscriptionId:
              description: external product/subscription id
              type: string
              example: si_2039092394029043
            paymentType:
              description: Type of payment method used for the plan
              type: string
              example: manual
            currentPeriodStart:
              description: current payment period start date
              type: string
              format: date-time
            currentPeriodEnd:
              description: current payment period start date
              type: string
              format: date-time
            usageRecordTime:
              description: Usage record date passed to Stripe
              type: string
              format: date-time
            limits:
              $ref: '#/components/schemas/PlanLimits'
            gracePeriodDays:
              description: Grace period in days after subscription expiration
              type: integer
              example: 14
            isTrial:
              description: Is current plan trial
              type: boolean
            trialEnds:
              description: Date of trial period end
              type: string
              format: date-time
    PlanLimits:
      type: object
      properties:
        maxEnvironments:
          description: Max number of environments
          type: integer
          example: 1000
        maxOrganizations:
          description: Max number of organizations
          type: integer
          example: 1000
        maxConcurrentFloatingRunners:
          description: Max number of floating runners running in parallel
          type: integer
          example: 3
        maxPersistentRunners:
          description: Max number of persistent runners
          type: integer
          example: 3
        maxUsers:
          description: Max number of users
          type: integer
          example: 12
        maxReadOnlyUsers:
          description: Max read-only number of users
          type: integer
          example: 12
        maxTestResults:
          description: Max number of test results
          type: integer
          example: 12
        maxStorageGb:
          description: Artifacts storage size in GB
          type: integer
          example: 128
        dataRetentionGb:
          description: Data retention size in GB
          type: integer
          example: 32
        dataRetentionDays:
          description: Data retention limits in days
          type: integer
          example: 7
        weeklyAiAnalysis:
          description: Limits for daily AI analysis per organization
          type: integer
          example: 14
        dailyAiAnalysis:
          description: Limits for weekly AI analysis per organization
          type: integer
          example: 2
        ssoAllowed:
          description: Is custom SSO allowed
          type: boolean
        rbacAllowed:
          description: Is custom RBAC allowed
          type: boolean
        usedUsers:
          description: number of used full users
          type: integer
          example: 12
        usedReadOnlyUsers:
          description: number of read-only users used
          type: integer
          example: 12
        usedTestResults:
          description: number of used test results
          type: integer
          example: 12
    PlanName:
      type: string
      enum:
        - plan_free
        - plan_pro
        - plan_enterprise
      default: plan_free
      example: plan_free
    PlanStatus:
      type: string
      enum:
        - Active
        - Canceled
        - Incomplete
        - IncompleteExpired
        - PastDue
        - Trailing
        - Unpaid
        - Deleted
        - Locked
        - Blocked
      example: Active
    PodAffinity:
      type: object
      properties:
        requiredDuringSchedulingIgnoredDuringExecution:
          type: array
          items:
            $ref: '#/components/schemas/PodAffinityTerm'
        preferredDuringSchedulingIgnoredDuringExecution:
          type: array
          items:
            $ref: '#/components/schemas/WeightedPodAffinityTerm'
    PodAffinityTerm:
      type: object
      properties:
        labelSelector:
          $ref: '#/components/schemas/LabelSelector'
        namespaces:
          type: array
          items:
            type: string
        topologyKey:
          type: string
        namespaceSelector:
          $ref: '#/components/schemas/LabelSelector'
    PodDNSConfig:
      type: object
      properties:
        nameservers:
          type: array
          items:
            type: string
        searches:
          type: array
          items:
            type: string
        options:
          type: array
          items:
            $ref: '#/components/schemas/PodDNSConfigOption'
    PodDNSConfigOption:
      type: object
      properties:
        name:
          type: string
        value:
          $ref: '#/components/schemas/BoxedString'
    PodRequest:
      description: pod request body
      type: object
      properties:
        resources:
          $ref: '#/components/schemas/PodResourcesRequest'
          description: pod resources request parameters
        podTemplate:
          description: pod template extensions
          type: string
        podTemplateReference:
          description: name of the template resource
          type: string
    PodResourceClaim:
      type: object
      properties:
        name:
          type: string
        source:
          $ref: '#/components/schemas/ClaimSource'
    PodResourcesRequest:
      description: pod resources request specification
      type: object
      properties:
        requests:
          $ref: '#/components/schemas/ResourceRequest'
          description: pod resources requests
        limits:
          $ref: '#/components/schemas/ResourceRequest'
          description: pod resources limits
    PodResourcesUpdateRequest:
      description: pod resources update request specification
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/PodResourcesRequest'
    PodSchedulingGate:
      type: object
      properties:
        name:
          type: string
    PodSecurityContext:
      type: object
      properties:
        seLinuxOptions:
          $ref: '#/components/schemas/SELinuxOptions'
        windowsOptions:
          $ref: '#/components/schemas/WindowsSecurityContextOptions'
        runAsUser:
          $ref: '#/components/schemas/BoxedInteger'
        runAsGroup:
          $ref: '#/components/schemas/BoxedInteger'
        runAsNonRoot:
          $ref: '#/components/schemas/BoxedBoolean'
        supplementalGroups:
          type: array
          items:
            type: integer
            format: int64
        supplementalGroupsPolicy:
          $ref: '#/components/schemas/BoxedString'
        fsGroup:
          $ref: '#/components/schemas/BoxedInteger'
        sysctls:
          type: array
          items:
            $ref: '#/components/schemas/Sysctl'
        fsGroupChangePolicy:
          $ref: '#/components/schemas/BoxedString'
        seccompProfile:
          $ref: '#/components/schemas/SeccompProfile'
        appArmorProfile:
          $ref: '#/components/schemas/AppArmorProfile'
        seLinuxChangePolicy:
          $ref: '#/components/schemas/BoxedString'
    PodUpdateRequest:
      description: pod request update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/PodRequest'
    PreferredSchedulingTerm:
      type: object
      properties:
        weight:
          type: integer
        preference:
          $ref: '#/components/schemas/NodeSelectorTerm'
      required:
        - preference
    Probe:
      description: >-
        Probe describes a health check to be performed against a container to
        determine whether it is alive or ready to receive traffic.
      type: object
      properties:
        initialDelaySeconds:
          type: integer
        timeoutSeconds:
          type: integer
        periodSeconds:
          type: integer
        successThreshold:
          type: integer
        failureThreshold:
          type: integer
        terminationGracePeriodSeconds:
          $ref: '#/components/schemas/BoxedInteger'
        exec:
          $ref: '#/components/schemas/ExecAction'
        httpGet:
          $ref: '#/components/schemas/HTTPGetAction'
        tcpSocket:
          $ref: '#/components/schemas/TCPSocketAction'
        grpc:
          $ref: '#/components/schemas/GRPCAction'
    Problem:
      description: problem response in case of error
      type: object
      properties:
        type:
          description: Type contains a URI that identifies the problem type.
          type: string
          example: https://kubeshop.io/testkube/problems/invalidtestname
        title:
          description: >-
            Title is a short, human-readable summary of the problem type. This
            title SHOULD NOT change from occurrence to occurrence of the
            problem, except for purposes of localization.
          type: string
          example: Invalid test name
        status:
          description: HTTP status code for this occurrence of the problem.
          type: integer
          example: 500
        errorCode:
          description: A more specific type of the error
          type: string
          example: user-limit
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          type: string
          example: Your test name can't contain forbidden characters like "}}}" passed
        instance:
          description: >-
            A URI that identifies the specific occurrence of the problem. This
            URI may or may not yield further information if de-referenced.
          type: string
          example: http://10.23.23.123:8088/tests
      required:
        - type
        - title
        - status
        - detail
        - instance
    ProjectedVolumeSource:
      description: Represents a projected volume source
      type: object
      properties:
        defaultMode:
          $ref: '#/components/schemas/BoxedInteger'
        sources:
          description: >-
            sources is the list of volume projections. Each entry in this list
            handles one source.
          type: array
          items:
            description: >-
              Projection that may be projected along with other supported volume
              types. Exactly one of these fields must be set.
            type: object
            properties:
              clusterTrustBundle:
                description: >-
                  ClusterTrustBundle allows a pod to access the
                  `.spec.trustBundle` field of ClusterTrustBundle objects in an
                  auto-updating file.
                type: object
                properties:
                  labelSelector:
                    $ref: '#/components/schemas/LabelSelector'
                  name:
                    $ref: '#/components/schemas/BoxedString'
                  optional:
                    $ref: '#/components/schemas/BoxedBoolean'
                  path:
                    description: Relative path from the volume root to write the bundle.
                    type: string
                  signerName:
                    $ref: '#/components/schemas/BoxedString'
                required:
                  - path
              configMap:
                description: configMap information about the configMap data to project
                type: object
                properties:
                  items:
                    description: >-
                      items if unspecified, each key-value pair in the Data
                      field of the referenced ConfigMap will be projected into
                      the volume as a file whose name is the key and content is
                      the value. If specified, the listed keys will be projected
                      into the specified paths, and unlisted keys will not be
                      present. If a key is specified which is not present in the
                      ConfigMap, the volume setup will error unless it is marked
                      optional. Paths must be relative and may not contain the
                      '..' path or start with '..'.
                    type: array
                    items:
                      description: Maps a string key to a path within a volume.
                      type: object
                      properties:
                        key:
                          description: key is the key to project.
                          type: string
                        mode:
                          $ref: '#/components/schemas/BoxedInteger'
                        path:
                          description: >-
                            path is the relative path of the file to map the key
                            to. May not be an absolute path. May not contain the
                            path element '..'. May not start with the string
                            '..'.
                          type: string
                      required:
                        - key
                        - path
                  name:
                    description: >-
                      Name of the referent. More info:
                      https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                      TODO: Add other useful fields. apiVersion, kind, uid?
                    type: string
                  optional:
                    $ref: '#/components/schemas/BoxedBoolean'
              downwardAPI:
                description: downwardAPI information about the downwardAPI data to project
                type: object
                properties:
                  items:
                    description: Items is a list of DownwardAPIVolume file
                    type: array
                    items:
                      description: >-
                        DownwardAPIVolumeFile represents information to create
                        the file containing the pod field
                      type: object
                      properties:
                        fieldRef:
                          $ref: '#/components/schemas/FieldRef'
                        mode:
                          $ref: '#/components/schemas/BoxedInteger'
                        path:
                          description: >-
                            path is the relative path of the file to map the key
                            to. May not be an absolute path. May not contain the
                            path element '..'. May not start with the string
                            '..'.
                          type: string
                        resourceFieldRef:
                          $ref: '#/components/schemas/ResourceFieldRef'
                      required:
                        - path
              secret:
                description: secret information about the secret data to project
                type: object
                properties:
                  items:
                    description: >-
                      items if unspecified, each key-value pair in the Data
                      field of the referenced ConfigMap will be projected into
                      the volume as a file whose name is the key and content is
                      the value. If specified, the listed keys will be projected
                      into the specified paths, and unlisted keys will not be
                      present. If a key is specified which is not present in the
                      ConfigMap, the volume setup will error unless it is marked
                      optional. Paths must be relative and may not contain the
                      '..' path or start with '..'.
                    type: array
                    items:
                      description: Maps a string key to a path within a volume.
                      type: object
                      properties:
                        key:
                          description: key is the key to project.
                          type: string
                        mode:
                          $ref: '#/components/schemas/BoxedInteger'
                        path:
                          description: >-
                            path is the relative path of the file to map the key
                            to. May not be an absolute path. May not contain the
                            path element '..'. May not start with the string
                            '..'.
                          type: string
                      required:
                        - key
                        - path
                  name:
                    description: >-
                      Name of the referent. More info:
                      https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                      TODO: Add other useful fields. apiVersion, kind, uid?
                    type: string
                  optional:
                    $ref: '#/components/schemas/BoxedBoolean'
              serviceAccountToken:
                description: >-
                  serviceAccountToken is information about the
                  serviceAccountToken data to project
                type: object
                properties:
                  audience:
                    description: >-
                      audience is the intended audience of the token. A
                      recipient of a token must identify itself with an
                      identifier specified in the audience of the token, and
                      otherwise should reject the token. The audience defaults
                      to the identifier of the apiserver.
                    type: string
                  expirationSeconds:
                    $ref: '#/components/schemas/BoxedInteger'
                  path:
                    description: >-
                      path is the path relative to the mount point of the file
                      to project the token into.
                    type: string
                required:
                  - path
    PublicInfo:
      type: object
      properties:
        authUrl:
          type: string
        apiUrl:
          type: string
        uiUrl:
          type: string
        agentUrl:
          type: string
        rootDomain:
          type: string
      required:
        - authUrl
        - apiUrl
        - uiUrl
        - agentUrl
        - rootDomain
    QueueDepthTimeSeriesEntry:
      type: object
      properties:
        ts:
          type: string
          format: date-time
        last:
          type: integer
        min:
          type: integer
        max:
          type: integer
        avg:
          type: number
      required:
        - ts
        - last
        - min
        - max
        - avg
    Report:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
        name:
          type: string
        description:
          type: string
        params: {}
      required:
        - id
        - kind
    ReportsSummary:
      type: object
      properties:
        total:
          type: integer
        failed:
          type: integer
        errored:
          type: integer
        skipped:
          type: integer
        passed:
          type: integer
        summary:
          $ref: '#/components/schemas/TestWorkflowReportSummary'
      required:
        - total
        - failed
        - errored
        - skipped
        - passed
        - summary
    Repository:
      description: repository representation for tests in git repositories
      type: object
      properties:
        type:
          description: VCS repository type
          type: string
          enum:
            - git
        uri:
          description: uri of content file or git directory
          type: string
          example: https://github.com/kubeshop/testkube
        branch:
          description: branch/tag name for checkout
          type: string
          example: main
        commit:
          description: commit id (sha) for checkout
          type: string
          example: b928cbb7186944ab9275937ec1ac3d3738ca2e1d
        path:
          description: >-
            if needed we can checkout particular path (dir or file) in case of
            BIG/mono repositories
          type: string
          example: test/perf
        username:
          description: git auth username for private repositories
          type: string
        token:
          description: git auth token for private repositories
          type: string
        usernameSecret:
          $ref: '#/components/schemas/SecretRef'
        tokenSecret:
          $ref: '#/components/schemas/SecretRef'
        certificateSecret:
          description: >-
            secret with certificate for private repositories. Should contain one
            key ending with .crt such as "mycorp.crt", whose value is the
            certificate file content, suitable for git config http.sslCAInfo
          type: string
        workingDir:
          description: >-
            if provided we checkout the whole repository and run test from this
            directory
          type: string
          example: /
        authType:
          description: auth type for git requests
          type: string
          enum:
            - basic
            - header
      required:
        - type
        - uri
    RepositoryParameters:
      description: repository parameters for tests in git repositories
      type: object
      properties:
        branch:
          description: branch/tag name for checkout
          type: string
          example: main
        commit:
          description: commit id (sha) for checkout
          type: string
          example: b928cbb7186944ab9275937ec1ac3d3738ca2e1d
        path:
          description: >-
            if needed we can checkout particular path (dir or file) in case of
            BIG/mono repositories
          type: string
          example: test/perf
        workingDir:
          description: >-
            if provided we checkout the whole repository and run test from this
            directory
          type: string
          example: /
    RepositoryUpdate:
      description: repository update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Repository'
    RepositoryUpdateParameters:
      description: repository update parameters for tests in git repositories
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/RepositoryParameters'
    ResourceFieldRef:
      description: >-
        Selects a resource of the container: only resources limits and requests
        (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu,
        requests.memory and requests.ephemeral-storage) are currently supported.
      type: object
      properties:
        containerName:
          description: 'Container name: required for volumes, optional for env vars'
          type: string
        divisor:
          type: string
          pattern: ^[0-9]+(m|[GMK]i)$
        resource:
          description: 'Required: resource to select'
          type: string
      required:
        - resource
    ResourceGroup:
      type: object
      properties:
        id:
          description: The identifier of this group.
          type: string
        slug:
          description: A human- and url-friendly identifier of this group.
          type: string
        name:
          description: The name of this group.
          type: string
        description:
          description: The description of this group
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        role:
          description: >-
            The role of the current user. This considers indirect memberships
            such as teams and superuser privileges when being an organization
            owner.
          type: string
      required:
        - id
        - slug
        - name
        - createdAt
        - updatedAt
        - collaboratorCount
        - role
    ResourceRequest:
      description: resource request specification
      type: object
      properties:
        cpu:
          description: requested cpu units
          type: string
          example: 250m
        memory:
          description: requested memory units
          type: string
          example: 64Mi
    ResourceUpdateRequest:
      description: resource update request specification
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/ResourceRequest'
    RoleFeatures:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/MemberRole'
        resource:
          description: resource
          type: string
          enum:
            - organization
            - environment
          example: organization
        features:
          type: array
          items:
            description: operationName
            type: string
          example:
            - CreateOrganization
            - GetOrganization
      required:
        - role
        - resource
        - features
    RunnerLatestExecution:
      type: object
      properties:
        id:
          type: string
        environmentId:
          type: string
        name:
          type: string
        workflow:
          type: string
      required:
        - id
        - environmentId
        - name
        - workflow
    RunnerStatus:
      type: object
      properties:
        id:
          type: string
        activeExecutionsCount:
          type: integer
        latestExecutions:
          type: array
          items:
            $ref: '#/components/schemas/RunnerLatestExecution'
        persistent:
          type: boolean
      required:
        - id
        - activeExecutionsCount
        - latestExecutions
        - persistent
    RunningContext:
      description: running context for test or test suite execution
      type: object
      properties:
        type:
          description: One of possible context types
          type: string
          enum:
            - userCLI
            - userUI
            - testsuite
            - testtrigger
            - scheduler
            - testworkflow
        context:
          description: Context value depending from its type
          type: string
      required:
        - type
    SELinuxOptions:
      type: object
      properties:
        user:
          type: string
        role:
          type: string
        type:
          type: string
        level:
          type: string
    ScheduleRequestContextTypeV2:
      type: string
      enum:
        - ui
        - cli
        - ci/cd
    ScheduleRequestContextV2:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ScheduleRequestContextTypeV2'
        id:
          type: string
        name:
          type: string
      required:
        - type
    ScheduleRequestExecutionSelectorByWorkflowLabelsV2:
      type: object
      properties:
        labels:
          type: object
          additionalProperties:
            type: string
      required:
        - labels
    ScheduleRequestExecutionSelectorByWorkflowNameV2:
      type: object
      properties:
        name:
          type: string
      required:
        - name
    ScheduleRequestExecutionSelectorV2:
      type: object
      oneOf:
        - $ref: >-
            #/components/schemas/ScheduleRequestExecutionSelectorByWorkflowNameV2
        - $ref: >-
            #/components/schemas/ScheduleRequestExecutionSelectorByWorkflowLabelsV2
    ScheduleRequestExecutionV2:
      type: object
      properties:
        selector:
          $ref: '#/components/schemas/ScheduleRequestExecutionSelectorV2'
        config:
          type: object
          additionalProperties:
            type: string
        executionName:
          type: string
        tags:
          type: object
          additionalProperties:
            type: string
        targets:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionTargetV2'
      required:
        - selector
    ScheduleRequestV2:
      type: object
      properties:
        tags:
          type: object
          additionalProperties:
            type: string
        context:
          $ref: '#/components/schemas/ScheduleRequestContextV2'
        disableWebhooks:
          type: boolean
        executions:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleRequestExecutionV2'
      required:
        - executions
    Scope:
      type: object
      properties:
        resource:
          description: scope resource
          type: string
          enum:
            - org
            - env
            - grp
            - artifact
          example: org
        identifier:
          description: scope resource identifier
          type: string
          example: tkcorg_xxxxxxxxxxxx
        role:
          description: scope role
          type: string
          example: admin
      required:
        - resource
        - identifier
        - role
    SeccompProfile:
      type: object
      properties:
        type:
          type: string
        localhostProfile:
          $ref: '#/components/schemas/BoxedString'
    Secret:
      description: Secret with keys
      type: object
      properties:
        name:
          description: secret name
          type: string
          example: git-secret
        namespace:
          description: secret namespace
          type: string
        type:
          description: secret type
          type: string
          default: Opaque
        createdAt:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        updatedAt:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        controlled:
          description: is this Secret controlled by Testkube
          type: boolean
        owner:
          $ref: '#/components/schemas/SecretOwner'
        labels:
          description: labels associated with the secret
          type: object
          additionalProperties:
            type: string
        keys:
          description: secret keys
          type: array
          items:
            type: string
          example:
            - key1
            - key2
            - key3
      required:
        - name
        - controlled
    SecretConfig:
      type: object
      properties:
        prefix:
          description: prefix for the secrets created via Testkube
          type: string
        list:
          description: allow to list secrets created via Testkube
          type: boolean
        listAll:
          description: allow to list all secrets
          type: boolean
        create:
          description: allow to create a new secret via Testkube
          type: boolean
        modify:
          description: allow to modify a secret created via Testkube
          type: boolean
        delete:
          description: allow to delete a secret created via Testkube
          type: boolean
        autoCreate:
          description: >-
            allow to automatically create secrets via Testkube for sensitive
            credentials
          type: boolean
      required:
        - prefix
        - list
        - listAll
        - create
        - modify
        - delete
        - autoCreate
    SecretEnvSource:
      type: object
      properties:
        name:
          type: string
        optional:
          type: boolean
          nullable: true
          default: false
      required:
        - name
    SecretInput:
      description: Secret input information
      type: object
      properties:
        name:
          description: secret name
          type: string
          example: git-secret
        type:
          description: secret type
          type: string
          default: Opaque
        namespace:
          description: secret namespace
          type: string
        owner:
          $ref: '#/components/schemas/SecretOwner'
        labels:
          description: labels associated with the secret
          type: object
          additionalProperties:
            type: string
        data:
          description: data to store in the secret
          type: object
          additionalProperties:
            type: string
      required:
        - name
        - data
    SecretOwner:
      description: Resource that owns the secret
      type: object
      properties:
        kind:
          description: kind of the resource that is the owner
          type: string
        name:
          description: name of the owner resource
          type: string
      required:
        - kind
        - name
    SecretRef:
      description: Testkube internal reference for secret storage in Kubernetes secrets
      type: object
      properties:
        namespace:
          description: object kubernetes namespace
          type: string
        name:
          description: object name
          type: string
        key:
          description: object key
          type: string
      required:
        - name
        - key
    SecretUpdate:
      description: Secret input information to update
      type: object
      properties:
        name:
          description: secret name
          type: string
          example: git-secret
        owner:
          $ref: '#/components/schemas/SecretOwner'
        labels:
          description: labels associated with the secret
          type: object
          additionalProperties:
            type: string
        data:
          description: data to store in the secret
          type: object
          additionalProperties:
            type: string
    SecretVolumeSource:
      description: >-
        secret represents a secret that should populate this volume. More info:
        https://kubernetes.io/docs/concepts/storage/volumes#secret
      type: object
      properties:
        defaultMode:
          $ref: '#/components/schemas/BoxedInteger'
        items:
          description: >-
            items If unspecified, each key-value pair in the Data field of the
            referenced Secret will be projected into the volume as a file whose
            name is the key and content is the value. If specified, the listed
            keys will be projected into the specified paths, and unlisted keys
            will not be present. If a key is specified which is not present in
            the Secret, the volume setup will error unless it is marked
            optional. Paths must be relative and may not contain the '..' path
            or start with '..'.
          type: array
          items:
            description: Maps a string key to a path within a volume.
            type: object
            properties:
              key:
                description: key is the key to project.
                type: string
              mode:
                $ref: '#/components/schemas/BoxedInteger'
              path:
                description: >-
                  path is the relative path of the file to map the key to. May
                  not be an absolute path. May not contain the path element
                  '..'. May not start with the string '..'.
                type: string
            required:
              - key
              - path
        optional:
          description: >-
            optional field specify whether the Secret or its keys must be
            defined
          type: boolean
        secretName:
          description: >-
            secretName is the name of the secret in the pod's namespace to use.
            More info:
            https://kubernetes.io/docs/concepts/storage/volumes#secret
          type: string
    SecurityContext:
      type: object
      properties:
        privileged:
          $ref: '#/components/schemas/BoxedBoolean'
        runAsUser:
          $ref: '#/components/schemas/BoxedInteger'
        runAsGroup:
          $ref: '#/components/schemas/BoxedInteger'
        runAsNonRoot:
          $ref: '#/components/schemas/BoxedBoolean'
        readOnlyRootFilesystem:
          $ref: '#/components/schemas/BoxedBoolean'
        allowPrivilegeEscalation:
          $ref: '#/components/schemas/BoxedBoolean'
    ServeArtifact:
      type: object
      properties:
        artifactID:
          description: artifact ID
          type: string
      required:
        - artifactID
    ServerInfo:
      description: Server information with build version, build commit etc.
      type: object
      properties:
        version:
          description: build version
          type: string
          example: v1.4.4
        commit:
          description: build commit
          type: string
          example: aaff223ae68aab1af56e8ed8c84c2b80ed63d9b8
        namespace:
          description: server installaton namespace
          type: string
          example: my-testkube
        clusterId:
          description: cluster id
          type: string
          example: my-cluster-id
        context:
          description: currently configured testkube API context
          type: string
          example: cloud|oss
        orgId:
          description: cloud organization id
          type: string
          example: tkcorg_xxxx
        envId:
          description: cloud env id
          type: string
          example: tkcenv_xxxx
        helmchartVersion:
          description: helm chart version
          type: string
          example: 1.4.14
        dashboardUri:
          description: dashboard uri
          type: string
          example: http://localhost:8080
        enableSecretEndpoint:
          description: enable secret endpoint to list secrets in namespace
          type: boolean
          deprecated: true
        disableSecretCreation:
          description: disable secret creation for tests and test sources
          type: boolean
          deprecated: true
        secret:
          $ref: '#/components/schemas/SecretConfig'
        features:
          $ref: '#/components/schemas/Features'
        executionNamespaces:
          description: execution namespaces
          type: array
          items:
            type: string
            example: my-namespace
        dockerImageVersion:
          description: docker image version
          type: string
          example: 2.1.2
      required:
        - version
    SessionDetail:
      description: Detailed session including message history from LangGraph
      type: object
      properties:
        id:
          description: Unique identifier of the session
          type: string
        assistantId:
          description: ID of the AI assistant
          type: string
        assistantName:
          description: Name of the AI assistant
          type: string
        name:
          description: Generated session name based on user input
          type: string
        status:
          $ref: '#/components/schemas/SessionStatus'
        instructions:
          description: Instructions/prompt for this session
          type: string
        executionContext:
          $ref: '#/components/schemas/ExecutionContext'
        error:
          description: Error message if the session failed
          type: string
        messages:
          description: Conversation message history from LangGraph checkpoint
          type: array
          items:
            $ref: '#/components/schemas/SessionMessage'
        toolCalls:
          description: Tool calls made during this session (stored in cloud-api)
          type: array
          items:
            $ref: '#/components/schemas/SessionToolCall'
        startedAt:
          description: When the session started executing
          type: string
          format: date-time
        finishedAt:
          description: When the session finished
          type: string
          format: date-time
        createdBy:
          $ref: '#/components/schemas/SessionMessageActor'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        isArchived:
          description: Whether this session has been archived
          type: boolean
        inputTokens:
          description: Total input (prompt) tokens consumed across all invocations
          type: integer
          format: int64
        outputTokens:
          description: Total output (completion) tokens consumed across all invocations
          type: integer
          format: int64
        totalTokens:
          description: Total tokens consumed (input + output) across all invocations
          type: integer
          format: int64
        model:
          description: LLM model name used for generation
          type: string
      required:
        - id
        - assistantId
        - status
    SessionList:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AssistantSession'
        hasNextPage:
          description: Whether there are more pages available
          type: boolean
    SessionMessage:
      description: A message in the session conversation history
      type: object
      properties:
        id:
          description: Unique identifier of the message
          type: string
        role:
          description: Role of the message sender
          type: string
          enum:
            - user
            - assistant
            - tool
        content:
          description: Message content
          type: string
        sources:
          description: Documentation sources for assistant messages
          type: array
          items:
            $ref: '#/components/schemas/SessionSource'
        timestamp:
          description: Unix timestamp when message was created
          type: integer
          format: int64
        toolCalls:
          description: Tool calls made by assistant in this message
          type: array
          items:
            type: object
            properties:
              id:
                description: Tool call ID
                type: string
              name:
                description: Tool name
                type: string
              arguments:
                description: Tool arguments as JSON string
                type: string
        toolCallId:
          description: For tool messages, the ID of the tool call this responds to
          type: string
        toolName:
          description: For tool messages, the name of the tool
          type: string
        actor:
          $ref: '#/components/schemas/SessionMessageActor'
      required:
        - id
        - role
        - content
    SessionMessageActor:
      description: The actor (user or API token) that sent a message or created a session
      type: object
      properties:
        type:
          description: Type of the actor
          type: string
          enum:
            - user
            - api-token
        id:
          description: Unique identifier of the actor (user ID or token ID)
          type: string
        name:
          description: Display name of the actor, resolved server-side
          type: string
      required:
        - type
        - id
    SessionSource:
      description: Documentation source reference attached to a session message
      type: object
      properties:
        label:
          description: Human-readable source label
          type: string
        link:
          description: Documentation link path
          type: string
        file:
          description: Source file identifier
          type: string
      required:
        - label
        - link
        - file
    SessionStatus:
      description: Status of an assistant session
      type: string
      enum:
        - pending
        - running
        - waiting_approval
        - completed
        - failed
    SessionToolCall:
      type: object
      properties:
        id:
          description: Unique identifier of the tool call
          type: string
        sessionId:
          description: ID of the session this tool call belongs to
          type: string
        name:
          description: Name of the tool being called
          type: string
        mcpServerId:
          description: ID of the MCP server providing this tool
          type: string
        status:
          $ref: '#/components/schemas/ToolCallStatus'
        input:
          description: Input parameters for the tool call
          type: object
          additionalProperties: true
        error:
          description: Error message if tool execution failed
          type: string
        approvedAt:
          description: When the tool call was approved
          type: string
          format: date-time
        declinedAt:
          description: When the tool call was declined
          type: string
          format: date-time
        startedAt:
          description: When the tool started executing
          type: string
          format: date-time
        completedAt:
          description: When the tool finished executing
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - sessionId
        - name
        - status
    Setting:
      description: Generic Settings
      type: object
      properties:
        key:
          type: string
          enum:
            - aiCopilotEnabled
            - aiCopilotPrompted
            - logsSearchKeywords
            - logsSearchKeywordsVersion
            - webhookUrlMaskEnabled
            - agentTokenMaskEnabled
            - insightsEnabled
            - currentOnboardingStep
            - salesOnboardingStatus
            - pinnedEnvironments
            - pinnedAgents
            - scimEnabled
            - scimManagePermissionsInTestkube
            - eventsEnabled
        valueType:
          description: value type for given settings
          type: string
          enum:
            - boolean
            - string
            - number
            - logsSearchKeywords
            - array
        value:
          $ref: '#/components/schemas/Any'
        organizationId:
          type: string
        environmentId:
          type: string
        userId:
          type: string
        updatedAt:
          type: string
          format: date-time
        metadata:
          description: Additional metadata for the specific setting
          type: object
          additionalProperties:
            type: string
      required:
        - key
        - valueType
    Settings:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Setting'
      required:
        - elements
    SilentMode:
      description: >-
        controls what aspects of an execution should be silent (not
        tracked/processed)
      type: object
      properties:
        webhooks:
          description: disable webhooks for this execution
          type: boolean
        insights:
          description: disable insights/analytics for this execution
          type: boolean
        health:
          description: disable health checks for this execution
          type: boolean
        metrics:
          description: disable metrics collection for this execution
          type: boolean
        cdevents:
          description: disable CDEvents for this execution
          type: boolean
    SlavesMeta:
      description: Slave data for executing tests in distributed environment
      type: object
      properties:
        image:
          description: slave image
          type: string
          example: kubeshop/ex-slaves-image:latest
      required:
        - image
    Source:
      description: synchronisation sources
      type: string
      enum:
        - kubernetes
    StatusObservable:
      type: object
      properties:
        name:
          description: Name of the test or test suite that will be observed
          type: string
          example: Backend API
        type:
          description: Type of the observed entity
          type: string
          enum:
            - test
            - test-suite
            - workflow
        status:
          description: the status of the executions
          type: string
          enum:
            - unknown
            - operational
            - partial_outage
            - major_outage
      required:
        - name
        - type
    StatusPage:
      allOf:
        - $ref: '#/components/schemas/BasicObjectWithOptionalID'
        - type: object
          properties:
            organizationId:
              description: Organization ID
              type: string
            environmentId:
              description: Environment ID
              type: string
            description:
              description: A short description to clarify the purpose of this page
              type: string
              example: >-
                This page shows the status of the tests running on the
                production environment of MyService
            timeScale:
              description: The periodicity for the aggregated status checks
              type: string
              example: 1d1h1m1s
            services:
              description: List of services tests are grouped by
              type: array
              items:
                $ref: '#/components/schemas/StatusService'
            isPublic:
              description: >-
                Flag that marks the accessibility of the page. Public pages are
                published to the internet
              type: boolean
            slug:
              description: >-
                Globally unique chosen identifier for the status page used in
                the public URL
              type: string
              example: mySlugName
    StatusPages:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/StatusPage'
      required:
        - elements
    StatusService:
      type: object
      properties:
        name:
          description: Name of the Service
          type: string
          example: API Services
        contents:
          description: >-
            Collection of Test Workflows, Tests and Test Suites that are
            relevant to the service
          type: array
          items:
            $ref: '#/components/schemas/StatusObservable'
        operability:
          description: Percentage of passed tests
          type: number
          example: 99.999
        status:
          description: The aggregated status of the Test Workflows, Tests and Test Suites
          type: string
          enum:
            - unknown
            - operational
            - partial_outage
            - major_outage
        timeline:
          description: >-
            Partial results from test/test suite executions divided by the
            interval
          type: array
          items:
            $ref: '#/components/schemas/StatusTimelineSlice'
      required:
        - name
    StatusTimelineSlice:
      type: object
      properties:
        startTime:
          type: string
        endTime:
          type: string
        status:
          description: The aggregated status of the Test Workflows, Tests and Test Suites
          type: string
          enum:
            - unknown
            - operational
            - partial_outage
            - major_outage
        observables:
          description: >-
            Collection of Test Workflows, Tests and Test Suites that are
            relevant to the service with their status
          type: object
          additionalProperties:
            type: string
          example:
            test-1: operational
            test-2: major_outage
    StripeCheckoutSession:
      type: object
      properties:
        uri:
          type: string
      required:
        - uri
    StripeCheckoutSessionRequest:
      type: object
      properties:
        lookupKey:
          type: string
        organizationID:
          type: string
        email:
          type: string
        customerId:
          type: string
      required:
        - lookupKey
        - organizationID
    StripeEvent: {}
    StripePortalSession:
      type: object
      properties:
        uri:
          type: string
      required:
        - uri
    StripePortalSessionRequest:
      type: object
      properties:
        organizationID:
          type: string
      required:
        - organizationID
    SuperAgentCommands:
      type: object
      properties:
        agentToken:
          description: agent token for environment
          type: string
          example: tkcagnt_adead343112adeadcaaaaa221daee2
        connectCommand:
          description: >-
            command to connect existing Testkube OSS installation to the
            Testkube Pro
          type: string
          example: testkube pro connect --agent-key tkcagnt_111
        disconnectCommand:
          description: >-
            command to disconnect from testkube pro and get back to standalone
            OSS mode
          type: string
          example: testkube pro disconnect
        installCommand:
          description: command to install/upgrade agent
          type: string
          example: >-
            helm upgrade --install --create-namespace testkube testkube/testkube
            --set testkube-api.cloud.url=agent.example.com:443 --set
            testkube-api.cloud.key=<api-key> --set
            testkube-api.minio.enabled=false --set mongodb.enabled=false
            --namespace testkube
        installCommandCli:
          description: command to install/upgrade agent
          type: string
          example: >-
            testkube init-cloud --agent-key tkcagnt_111 --agent-url
            agent.example.com:443
        configureContextCommand:
          description: command to configure
          type: string
          example: >-
            testkube context set --api-url https://api.example.com --api-key
            <api-key> --agent-url https://agent.example.com --agent-key
            <agent-key>
        runDockerCommand:
          description: command to run Docker agent
          type: string
          example: >-
            docker run -d --privileged --name=testkube-agent -e AGENT_KEY=AK
            kubeshop/testkube-agent:1.2.3
        runDockerCommandCli:
          description: command to run Docker agent
          type: string
          example: testkube docker init --agent-token=AK --org-id=org --env-id=env
        upgradeDockerCommand:
          description: command to upgrade Docker agent
          type: string
          example: >-
            docker exec testkube-agent helm upgrade testkube testkube/testkube
            --namespace testkube --set testkube-api.minio.enabled=false --set
            mongodb.enabled=false --set testkube-api.cloud.key=AK --set
            testkube-api.cloud.url=api.testkube.io:999 --set
            testkube-api.dockerImageVersion=1.2.3
        upgradeDockerCommandCli:
          description: command to upgrade Docker agent
          type: string
          example: testkube upgrade
      required:
        - agentToken
        - connectCommand
        - disconnectCommand
        - installCommand
        - installCommandCli
        - configureContextCommand
        - runDockerCommand
        - runDockerCommandCli
        - upgradeDockerCommand
        - upgradeDockerCommandCli
    Syncable:
      description: >
        source information about resources that may have been synced from
        multiple sources.

        An empty source indicates that the source was the UI/API for backwards
        compatibility.
      type: object
      properties:
        creationSource:
          $ref: '#/components/schemas/Source'
          description: the original source from which the resource was created
        lastModificationSource:
          $ref: '#/components/schemas/Source'
          description: >-
            the source from which the last modification of the resource
            originated
    Sysctl:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
    TCPSocketAction:
      type: object
      properties:
        port:
          type: string
        host:
          type: string
    Team:
      type: object
      properties:
        id:
          description: The identifier of this group.
          type: string
        slug:
          description: A human- and url-friendly identifier of this group.
          type: string
        name:
          description: The name of this group.
          type: string
        description:
          description: The description of this group
          type: string
        memberCount:
          description: The number of members in this group.
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - slug
        - name
        - createdAt
        - updatedAt
        - memberCount
    TeamMember:
      type: object
      properties:
        id:
          description: The identifier of this collaborator.
          type: string
        email:
          description: The email of this collaborator, or empty in case of a team.
          type: string
      required:
        - id
        - email
    Template:
      description: Golang based template
      type: object
      properties:
        name:
          description: template name for reference
          type: string
          example: webhook-template
        namespace:
          description: template namespace
          type: string
          example: testkube
        type:
          $ref: '#/components/schemas/TemplateType'
        body:
          description: template body to use
          type: string
          example: '{"id": "{{ .Id }}"}'
        labels:
          description: template labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
      required:
        - name
        - type
        - body
    TemplateCreateRequest:
      description: template create request body
      type: object
      allOf:
        - $ref: '#/components/schemas/Template'
    TemplateType:
      description: template type by purpose
      type: string
      enum:
        - job
        - container
        - cronjob
        - scraper
        - pvc
        - webhook
        - pod
    TemplateUpdateRequest:
      description: template update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Template'
    Test:
      type: object
      properties:
        name:
          description: test name
          type: string
          example: test1
        namespace:
          description: test namespace
          type: string
          example: testkube
        description:
          description: test description
          type: string
          example: this test is used for that purpose
        type:
          description: test type
          type: string
          example: postman/collection
        content:
          $ref: '#/components/schemas/TestContent'
          description: test content
        source:
          description: reference to test source resource
          type: string
          example: my-private-repository-test
        created:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        labels:
          description: test labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        schedule:
          description: schedule to run test
          type: string
          example: '* * * * *'
        readOnly:
          description: if test is offline and cannot be executed
          type: boolean
        uploads:
          description: list of file paths that will be needed from uploads
          type: array
          items:
            type: string
          example:
            - settings/config.txt
        executionRequest:
          $ref: '#/components/schemas/ExecutionRequest'
        status:
          $ref: '#/components/schemas/TestStatus'
    TestContent:
      type: object
      properties:
        type:
          description: |
            type of sources a runner can get data from.
              string: String content (e.g. Postman JSON file).
              file-uri: content stored on the webserver.
              git-file: the file stored in the Git repo in the given repository.path field (Deprecated: use git instead).
              git-dir: the entire git repo or git subdirectory depending on the  repository.path field (Testkube does a shadow clone and sparse checkout to limit IOs in the case of monorepos). (Deprecated: use git instead).
              git: automatically provisions either a file, directory or whole git repository depending on the repository.path field.
          type: string
          enum:
            - string
            - file-uri
            - git-file
            - git-dir
            - git
        repository:
          $ref: '#/components/schemas/Repository'
        data:
          description: test content data as string
          type: string
        uri:
          description: test content
          type: string
          example: https://github.com/kubeshop/testkube
    TestContentRequest:
      description: test content request body
      type: object
      properties:
        repository:
          $ref: '#/components/schemas/RepositoryParameters'
    TestContentUpdate:
      description: test content update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestContent'
    TestContentUpdateRequest:
      description: test content update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestContentRequest'
    TestExecutionCR:
      type: object
      properties:
        test:
          $ref: '#/components/schemas/ObjectRef'
          description: test name and namespace
        executionRequest:
          $ref: '#/components/schemas/ExecutionRequest'
          description: test execution request parameters
        status:
          $ref: '#/components/schemas/TestExecutionStatusCR'
          description: test execution status
      required:
        - test
    TestExecutionStatusCR:
      description: test execution status
      type: object
      properties:
        latestExecution:
          $ref: '#/components/schemas/Execution'
        generation:
          description: test execution generation
          type: integer
          format: int64
    TestSource:
      description: Test source resource for shared test content
      type: object
      properties:
        name:
          description: test source name
          type: string
          example: testsource1
        namespace:
          description: test source namespace
          type: string
          example: testkube
        labels:
          description: test source labels
          type: object
          additionalProperties:
            type: string
      allOf:
        - $ref: '#/components/schemas/TestContent'
    TestSourceBatchRequest:
      description: Test source batch request
      type: object
      properties:
        batch:
          type: array
          items:
            $ref: '#/components/schemas/TestSourceUpsertRequest'
      required:
        - batch
    TestSourceBatchResult:
      description: Test source batch result
      type: object
      properties:
        created:
          description: created test sources
          type: array
          items:
            type: string
          example:
            - name1
            - name2
            - name3
        updated:
          description: updated test sources
          type: array
          items:
            type: string
          example:
            - name4
            - name5
            - name6
        deleted:
          description: deleted test sources
          type: array
          items:
            type: string
          example:
            - name7
            - name8
            - name9
    TestSourceUpdate:
      description: Test source resource update for shared test content
      type: object
      properties:
        name:
          description: test source name
          type: string
          example: testsource1
        namespace:
          description: test source namespace
          type: string
          example: testkube
        labels:
          description: test source labels
          type: object
          additionalProperties:
            type: string
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestContent'
    TestSourceUpdateRequest:
      description: test source update request body
      type: object
      properties:
        name:
          description: test source name
          type: string
          example: testsource1
        namespace:
          description: test source namespace
          type: string
          example: testkube
        labels:
          description: test source labels
          type: object
          additionalProperties:
            type: string
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestContent'
    TestSourceUpsertRequest:
      description: test source create request body
      type: object
      properties:
        name:
          description: test source name
          type: string
          example: testsource1
        namespace:
          description: test source namespace
          type: string
          example: testkube
        labels:
          description: test source labels
          type: object
          additionalProperties:
            type: string
      allOf:
        - $ref: '#/components/schemas/TestContent'
    TestStatus:
      description: test status
      type: object
      properties:
        latestExecution:
          $ref: '#/components/schemas/ExecutionCore'
    TestSuite:
      type: object
      properties:
        name:
          type: string
          example: test-suite1
        namespace:
          type: string
          example: testkube
        description:
          type: string
          example: collection of tests
        before:
          description: Run these batch steps before whole suite
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteBatchStep'
          example:
            - execute:
                - test: example-test
              stopOnFailure: true
        steps:
          description: Batch steps to run
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteBatchStep'
          example:
            - execute:
                - test: example-test
              stopOnFailure: true
        after:
          description: Run these batch steps after whole suite
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteBatchStep'
          example:
            - execute:
                - test: example-test
              stopOnFailure: true
        labels:
          description: test suite labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        schedule:
          description: schedule to run test suite
          type: string
          example: '* * * * *'
        repeats:
          type: integer
          default: 1
          example: 1
        created:
          type: string
          format: date-time
        executionRequest:
          $ref: '#/components/schemas/TestSuiteExecutionRequest'
        status:
          $ref: '#/components/schemas/TestSuiteStatus'
        readOnly:
          description: if test suite is offline and cannot be executed
          type: boolean
      required:
        - name
        - status
    TestSuiteBatchStep:
      description: set of steps run in parallel
      type: object
      properties:
        stopOnFailure:
          type: boolean
          default: true
        downloadArtifacts:
          $ref: '#/components/schemas/DownloadArtifactOptions'
        execute:
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStep'
      required:
        - stopOnFailure
    TestSuiteBatchStepExecutionResult:
      description: execution result returned from executor
      type: object
      properties:
        step:
          $ref: '#/components/schemas/TestSuiteBatchStep'
        execute:
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStepExecutionResult'
        startTime:
          description: step start time
          type: string
          format: date-time
        endTime:
          description: step end time
          type: string
          format: date-time
        duration:
          description: step duration
          type: string
          example: 2m
    TestSuiteBatchStepExecutionSummary:
      description: Test suite batch execution summary
      type: object
      properties:
        execute:
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStepExecutionSummary'
    TestSuiteExecution:
      description: Test suite executions data
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        name:
          description: execution name
          type: string
          example: test-suite1.needlessly-sweet-imp
        testSuite:
          $ref: '#/components/schemas/ObjectRef'
          description: object name and namespace
        status:
          $ref: '#/components/schemas/TestSuiteExecutionStatus'
        envs:
          description: >-
            Environment variables passed to executor. Deprecated: use Basic
            Variables instead
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            record: 'true'
          deprecated: true
        variables:
          $ref: '#/components/schemas/Variables'
        secretUUID:
          description: secret uuid
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        startTime:
          description: test start time
          type: string
          format: date-time
        endTime:
          description: test end time
          type: string
          format: date-time
        duration:
          description: test duration
          type: string
          example: 2m
        durationMs:
          description: test duration in ms
          type: integer
          example: 6000
        stepResults:
          description: steps execution results
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStepExecutionResultV2'
            description: test execution results
        executeStepResults:
          description: batch steps execution results
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteBatchStepExecutionResult'
            description: test execution results
        labels:
          description: test suite labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        runningContext:
          $ref: '#/components/schemas/RunningContext'
          description: running context for the test suite execution
        testSuiteExecutionName:
          description: test suite execution name started the test suite execution
          type: string
        disableWebhooks:
          description: whether webhooks on this execution are disabled
          type: boolean
          default: false
          example:
            - true
            - false
      required:
        - id
        - name
        - testSuite
    TestSuiteExecutionCR:
      type: object
      properties:
        testSuite:
          $ref: '#/components/schemas/ObjectRef'
          description: test suite name and namespace
        executionRequest:
          $ref: '#/components/schemas/TestSuiteExecutionRequest'
          description: test suite execution request parameters
        status:
          $ref: '#/components/schemas/TestSuiteExecutionStatusCR'
          description: test suite execution status
      required:
        - testSuite
    TestSuiteExecutionCore:
      description: test suite execution core
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc4
        startTime:
          description: test suite execution start time
          type: string
          format: date-time
        endTime:
          description: test suite execution end time
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/TestSuiteExecutionStatus'
    TestSuiteExecutionRequest:
      description: test suite execution request body
      type: object
      properties:
        name:
          description: test execution custom name
          type: string
          example: testing with 1000 users
        number:
          description: test suite execution number
          type: integer
          example: 1
        namespace:
          description: test kubernetes namespace ("testkube" when not set)
          type: string
          example: testkube
        variables:
          $ref: '#/components/schemas/Variables'
        secretUUID:
          description: secret uuid
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        labels:
          description: test suite labels
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            users: '3'
        executionLabels:
          description: execution labels
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            users: '3'
        sync:
          description: whether to start execution sync or async
          type: boolean
        httpProxy:
          description: http proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8080
        httpsProxy:
          description: https proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8081
        timeout:
          description: duration in seconds the test suite may be active, until its stopped
          type: integer
          format: int32
          example: 1
        contentRequest:
          $ref: '#/components/schemas/TestContentRequest'
          description: adjusting parameters for test content
        runningContext:
          $ref: '#/components/schemas/RunningContext'
          description: running context for the test suite execution
        jobTemplate:
          description: job template extensions
          type: string
        jobTemplateReference:
          description: name of the template resource
          type: string
        cronJobTemplate:
          description: cron job template extensions
          type: string
        cronJobTemplateReference:
          description: name of the template resource
          type: string
        scraperTemplate:
          description: scraper template extensions
          type: string
        scraperTemplateReference:
          description: name of the template resource
          type: string
        pvcTemplate:
          description: pvc template extensions
          type: string
        pvcTemplateReference:
          description: name of the template resource
          type: string
        concurrencyLevel:
          description: number of tests run in parallel
          type: integer
          format: int32
          example: 10
        testSuiteExecutionName:
          description: test suite execution name started the test suite execution
          type: string
        disableWebhooks:
          description: whether webhooks on the execution of this test suite are disabled
          type: boolean
          default: false
          example:
            - true
            - false
    TestSuiteExecutionStatus:
      type: string
      enum:
        - queued
        - running
        - passed
        - failed
        - aborting
        - aborted
        - timeout
    TestSuiteExecutionStatusCR:
      description: test suite execution status
      type: object
      properties:
        latestExecution:
          $ref: '#/components/schemas/TestSuiteExecution'
        generation:
          description: test suite execution generation
          type: integer
          format: int64
    TestSuiteExecutionSummary:
      description: Test execution summary
      type: object
      properties:
        id:
          description: execution id
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        name:
          description: execution name
          type: string
          example: test-suite1.needlessly-sweet-imp
        testSuiteName:
          description: name of the test suite
          type: string
          example: test-suite1
        status:
          $ref: '#/components/schemas/TestSuiteExecutionStatus'
        startTime:
          description: test suite execution start time
          type: string
          format: date-time
        endTime:
          description: test suite execution end time
          type: string
          format: date-time
        duration:
          description: test suite execution duration
          type: string
          example: '00:00:09'
        durationMs:
          description: test suite execution duration in ms
          type: integer
          example: 9009
        execution:
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteBatchStepExecutionSummary'
        labels:
          description: test suite and execution labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
      required:
        - id
        - name
        - testSuiteName
        - status
    TestSuiteExecutionUpdateRequest:
      description: test suite execution update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestSuiteExecutionRequest'
    TestSuiteExecutionsResult:
      description: the result for a page of executions
      type: object
      properties:
        totals:
          $ref: '#/components/schemas/ExecutionsTotals'
        filtered:
          $ref: '#/components/schemas/ExecutionsTotals'
        results:
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteExecutionSummary'
      required:
        - totals
        - results
    TestSuiteStatus:
      description: test suite status
      type: object
      properties:
        latestExecution:
          $ref: '#/components/schemas/TestSuiteExecutionCore'
    TestSuiteStep:
      type: object
      properties:
        test:
          description: object name
          type: string
          example: name
        delay:
          description: delay duration in time units
          type: string
          format: duration
          example: 1s
        executionRequest:
          $ref: '#/components/schemas/TestSuiteStepExecutionRequest'
          description: test suite step execution request parameters
    TestSuiteStepDelayV2:
      type: object
      properties:
        duration:
          description: delay duration in milliseconds
          type: integer
          default: 0
      required:
        - duration
    TestSuiteStepExecuteTestV2:
      allOf:
        - $ref: '#/components/schemas/ObjectRef'
    TestSuiteStepExecutionRequest:
      description: test step execution request body
      type: object
      properties:
        executionLabels:
          description: test execution labels
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            users: '3'
        variables:
          $ref: '#/components/schemas/Variables'
        command:
          description: executor image command
          type: array
          items:
            type: string
          example:
            - curl
        args:
          description: additional executor binary arguments
          type: array
          items:
            type: string
          example:
            - '--repeats'
            - '5'
            - '--insecure'
        args_mode:
          description: usage mode for arguments
          type: string
          enum:
            - append
            - override
            - replace
        sync:
          description: whether to start execution sync or async
          type: boolean
        httpProxy:
          description: http proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8080
        httpsProxy:
          description: https proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8081
        negativeTest:
          description: whether to run test as negative test
          type: boolean
          example: false
        jobTemplate:
          description: job template extensions
          type: string
        jobTemplateReference:
          description: name of the template resource
          type: string
        cronJobTemplate:
          description: cron job template extensions
          type: string
        cronJobTemplateReference:
          description: name of the template resource
          type: string
        scraperTemplate:
          description: scraper template extensions
          type: string
        scraperTemplateReference:
          description: name of the template resource
          type: string
        pvcTemplate:
          description: pvc template extensions
          type: string
        pvcTemplateReference:
          description: name of the template resource
          type: string
        runningContext:
          $ref: '#/components/schemas/RunningContext'
          description: running context for the test execution
        disableWebhooks:
          description: whether webhooks on the execution of this step are disabled
          type: boolean
          default: false
          example:
            - true
            - false
    TestSuiteStepExecutionResult:
      description: execution result returned from executor
      type: object
      properties:
        step:
          $ref: '#/components/schemas/TestSuiteStep'
        test:
          $ref: '#/components/schemas/ObjectRef'
          description: object name and namespace
        execution:
          $ref: '#/components/schemas/Execution'
          description: >-
            test step execution, NOTE: the execution output will be empty,
            retrieve it directly form the test execution
    TestSuiteStepExecutionResultV2:
      description: execution result returned from executor
      type: object
      properties:
        step:
          $ref: '#/components/schemas/TestSuiteStepV2'
        test:
          $ref: '#/components/schemas/ObjectRef'
          description: object name and namespace
        execution:
          $ref: '#/components/schemas/Execution'
          description: test step execution
    TestSuiteStepExecutionSummary:
      description: Test suite execution summary
      type: object
      properties:
        id:
          type: string
          example: 62f395e004109209b50edfc4
        name:
          description: execution name
          type: string
          example: run:testkube/test1
        testName:
          description: test name
          type: string
          example: test1
        status:
          $ref: '#/components/schemas/ExecutionStatus'
        type:
          $ref: '#/components/schemas/TestSuiteStepType'
      required:
        - id
        - name
        - status
    TestSuiteStepType:
      type: string
      enum:
        - executeTest
        - delay
    TestSuiteStepV2:
      type: object
      properties:
        stopTestOnFailure:
          type: boolean
          default: true
        execute:
          $ref: '#/components/schemas/TestSuiteStepExecuteTestV2'
        delay:
          $ref: '#/components/schemas/TestSuiteStepDelayV2'
      required:
        - name
        - type
        - stopTestOnFailure
    TestSuiteUpdateRequest:
      description: test suite update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestSuite'
        - $ref: '#/components/schemas/ObjectRef'
    TestSuiteUpdateRequestV2:
      description: test suite update body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/TestSuiteV2'
        - $ref: '#/components/schemas/ObjectRef'
    TestSuiteUpsertRequest:
      description: test suite create request body
      type: object
      required:
        - name
        - namespace
      allOf:
        - $ref: '#/components/schemas/TestSuite'
        - $ref: '#/components/schemas/ObjectRef'
    TestSuiteUpsertRequestV2:
      description: test suite create request body
      type: object
      required:
        - name
        - namespace
      allOf:
        - $ref: '#/components/schemas/TestSuiteV2'
        - $ref: '#/components/schemas/ObjectRef'
    TestSuiteV2:
      type: object
      properties:
        name:
          type: string
          example: test-suite1
        namespace:
          type: string
          example: testkube
        description:
          type: string
          example: collection of tests
        before:
          description: Run this step before whole suite
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStepV2'
          example:
            - execute:
                name: example-test
                namespace: testkube
              stopTestOnFailure: true
        steps:
          description: Steps to run
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStepV2'
          example:
            - execute:
                name: example-test
                namespace: testkube
              stopTestOnFailure: true
        after:
          description: Run this step after whole suite
          type: array
          items:
            $ref: '#/components/schemas/TestSuiteStepV2'
          example:
            - execute:
                name: example-test
                namespace: testkube
              stopTestOnFailure: true
        labels:
          description: test suite labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        schedule:
          description: schedule to run test suite
          type: string
          example: '* * * * *'
        repeats:
          type: integer
          default: 1
          example: 1
        created:
          type: string
          format: date-time
        executionRequest:
          $ref: '#/components/schemas/TestSuiteExecutionRequest'
        status:
          $ref: '#/components/schemas/TestSuiteStatus'
      required:
        - name
        - status
    TestSuiteWithExecution:
      description: Test suite with latest execution result
      type: object
      properties:
        testSuite:
          $ref: '#/components/schemas/TestSuite'
        latestExecution:
          $ref: '#/components/schemas/TestSuiteExecution'
      required:
        - testSuite
    TestSuiteWithExecutionSummary:
      description: Test suite with latest execution result
      type: object
      properties:
        testSuite:
          $ref: '#/components/schemas/TestSuite'
        latestExecution:
          $ref: '#/components/schemas/TestSuiteExecutionSummary'
      required:
        - testSuite
    TestTrigger:
      type: object
      properties:
        name:
          description: test trigger name
          type: string
          example: test1
        namespace:
          description: test trigger namespace
          type: string
          example: testkube
        labels:
          description: test trigger labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        annotations:
          description: test trigger annotations
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            group: teamA
        selector:
          $ref: >-
            https://raw.githubusercontent.com/garethr/kubernetes-json-schema/master/v1.7.8/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector
          description: label selector for events
        resource:
          $ref: '#/components/schemas/TestTriggerResources'
        resourceSelector:
          $ref: '#/components/schemas/TestTriggerSelector'
        event:
          description: listen for event for selected resource
          type: string
          example: modified
        conditionSpec:
          $ref: '#/components/schemas/TestTriggerConditionSpec'
        probeSpec:
          $ref: '#/components/schemas/TestTriggerProbeSpec'
        action:
          $ref: '#/components/schemas/TestTriggerActions'
        actionParameters:
          $ref: '#/components/schemas/TestTriggerActionParameters'
        execution:
          $ref: '#/components/schemas/TestTriggerExecutions'
        testSelector:
          $ref: '#/components/schemas/TestTriggerSelector'
        concurrencyPolicy:
          $ref: '#/components/schemas/TestTriggerConcurrencyPolicies'
        disabled:
          description: whether test trigger is disabled
          type: boolean
          default: false
          example:
            - true
            - false
        sync:
          $ref: '#/components/schemas/Syncable'
      required:
        - event
        - action
        - execution
        - testSelector
    TestTriggerActionParameters:
      description: supported action parameters for test triggers
      type: object
      properties:
        config:
          $ref: '#/components/schemas/TestWorkflowConfigValue'
        tags:
          $ref: '#/components/schemas/TestWorkflowTagValue'
        target:
          $ref: '#/components/schemas/ExecutionTarget'
    TestTriggerActions:
      description: supported actions for test triggers
      type: string
      enum:
        - run
    TestTriggerConcurrencyPolicies:
      description: supported concurrency policies for test triggers
      type: string
      enum:
        - allow
        - forbid
        - replace
    TestTriggerCondition:
      description: supported condition for test triggers
      type: object
      properties:
        status:
          $ref: '#/components/schemas/TestTriggerConditionStatuses'
        type:
          description: test trigger condition
          type: string
          example: Progressing
        reason:
          description: test trigger condition reason
          type: string
          example: NewReplicaSetAvailable
        ttl:
          description: >-
            duration in seconds in the past from current time when the condition
            is still valid
          type: integer
          format: int32
          example: 1
      required:
        - status
        - type
    TestTriggerConditionSpec:
      type: object
      properties:
        conditions:
          description: list of test trigger conditions
          type: array
          items:
            $ref: '#/components/schemas/TestTriggerCondition'
        timeout:
          description: >-
            duration in seconds the test trigger waits for conditions, until its
            stopped
          type: integer
          format: int32
          example: 1
        delay:
          description: duration in seconds the test trigger waits between condition checks
          type: integer
          format: int32
          example: 1
    TestTriggerConditionStatuses:
      description: supported kubernetes condition statuses for test triggers
      type: string
      enum:
        - 'True'
        - 'False'
        - Unknown
    TestTriggerExecutions:
      description: supported test resources for test triggers
      type: string
      enum:
        - test
        - testsuite
        - testworkflow
    TestTriggerKeyMap:
      type: object
      properties:
        resources:
          description: list of supported values for resources
          type: array
          items:
            type: string
          example:
            - pod
            - deployment
            - statefulset
            - daemonset
            - service
            - ingress
            - event
            - configmap
        actions:
          description: list of supported values for actions
          type: array
          items:
            type: string
          example:
            - run
        executions:
          description: list of supported values for executions
          type: array
          items:
            type: string
          example:
            - test
            - testsuite
        events:
          description: mapping between resources and supported events
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          example:
            deployment:
              - created
              - modified
              - deleted
            pod:
              - created
              - modified
              - deleted
        conditions:
          description: list of supported values for conditions
          type: array
          items:
            type: string
          example:
            - Available
            - Progressing
        concurrencyPolicies:
          description: list of supported values for concurrency policies
          type: array
          items:
            type: string
          example:
            - allow
            - forbid
            - replace
      required:
        - resources
        - actions
        - executions
        - events
        - concurrencyPolicies
    TestTriggerProbe:
      description: supported probe for test triggers
      type: object
      properties:
        scheme:
          description: >-
            test trigger condition probe scheme to connect to host, default is
            http
          type: string
          example: http
        host:
          description: test trigger condition probe host, default is pod ip or service name
          type: string
          example: testkube-api-server
        path:
          description: test trigger condition probe path to check, default is /
          type: string
          example: /
        port:
          description: test trigger condition probe port to connect
          type: integer
          format: int32
          example: 80
        headers:
          description: test trigger condition probe headers to submit
          type: object
          additionalProperties:
            type: string
          example:
            Content-Type: application/xml
    TestTriggerProbeSpec:
      type: object
      properties:
        probes:
          description: list of test trigger probes
          type: array
          items:
            $ref: '#/components/schemas/TestTriggerProbe'
        timeout:
          description: >-
            duration in seconds the test trigger waits for probes, until its
            stopped
          type: integer
          format: int32
          example: 1
        delay:
          description: duration in seconds the test trigger waits between probes
          type: integer
          format: int32
          example: 1
    TestTriggerResources:
      description: supported kubernetes resources for test triggers
      type: string
      enum:
        - pod
        - deployment
        - statefulset
        - daemonset
        - service
        - ingress
        - event
        - configmap
    TestTriggerSelector:
      type: object
      properties:
        name:
          description: kubernetes resource name selector
          type: string
          example: nginx
        nameRegex:
          description: kubernetes resource name regex
          type: string
          example: nginx.*
        namespace:
          description: resource namespace
          type: string
          example: testkube
        namespaceRegex:
          description: kubernetes resource namespace regex
          type: string
          example: test*
        labelSelector:
          $ref: >-
            https://raw.githubusercontent.com/garethr/kubernetes-json-schema/master/v1.7.8/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector
          description: label selector for Kubernetes resources
    TestTriggerUpsertRequest:
      description: test trigger create or update request body
      type: object
      required:
        - event
        - action
        - execution
        - testSelector
      allOf:
        - $ref: '#/components/schemas/TestTrigger'
        - $ref: '#/components/schemas/ObjectRef'
    TestUpdateRequest:
      description: test update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Test'
    TestUpsertRequest:
      description: test create request body
      type: object
      allOf:
        - $ref: '#/components/schemas/Test'
    TestWithExecution:
      description: Test with latest Execution result
      type: object
      properties:
        test:
          $ref: '#/components/schemas/Test'
        latestExecution:
          $ref: '#/components/schemas/Execution'
      required:
        - test
    TestWithExecutionSummary:
      description: Test with latest Execution result summary
      type: object
      properties:
        test:
          $ref: '#/components/schemas/Test'
        latestExecution:
          $ref: '#/components/schemas/ExecutionSummary'
      required:
        - test
    TestWorkflow:
      type: object
      properties:
        name:
          description: kubernetes resource name
          type: string
        namespace:
          description: kubernetes namespace
          type: string
        description:
          description: human-readable description
          type: string
        labels:
          description: test workflow labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        annotations:
          description: test workflow annotations
          type: object
          additionalProperties:
            type: string
        created:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        updated:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        spec:
          $ref: '#/components/schemas/TestWorkflowSpec'
        readOnly:
          description: if test workflow is offline and cannot be executed
          type: boolean
        status:
          $ref: '#/components/schemas/TestWorkflowStatusSummary'
        sync:
          $ref: '#/components/schemas/Syncable'
    TestWorkflowConcurrencyPolicy:
      description: configuration to control concurrent executions.
      type: object
      properties:
        group:
          description: >-
            Group ongoing executions by this identifier instead of by workflow
            name. Use the group identifier if you want the control concurrency
            across workflows.
          type: string
        max:
          description: >-
            The maximum amount of concurrent executions for this workflow or
            group. The scheduler will check the amount of ongoing executions for
            this workflow or group and only schedule this workflow when the
            amount is below its given maximum. When using a group identifier, it
            is recommended to keep the maximum in sync through a
            WorkflowTemplate.
          type: integer
        cancelInProgress:
          description: >-
            Whether the oldest in progress execution should be cancelled to be
            replaced with the latest queued one.
          type: boolean
          default: false
    TestWorkflowConfigSchema:
      description: configuration definition
      type: object
      additionalProperties:
        $ref: '#/components/schemas/TestWorkflowParameterSchema'
    TestWorkflowConfigValue:
      description: configuration values to pass to the template
      type: object
      additionalProperties:
        type: string
    TestWorkflowContainerConfig:
      type: object
      properties:
        workingDir:
          $ref: '#/components/schemas/BoxedString'
        image:
          description: image to be used for the container
          type: string
        imagePullPolicy:
          $ref: '#/components/schemas/ImagePullPolicy'
        env:
          description: environment variables to append to the container
          type: array
          items:
            $ref: '#/components/schemas/EnvVar'
        envFrom:
          description: external environment variables to append to the container
          type: array
          items:
            $ref: '#/components/schemas/EnvFromSource'
        command:
          $ref: '#/components/schemas/BoxedStringList'
        args:
          $ref: '#/components/schemas/BoxedStringList'
        resources:
          $ref: '#/components/schemas/TestWorkflowResources'
        securityContext:
          $ref: '#/components/schemas/SecurityContext'
        volumeMounts:
          description: volumes to mount to the container
          type: array
          items:
            $ref: '#/components/schemas/VolumeMount'
    TestWorkflowContent:
      type: object
      properties:
        git:
          $ref: '#/components/schemas/TestWorkflowContentGit'
        files:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowContentFile'
        tarball:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowContentTarball'
    TestWorkflowContentFile:
      type: object
      properties:
        path:
          description: path where the file should be accessible at
          type: string
          minLength: 1
        content:
          description: plain-text content to put inside
          type: string
        contentFrom:
          $ref: '#/components/schemas/EnvVarSource'
        mode:
          $ref: '#/components/schemas/BoxedInteger'
      required:
        - path
    TestWorkflowContentGit:
      type: object
      properties:
        uri:
          description: uri for the Git repository
          type: string
        revision:
          description: branch, commit or a tag name to fetch
          type: string
        username:
          description: plain text username to fetch with
          type: string
        usernameFrom:
          $ref: '#/components/schemas/EnvVarSource'
        token:
          description: plain text token to fetch with
          type: string
        tokenFrom:
          $ref: '#/components/schemas/EnvVarSource'
        sshKey:
          description: plain text SSH private key to fetch with
          type: string
        sshKeyFrom:
          $ref: '#/components/schemas/EnvVarSource'
        authType:
          $ref: '#/components/schemas/ContentGitAuthType'
        mountPath:
          description: >-
            where to mount the fetched repository contents (defaults to "repo"
            directory in the data volume)
          type: string
        cone:
          description: enable cone mode for sparse checkout with paths
          type: boolean
        paths:
          description: paths to fetch for the sparse checkout
          type: array
          items:
            type: string
    TestWorkflowContentTarball:
      type: object
      properties:
        url:
          description: url for the tarball to extract
          type: string
        path:
          description: path where the tarball should be extracted
          type: string
        mount:
          $ref: '#/components/schemas/BoxedBoolean'
      required:
        - url
        - path
    TestWorkflowCronJobConfig:
      description: cron job configuration
      type: object
      properties:
        cron:
          description: cron schedule to run a test workflow
          type: string
          example: '* * * * *'
        labels:
          description: labels to attach to the cron job
          type: object
          additionalProperties:
            type: string
        annotations:
          description: annotations to attach to the cron job
          type: object
          additionalProperties:
            type: string
        config:
          $ref: '#/components/schemas/TestWorkflowConfigValue'
        target:
          $ref: '#/components/schemas/ExecutionTarget'
        timezone:
          $ref: '#/components/schemas/BoxedString'
          description: cron timezone
          example: America/New_York
      required:
        - cron
    TestWorkflowEvent:
      type: object
      properties:
        cronjob:
          $ref: '#/components/schemas/TestWorkflowCronJobConfig'
    TestWorkflowExecution:
      type: object
      properties:
        id:
          description: unique execution identifier
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        groupId:
          description: identifier for group of correlated executions
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        runnerId:
          description: identifier of the runner where it has been executed
          type: string
        runnerTarget:
          $ref: '#/components/schemas/ExecutionTarget'
        runnerOriginalTarget:
          $ref: '#/components/schemas/ExecutionTarget'
        name:
          description: execution name
          type: string
          example: some-workflow-name-1
        namespace:
          description: execution namespace
          type: string
          example: my-testkube
        number:
          description: sequence number for the execution
          type: integer
        scheduledAt:
          description: when the execution has been scheduled to run
          type: string
          format: date-time
        assignedAt:
          description: when the execution has been assigned to some runner
          type: string
          format: date-time
        statusAt:
          description: >-
            when the execution result's status has changed last time (queued,
            passed, failed)
          type: string
          format: date-time
        signature:
          description: structured tree of steps
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowSignature'
        result:
          $ref: '#/components/schemas/TestWorkflowResult'
        output:
          description: >-
            additional information from the steps, like referenced executed
            tests or artifacts
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowOutput'
        reports:
          description: generated reports from the steps, like junit
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowReport'
        resourceAggregations:
          $ref: '#/components/schemas/TestWorkflowExecutionResourceAggregationsReport'
        workflow:
          $ref: '#/components/schemas/TestWorkflow'
        resolvedWorkflow:
          $ref: '#/components/schemas/TestWorkflow'
        testWorkflowExecutionName:
          description: test workflow execution name started the test workflow execution
          type: string
        disableWebhooks:
          description: whether webhooks on the execution of this test workflow are disabled
          type: boolean
          default: false
          example:
            - true
            - false
        silentMode:
          $ref: '#/components/schemas/SilentMode'
        tags:
          $ref: '#/components/schemas/TestWorkflowTagValue'
        runningContext:
          $ref: '#/components/schemas/TestWorkflowRunningContext'
          description: running context for the test workflow execution (Pro edition only)
        configParams:
          $ref: '#/components/schemas/TestWorkflowExecutionConfig'
        runtime:
          $ref: '#/components/schemas/TestWorkflowExecutionRuntime'
      required:
        - id
        - name
        - workflow
    TestWorkflowExecutionCR:
      type: object
      properties:
        testWorkflow:
          $ref: '#/components/schemas/ObjectRef'
          description: test workflow name and namespace
        executionRequest:
          $ref: '#/components/schemas/TestWorkflowExecutionRequest'
          description: test workflow execution request parameters
        status:
          $ref: '#/components/schemas/TestWorkflowExecutionStatusCR'
          description: test workflow execution status
      required:
        - testWorkflow
    TestWorkflowExecutionConfig:
      description: map of configuration values used in the test workflow execution
      type: object
      additionalProperties:
        $ref: '#/components/schemas/TestWorkflowExecutionConfigValue'
    TestWorkflowExecutionConfigValue:
      description: configuration values used in the test workflow execution
      type: object
      properties:
        value:
          description: configuration value
          type: string
        emptyValue:
          description: configuration value is empty
          type: boolean
        defaultValue:
          description: configuration value default
          type: string
        emptyDefaultValue:
          description: configuration value default is empty
          type: boolean
        truncated:
          description: indicates if the value is truncated
          type: boolean
        sensitive:
          description: marks value as sensitive
          type: boolean
    TestWorkflowExecutionHealth:
      type: object
      properties:
        passRate:
          description: >
            Recency-weighted fraction of executions that passed (value between
            0.0 and 1.0).
          type: number
          format: float64
        flipRate:
          description: >
            Fraction of status changes among consecutive executions without
            recency weighting

            (value between 0.0 and 1.0).
          type: number
          format: float64
        overallHealth:
          description: |
            Combined health score, computed as passRate * (1 - flipRate)
            (value between 0.0 and 1.0).
          type: number
          format: float64
      required:
        - passRate
        - flipRate
        - overallHealth
    TestWorkflowExecutionNotification:
      type: object
      properties:
        ts:
          description: timestamp for the notification if available
          type: string
          format: date-time
        result:
          $ref: '#/components/schemas/TestWorkflowResult'
        ref:
          description: step reference, if related to some specific step
          type: string
        log:
          description: >-
            log content, if it's just a log. note, that it includes 30 chars
            timestamp + space
          type: string
        output:
          $ref: '#/components/schemas/TestWorkflowOutput'
        temporary:
          description: should it be considered temporary only for execution time
          type: boolean
    TestWorkflowExecutionRequest:
      type: object
      properties:
        name:
          description: custom execution name
          type: string
        config:
          $ref: '#/components/schemas/TestWorkflowConfigValue'
        runtime:
          $ref: '#/components/schemas/TestWorkflowExecutionRuntime'
          description: runtime configuration for the test workflow execution
        testWorkflowExecutionName:
          description: test workflow execution name started the test workflow execution
          type: string
        disableWebhooks:
          description: whether webhooks on the execution of this test workflow are disabled
          type: boolean
          default: false
        silentMode:
          $ref: '#/components/schemas/SilentMode'
        tags:
          $ref: '#/components/schemas/TestWorkflowTagValue'
        target:
          $ref: '#/components/schemas/ExecutionTarget'
        runningContext:
          $ref: '#/components/schemas/TestWorkflowRunningContext'
          description: running context for the test workflow execution (Pro edition only)
        parentExecutionIds:
          description: parent execution ids
          type: array
          items:
            type: string
    TestWorkflowExecutionResourceAggregations:
      description: >
        TestWorkflowExecutionResourceAggregations provides min, max, average,
        total,

        and standard deviation values for a resource metric.
      type: object
      properties:
        total:
          description: Total sum of the metric.
          type: number
          format: float64
        min:
          description: Minimum value of the metric.
          type: number
          format: float64
        max:
          description: Maximum value of the metric.
          type: number
          format: float64
        avg:
          description: Average value of the metric.
          type: number
          format: float64
        stdDev:
          description: Standard deviation of the metric.
          type: number
          format: float64
    TestWorkflowExecutionResourceAggregationsByMeasurement:
      description: >
        TestWorkflowExecutionResourceAggregationsByMeasurement provides resource
        usage aggregations

        for a specific measurement (e.g. CPU, Memory, etc.) across all steps in
        a TestWorkflowExecution.
      type: object
      additionalProperties:
        description: >
          TestWorkflowExecutionResourceAggregations provides resource usage
          aggregations

          for a specific field (e.g. millicores, used...).
        type: object
        additionalProperties:
          $ref: '#/components/schemas/TestWorkflowExecutionResourceAggregations'
    TestWorkflowExecutionResourceAggregationsReport:
      description: >
        TestWorkflowExecutionResourceAggregationsReport provides resource usage
        aggregations

        for an entire TestWorkflowExecution (globally) and also per-step (by
        measurements).
      type: object
      properties:
        global:
          $ref: >-
            #/components/schemas/TestWorkflowExecutionResourceAggregationsByMeasurement
        step:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowExecutionStepResourceAggregations'
    TestWorkflowExecutionResourceAggregationsScope:
      description: Scope of the resource metrics aggregations.
      type: string
      enum:
        - step
        - global
    TestWorkflowExecutionRuntime:
      description: runtime configuration for a specific test workflow execution
      type: object
      properties:
        variables:
          description: runtime variables passed to the test workflow execution
          type: object
          additionalProperties:
            type: string
    TestWorkflowExecutionSchema:
      description: test workflow execution configuration
      type: object
      properties:
        tags:
          $ref: '#/components/schemas/TestWorkflowTagValue'
        target:
          $ref: '#/components/schemas/ExecutionTarget'
        silent:
          description: >-
            indicates that all executions should be silent by default. When
            true, SilentMode is activated for all executions (Webhooks,
            Insights, Health, Metrics, Cdevents all set to true).
          type: boolean
          default: false
    TestWorkflowExecutionStatusCR:
      description: test workflow execution status
      type: object
      properties:
        latestExecution:
          $ref: '#/components/schemas/TestWorkflowExecution'
        generation:
          description: test workflow execution generation
          type: integer
          format: int64
    TestWorkflowExecutionStepResourceAggregations:
      description: Step-based resource metrics aggregations (by measurement and field)
      type: object
      properties:
        ref:
          description: step reference
          type: string
        aggregations:
          $ref: >-
            #/components/schemas/TestWorkflowExecutionResourceAggregationsByMeasurement
    TestWorkflowExecutionSummary:
      type: object
      properties:
        id:
          description: unique execution identifier
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        groupId:
          description: identifier for group of correlated executions
          type: string
          format: bson objectId
          example: 62f395e004109209b50edfc1
        runnerId:
          description: identifier of the runner where it has been executed
          type: string
        name:
          description: execution name
          type: string
          example: some-workflow-name-1
        number:
          description: sequence number for the execution
          type: integer
        scheduledAt:
          description: when the execution has been scheduled to run
          type: string
          format: date-time
        statusAt:
          description: >-
            when the execution result's status has changed last time (queued,
            passed, failed)
          type: string
          format: date-time
        result:
          $ref: '#/components/schemas/TestWorkflowResultSummary'
        workflow:
          $ref: '#/components/schemas/TestWorkflowSummary'
        tags:
          $ref: '#/components/schemas/TestWorkflowTagValue'
        runningContext:
          $ref: '#/components/schemas/TestWorkflowRunningContext'
          description: running context for the test workflow execution (Pro edition only)
        configParams:
          $ref: '#/components/schemas/TestWorkflowExecutionConfig'
        runtime:
          $ref: '#/components/schemas/TestWorkflowExecutionRuntime'
        reports:
          description: generated reports from the steps, like junit
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowReport'
        resourceAggregations:
          $ref: '#/components/schemas/TestWorkflowExecutionResourceAggregationsReport'
        silentMode:
          $ref: '#/components/schemas/SilentMode'
          description: execution mode to determine which events to skip
      required:
        - id
        - name
        - workflow
    TestWorkflowExecutionTags:
      type: object
      properties:
        tags:
          $ref: '#/components/schemas/TestWorkflowTagValue'
    TestWorkflowExecutionsResult:
      type: object
      properties:
        totals:
          $ref: '#/components/schemas/ExecutionsTotals'
        filtered:
          $ref: '#/components/schemas/ExecutionsTotals'
        results:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowExecutionSummary'
      required:
        - totals
        - filtered
        - results
    TestWorkflowIndependentServiceSpec:
      type: object
      allOf:
        - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
        - $ref: '#/components/schemas/TestWorkflowStepRun'
        - properties:
            description:
              description: service description to display
              type: string
            timeout:
              description: maximum time until reaching readiness
              type: string
            transfer:
              description: list of files to send to parallel steps
              type: array
              items:
                $ref: '#/components/schemas/TestWorkflowStepParallelTransfer'
            content:
              $ref: '#/components/schemas/TestWorkflowContent'
            pod:
              $ref: '#/components/schemas/TestWorkflowPodConfig'
            logs:
              $ref: '#/components/schemas/BoxedString'
            restartPolicy:
              type: string
            readinessProbe:
              $ref: '#/components/schemas/Probe'
            pvcs:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/TestWorkflowPvcConfig'
    TestWorkflowIndependentStep:
      type: object
      properties:
        name:
          description: readable name for the step
          type: string
        condition:
          description: >-
            expression to declare under which conditions the step should be run;
            defaults to "passed", except artifacts where it defaults to "always"
          type: string
        pure:
          $ref: '#/components/schemas/BoxedBoolean'
        paused:
          description: should the step be paused initially
          type: boolean
        negative:
          description: is the step expected to fail
          type: boolean
        optional:
          description: >-
            is the step optional, so the failure won't affect the TestWorkflow
            result
          type: boolean
        retry:
          $ref: '#/components/schemas/TestWorkflowRetryPolicy'
        timeout:
          description: maximum time this step may take
          type: string
        delay:
          description: delay before the step
          type: string
          pattern: >-
            ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$
        content:
          $ref: '#/components/schemas/TestWorkflowContent'
        services:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowIndependentServiceSpec'
        shell:
          description: script to run in a default shell for the container
          type: string
        run:
          $ref: '#/components/schemas/TestWorkflowStepRun'
        workingDir:
          $ref: '#/components/schemas/BoxedString'
        container:
          $ref: '#/components/schemas/TestWorkflowContainerConfig'
        execute:
          $ref: '#/components/schemas/TestWorkflowStepExecute'
        artifacts:
          $ref: '#/components/schemas/TestWorkflowStepArtifacts'
        parallel:
          $ref: '#/components/schemas/TestWorkflowIndependentStepParallel'
        setup:
          description: nested setup steps to run
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowIndependentStep'
        steps:
          description: nested steps to run
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowIndependentStep'
    TestWorkflowIndependentStepParallel:
      type: object
      allOf:
        - $ref: '#/components/schemas/TestWorkflowTemplateSpec'
        - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
        - $ref: '#/components/schemas/TestWorkflowStepControl'
        - $ref: '#/components/schemas/TestWorkflowStepOperations'
        - properties:
            parallelism:
              description: how many resources could be scheduled in parallel
              type: integer
            failFast:
              description: abort remaining parallel workers on first failure
              type: boolean
            description:
              description: worker description to display
              type: string
            logs:
              $ref: '#/components/schemas/BoxedString'
            transfer:
              description: list of files to send to parallel steps
              type: array
              items:
                $ref: '#/components/schemas/TestWorkflowStepParallelTransfer'
            fetch:
              description: list of files to fetch from parallel steps
              type: array
              items:
                $ref: '#/components/schemas/TestWorkflowStepParallelFetch'
    TestWorkflowJobConfig:
      type: object
      properties:
        labels:
          description: labels to attach to the job
          type: object
          additionalProperties:
            type: string
        annotations:
          description: annotations to attach to the job
          type: object
          additionalProperties:
            type: string
        namespace:
          description: namespace for execution of test workflow
          type: string
        activeDeadlineSeconds:
          $ref: '#/components/schemas/BoxedInteger'
    TestWorkflowOutput:
      type: object
      properties:
        ref:
          description: step reference
          type: string
        name:
          description: output kind name
          type: string
        value:
          description: value returned
          type: object
          additionalProperties: {}
    TestWorkflowParameterSchema:
      type: object
      properties:
        description:
          description: human-readable description for the property
          type: string
        type:
          $ref: '#/components/schemas/TestWorkflowParameterType'
        enum:
          description: list of acceptable values
          type: array
          items:
            type: string
        example:
          description: example value for the parameter
          type: string
        default:
          $ref: '#/components/schemas/BoxedString'
        format:
          description: predefined format for the string
          type: string
        pattern:
          description: regular expression to match
          type: string
        minLength:
          $ref: '#/components/schemas/BoxedInteger'
        maxLength:
          $ref: '#/components/schemas/BoxedInteger'
        minimum:
          $ref: '#/components/schemas/BoxedInteger'
        maximum:
          $ref: '#/components/schemas/BoxedInteger'
        exclusiveMinimum:
          $ref: '#/components/schemas/BoxedInteger'
        exclusiveMaximum:
          $ref: '#/components/schemas/BoxedInteger'
        multipleOf:
          $ref: '#/components/schemas/BoxedInteger'
        sensitive:
          description: whether this value should be stored in the secret
          type: boolean
          default: false
      required:
        - type
    TestWorkflowParameterType:
      description: type of the config parameter
      type: string
      enum:
        - string
        - integer
        - number
        - boolean
    TestWorkflowPause:
      type: object
      properties:
        ref:
          description: step at which it was paused
          type: string
        pausedAt:
          description: when the pause has started
          type: string
          format: date-time
        resumedAt:
          description: when the pause has ended
          type: string
          format: date-time
      required:
        - ref
        - pausedAt
    TestWorkflowPodConfig:
      type: object
      properties:
        labels:
          description: labels to attach to the pod
          type: object
          additionalProperties:
            type: string
        annotations:
          description: annotations to attach to the pod
          type: object
          additionalProperties:
            type: string
        imagePullSecrets:
          description: secret references for pulling images
          type: array
          items:
            $ref: '#/components/schemas/LocalObjectReference'
        serviceAccountName:
          description: default service account name for the containers
          type: string
        nodeSelector:
          description: label selector for node that the pod should land on
          type: object
          additionalProperties:
            type: string
        volumes:
          description: volumes to append to the pod
          type: array
          items:
            $ref: '#/components/schemas/Volume'
        activeDeadlineSeconds:
          $ref: '#/components/schemas/BoxedInteger'
        dnsPolicy:
          type: string
        nodeName:
          type: string
        securityContext:
          $ref: '#/components/schemas/PodSecurityContext'
        hostname:
          type: string
        subdomain:
          type: string
        affinity:
          $ref: '#/components/schemas/Affinity'
        tolerations:
          type: array
          items:
            $ref: '#/components/schemas/Toleration'
        hostAliases:
          type: array
          items:
            $ref: '#/components/schemas/HostAlias'
        priorityClassName:
          type: string
        priority:
          $ref: '#/components/schemas/BoxedInteger'
        dnsConfig:
          $ref: '#/components/schemas/PodDNSConfig'
        preemptionPolicy:
          $ref: '#/components/schemas/BoxedString'
        topologySpreadConstraints:
          type: array
          items:
            $ref: '#/components/schemas/TopologySpreadConstraint'
        schedulingGates:
          type: array
          items:
            $ref: '#/components/schemas/PodSchedulingGate'
        resourceClaims:
          type: array
          items:
            $ref: '#/components/schemas/PodResourceClaim'
        hostPID:
          $ref: '#/components/schemas/BoxedBoolean'
    TestWorkflowPvcConfig:
      type: object
      properties:
        accessModes:
          description: >-
            Access mode for claim storage. More info:
            https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes
          type: array
          items:
            type: string
        volumeMode:
          $ref: '#/components/schemas/BoxedString'
          description: >-
            Volume mode indicates the consumption of the volume as either a
            filesystem or block device. More info:
            https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode
        resources:
          $ref: '#/components/schemas/TestWorkflowResources'
          description: Resources required for pvc
        storageClassName:
          $ref: '#/components/schemas/BoxedString'
          description: >-
            Storage class name specifies the name of a StorageClass. More info:
            https://kubernetes.io/docs/concepts/storage/storage-classes/
        volumeName:
          description: Volume name is used to identify the volume
          type: string
        selector:
          $ref: '#/components/schemas/LabelSelector'
          description: >-
            Only the volumes whose labels match the selector can be bound to the
            claim
        dataSource:
          $ref: '#/components/schemas/TypedLocalObjectReference'
          description: >-
            Data source field can be used to specify either: * An existing
            VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An
            existing PVC (PersistentVolumeClaim)
        dataSourceRef:
          $ref: '#/components/schemas/TypedObjectReference'
          description: >-
            Data source reference specifies the object from which to populate
            the volume with data, if a non-empty volume is desired
        volumeAttributesClassName:
          $ref: '#/components/schemas/BoxedString'
          description: >-
            Volume attributes class name may be used to set the
            VolumeAttributesClass used by this claim. More info:
            https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass
    TestWorkflowRef:
      type: object
      properties:
        name:
          description: TestWorkflow name to include
          type: string
        config:
          $ref: '#/components/schemas/TestWorkflowConfigValue'
      required:
        - name
    TestWorkflowReport:
      type: object
      properties:
        ref:
          description: step reference
          type: string
        kind:
          description: report kind/type
          type: string
          enum:
            - junit
          example: junit
        file:
          description: file path to full report in artifact storage
          type: string
        summary:
          $ref: '#/components/schemas/TestWorkflowReportSummary'
    TestWorkflowReportSummary:
      type: object
      properties:
        tests:
          description: total number of test cases
          type: integer
        passed:
          description: number of passed test cases
          type: integer
        failed:
          description: number of failed test cases
          type: integer
        skipped:
          description: number of skipped test cases
          type: integer
        errored:
          description: number of error test cases
          type: integer
        duration:
          description: total duration of all test cases in milliseconds
          type: integer
          format: int64
    TestWorkflowResources:
      type: object
      properties:
        limits:
          $ref: '#/components/schemas/TestWorkflowResourcesList'
        requests:
          $ref: '#/components/schemas/TestWorkflowResourcesList'
    TestWorkflowResourcesList:
      type: object
      properties:
        cpu:
          description: number of CPUs
          type: string
          pattern: ^[0-9]+m?$
        memory:
          description: size of RAM memory
          type: string
          pattern: ^[0-9]+[GMK]i$
        storage:
          description: storage size
          type: string
          pattern: ^[0-9]+[GMK]i$
        ephemeral-storage:
          description: ephemeral storage size
          type: string
          pattern: ^[0-9]+[GMK]i$
    TestWorkflowResult:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/TestWorkflowStatus'
        predictedStatus:
          $ref: '#/components/schemas/TestWorkflowStatus'
        queuedAt:
          description: when the pod was created
          type: string
          format: date-time
        startedAt:
          description: when the pod has been successfully assigned
          type: string
          format: date-time
        finishedAt:
          description: when the pod has been completed
          type: string
          format: date-time
        duration:
          description: Go-formatted (human-readable) duration
          type: string
        totalDuration:
          description: Go-formatted (human-readable) total duration (incl. pause)
          type: string
        durationMs:
          description: Duration in milliseconds
          type: integer
        pausedMs:
          description: Pause duration in milliseconds
          type: integer
        totalDurationMs:
          description: Total duration in milliseconds (incl. pause)
          type: integer
        pauses:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowPause'
        initialization:
          $ref: '#/components/schemas/TestWorkflowStepResult'
        steps:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowStepResult'
      required:
        - status
        - predictedStatus
        - durationMs
        - pausedMs
        - totalDurationMs
    TestWorkflowResultSummary:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/TestWorkflowStatus'
        predictedStatus:
          $ref: '#/components/schemas/TestWorkflowStatus'
        queuedAt:
          description: when the pod was created
          type: string
          format: date-time
        startedAt:
          description: when the pod has been successfully assigned
          type: string
          format: date-time
        finishedAt:
          description: when the pod has been completed
          type: string
          format: date-time
        duration:
          description: Go-formatted (human-readable) duration
          type: string
        totalDuration:
          description: Go-formatted (human-readable) duration (incl. pause)
          type: string
        durationMs:
          description: Duration in milliseconds
          type: integer
        totalDurationMs:
          description: Duration in milliseconds (incl. pause)
          type: integer
        pausedMs:
          description: Pause duration in milliseconds
          type: integer
      required:
        - status
        - predictedStatus
        - durationMs
        - totalDurationMs
        - pausedMs
    TestWorkflowRetryPolicy:
      type: object
      properties:
        count:
          description: how many times at most it should retry
          type: integer
          minimum: 1
        until:
          description: until when it should retry (defaults to "passed")
          type: string
      required:
        - count
    TestWorkflowRunningContext:
      description: running context for test workflow execution
      type: object
      properties:
        interface:
          $ref: '#/components/schemas/TestWorkflowRunningContextInterface'
        actor:
          $ref: '#/components/schemas/TestWorkflowRunningContextActor'
      required:
        - interface
        - actor
    TestWorkflowRunningContextActor:
      description: running context actor for test workflow execution
      type: object
      properties:
        name:
          description: actor name
          type: string
        email:
          description: actor email
          type: string
        executionId:
          description: test workflow execution id
          type: string
        executionPath:
          description: all test workflow execution ids starting from the root
          type: string
        executionReference:
          description: reference test workflow execution id
          type: string
        type:
          $ref: '#/components/schemas/TestWorkflowRunningContextActorType'
      required:
        - type
    TestWorkflowRunningContextActorType:
      description: supported actors for test workflow running context
      type: string
      enum:
        - cron
        - testtrigger
        - user
        - testworkflow
        - testworkflowexecution
        - program
    TestWorkflowRunningContextInterface:
      description: running context interface for test workflow execution
      type: object
      properties:
        name:
          description: interface name
          type: string
        type:
          $ref: '#/components/schemas/TestWorkflowRunningContextInterfaceType'
      required:
        - type
    TestWorkflowRunningContextInterfaceType:
      description: supported interfaces for test workflow running context
      type: string
      enum:
        - cli
        - ui
        - api
        - ci/cd
        - internal
    TestWorkflowServiceSpec:
      type: object
      allOf:
        - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
        - $ref: '#/components/schemas/TestWorkflowIndependentServiceSpec'
        - properties:
            use:
              type: array
              items:
                $ref: '#/components/schemas/TestWorkflowTemplateRef'
    TestWorkflowSignature:
      type: object
      properties:
        ref:
          description: step reference
          type: string
        name:
          description: step name
          type: string
        category:
          description: step category, that may be used as name fallback
          type: string
        optional:
          description: is the step/group meant to be optional
          type: boolean
        negative:
          description: is the step/group meant to be negative
          type: boolean
        children:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowSignature'
    TestWorkflowSpec:
      type: object
      properties:
        use:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowTemplateRef'
        concurrency:
          $ref: '#/components/schemas/TestWorkflowConcurrencyPolicy'
        config:
          $ref: '#/components/schemas/TestWorkflowConfigSchema'
        system:
          $ref: '#/components/schemas/TestWorkflowSystem'
        content:
          $ref: '#/components/schemas/TestWorkflowContent'
        services:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowServiceSpec'
        container:
          $ref: '#/components/schemas/TestWorkflowContainerConfig'
        job:
          $ref: '#/components/schemas/TestWorkflowJobConfig'
        pod:
          $ref: '#/components/schemas/TestWorkflowPodConfig'
        setup:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStep'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStep'
        after:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStep'
        events:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowEvent'
        execution:
          $ref: '#/components/schemas/TestWorkflowExecutionSchema'
        pvcs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowPvcConfig'
    TestWorkflowStatus:
      type: string
      enum:
        - queued
        - assigned
        - starting
        - scheduling
        - running
        - pausing
        - paused
        - resuming
        - passed
        - failed
        - stopping
        - aborted
        - canceled
    TestWorkflowStatusSummary:
      description: test workflow status
      type: object
      properties:
        health:
          $ref: '#/components/schemas/TestWorkflowExecutionHealth'
    TestWorkflowStep:
      type: object
      properties:
        name:
          description: readable name for the step
          type: string
        condition:
          description: >-
            expression to declare under which conditions the step should be run;
            defaults to "passed", except artifacts where it defaults to "always"
          type: string
        pure:
          $ref: '#/components/schemas/BoxedBoolean'
        paused:
          description: should the step be paused initially
          type: boolean
        negative:
          description: is the step expected to fail
          type: boolean
        optional:
          description: >-
            is the step optional, so the failure won't affect the TestWorkflow
            result
          type: boolean
        use:
          description: list of TestWorkflowTemplates to use
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowTemplateRef'
        template:
          $ref: '#/components/schemas/TestWorkflowTemplateRef'
        retry:
          $ref: '#/components/schemas/TestWorkflowRetryPolicy'
        timeout:
          description: maximum time this step may take
          type: string
        delay:
          description: delay before the step
          type: string
          pattern: >-
            ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$
        content:
          $ref: '#/components/schemas/TestWorkflowContent'
        services:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowServiceSpec'
        shell:
          description: script to run in a default shell for the container
          type: string
        run:
          $ref: '#/components/schemas/TestWorkflowStepRun'
        workingDir:
          $ref: '#/components/schemas/BoxedString'
        container:
          $ref: '#/components/schemas/TestWorkflowContainerConfig'
        execute:
          $ref: '#/components/schemas/TestWorkflowStepExecute'
        artifacts:
          $ref: '#/components/schemas/TestWorkflowStepArtifacts'
        parallel:
          $ref: '#/components/schemas/TestWorkflowStepParallel'
        setup:
          description: nested setup steps to run
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStep'
        steps:
          description: nested steps to run
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStep'
    TestWorkflowStepArtifacts:
      type: object
      properties:
        workingDir:
          $ref: '#/components/schemas/BoxedString'
        compress:
          $ref: '#/components/schemas/TestWorkflowStepArtifactsCompression'
        paths:
          description: file paths to fetch from the container
          type: array
          items:
            type: string
          minItems: 1
      required:
        - paths
    TestWorkflowStepArtifactsCompression:
      type: object
      properties:
        name:
          description: artifact name
          type: string
    TestWorkflowStepControl:
      type: object
      properties:
        paused:
          description: should the step be paused initially
          type: boolean
        negative:
          description: is the step expected to fail
          type: boolean
        optional:
          description: >-
            is the step optional, so the failure won't affect the TestWorkflow
            result
          type: boolean
        retry:
          $ref: '#/components/schemas/TestWorkflowRetryPolicy'
        timeout:
          description: maximum time this step may take
          type: string
    TestWorkflowStepExecute:
      type: object
      properties:
        parallelism:
          description: how many resources could be scheduled in parallel
          type: integer
        async:
          description: >-
            only schedule the resources, don't watch for the results (unless it
            is needed for parallelism)
          type: boolean
        tests:
          description: tests to schedule
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStepExecuteTestRef'
        workflows:
          description: workflows to schedule
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowStepExecuteTestWorkflowRef'
    TestWorkflowStepExecuteStrategy:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/BoxedString'
        maxCount:
          $ref: '#/components/schemas/BoxedString'
        matrix:
          description: matrix of parameters to spawn instances
          type: object
          additionalProperties:
            description: dynamic expression or static list of values
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
        shards:
          description: parameters that should be distributed across sharded instances
          type: object
          additionalProperties:
            description: dynamic expression or static list of values
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
    TestWorkflowStepExecuteTestExecutionRequest:
      type: object
      properties:
        name:
          description: test execution custom name
          type: string
          example: testing with 1000 users
        executionLabels:
          description: test execution labels
          type: object
          additionalProperties:
            type: string
          example:
            prefix: some-
            users: '3'
        isVariablesFileUploaded:
          description: in case the variables file is too big, it will be uploaded
          type: boolean
          example: false
        variablesFile:
          description: >-
            variables file content - need to be in format for particular
            executor (e.g. postman envs file)
          type: string
        variables:
          $ref: '#/components/schemas/Variables'
        testSecretUUID:
          description: test secret uuid
          type: string
          example: 7934600f-b367-48dd-b981-4353304362fb
        command:
          description: executor image command
          type: array
          items:
            type: string
          example:
            - curl
        args:
          description: additional executor binary arguments
          type: array
          items:
            type: string
          example:
            - '--repeats'
            - '5'
            - '--insecure'
        argsMode:
          description: usage mode for arguments
          type: string
          enum:
            - append
            - override
            - replace
        image:
          description: container image, executor will run inside this image
          type: string
          example: kubeshop/testkube-executor-custom:1.10.11-dev-0a9c91
        imagePullSecrets:
          description: container image pull secrets
          type: array
          items:
            $ref: '#/components/schemas/LocalObjectReference'
        sync:
          description: whether to start execution sync or async
          type: boolean
        httpProxy:
          description: http proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8080
        httpsProxy:
          description: https proxy for executor containers
          type: string
          example: user:pass@my.proxy.server:8081
        negativeTest:
          description: whether to run test as negative test
          type: boolean
          example: false
        activeDeadlineSeconds:
          description: duration in seconds the test may be active, until its stopped
          type: integer
          format: int64
          example: 1
        artifactRequest:
          $ref: '#/components/schemas/ArtifactRequest'
          description: configuration parameters for storing test artifacts
        jobTemplate:
          description: job template extensions
          type: string
        cronJobTemplate:
          description: cron job template extensions
          type: string
        preRunScript:
          description: script to run before test execution
          type: string
          example: echo -n '$SECRET_ENV' > ./secret_file
        postRunScript:
          description: script to run after test execution
          type: string
          example: sleep 30
        executePostRunScriptBeforeScraping:
          description: execute post run script before scraping (prebuilt executor only)
          type: boolean
        sourceScripts:
          description: run scripts using source command (container executor only)
          type: boolean
        scraperTemplate:
          description: scraper template extensions
          type: string
        pvcTemplate:
          description: pvc template extensions
          type: string
        envConfigMaps:
          description: config map references
          type: array
          items:
            $ref: '#/components/schemas/EnvReference'
        envSecrets:
          description: secret references
          type: array
          items:
            $ref: '#/components/schemas/EnvReference'
        executionNamespace:
          description: namespace for test execution (Pro edition only)
          type: string
    TestWorkflowStepExecuteTestRef:
      type: object
      allOf:
        - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
        - properties:
            name:
              description: test name to schedule
              type: string
            description:
              description: test execution description to display
              type: string
            count:
              $ref: '#/components/schemas/BoxedString'
            maxCount:
              $ref: '#/components/schemas/BoxedString'
            executionRequest:
              $ref: '#/components/schemas/TestWorkflowStepExecuteTestExecutionRequest'
            tarball:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/TestWorkflowTarballRequest'
    TestWorkflowStepExecuteTestWorkflowRef:
      type: object
      allOf:
        - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
        - properties:
            name:
              description: TestWorkflow name to include
              type: string
            description:
              description: TestWorkflow execution description to display
              type: string
            executionName:
              description: TestWorkflow execution name override
              type: string
            tarball:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/TestWorkflowTarballRequest'
            config:
              $ref: '#/components/schemas/TestWorkflowConfigValue'
            selector:
              $ref: '#/components/schemas/LabelSelector'
              description: label selector for test workflow
            target:
              $ref: '#/components/schemas/ExecutionTarget'
    TestWorkflowStepOperations:
      type: object
      properties:
        delay:
          description: delay before the step
          type: string
          pattern: >-
            ^((0|[1-9][0-9]*)h)?((0|[1-9][0-9]*)m)?((0|[1-9][0-9]*)s)?((0|[1-9][0-9]*)ms)?$
        shell:
          description: script to run in a default shell for the container
          type: string
        run:
          $ref: '#/components/schemas/TestWorkflowStepRun'
        execute:
          $ref: '#/components/schemas/TestWorkflowStepExecute'
        artifacts:
          $ref: '#/components/schemas/TestWorkflowStepArtifacts'
    TestWorkflowStepParallel:
      type: object
      allOf:
        - $ref: '#/components/schemas/TestWorkflowSpec'
        - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
        - $ref: '#/components/schemas/TestWorkflowStepControl'
        - $ref: '#/components/schemas/TestWorkflowStepOperations'
        - properties:
            parallelism:
              description: how many resources could be scheduled in parallel
              type: integer
            failFast:
              description: abort remaining parallel workers on first failure
              type: boolean
            description:
              description: worker description to display
              type: string
            logs:
              $ref: '#/components/schemas/BoxedString'
            transfer:
              description: list of files to send to parallel steps
              type: array
              items:
                $ref: '#/components/schemas/TestWorkflowStepParallelTransfer'
            fetch:
              description: list of files to fetch from parallel steps
              type: array
              items:
                $ref: '#/components/schemas/TestWorkflowStepParallelFetch'
            template:
              $ref: '#/components/schemas/TestWorkflowTemplateRef'
    TestWorkflowStepParallelFetch:
      type: object
      properties:
        from:
          description: path to fetch files from
          type: string
        to:
          description: path to save the files to
          type: string
        files:
          $ref: '#/components/schemas/TestWorkflowTarballFilePattern'
      required:
        - from
    TestWorkflowStepParallelTransfer:
      type: object
      properties:
        from:
          description: path to load the files from
          type: string
        to:
          description: path to save the files to
          type: string
        files:
          $ref: '#/components/schemas/TestWorkflowTarballFilePattern'
        mount:
          $ref: '#/components/schemas/BoxedBoolean'
      required:
        - from
    TestWorkflowStepResult:
      type: object
      properties:
        errorMessage:
          type: string
        status:
          $ref: '#/components/schemas/TestWorkflowStepStatus'
        exitCode:
          type: number
        queuedAt:
          description: when the container was created
          type: string
          format: date-time
        startedAt:
          description: when the container was started
          type: string
          format: date-time
        finishedAt:
          description: when the container was finished
          type: string
          format: date-time
    TestWorkflowStepRun:
      type: object
      properties:
        workingDir:
          $ref: '#/components/schemas/BoxedString'
        image:
          description: image to be used for the container
          type: string
        imagePullPolicy:
          $ref: '#/components/schemas/ImagePullPolicy'
        env:
          description: environment variables to append to the container
          type: array
          items:
            $ref: '#/components/schemas/EnvVar'
        envFrom:
          description: external environment variables to append to the container
          type: array
          items:
            $ref: '#/components/schemas/EnvFromSource'
        command:
          $ref: '#/components/schemas/BoxedStringList'
        args:
          $ref: '#/components/schemas/BoxedStringList'
        shell:
          $ref: '#/components/schemas/BoxedString'
        resources:
          $ref: '#/components/schemas/TestWorkflowResources'
        securityContext:
          $ref: '#/components/schemas/SecurityContext'
        volumeMounts:
          description: volumes to mount to the container
          type: array
          items:
            $ref: '#/components/schemas/VolumeMount'
    TestWorkflowStepStatus:
      type: string
      enum:
        - queued
        - running
        - paused
        - passed
        - failed
        - timeout
        - skipped
        - aborted
        - canceled
    TestWorkflowSummary:
      type: object
      properties:
        name:
          type: string
        namespace:
          type: string
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        health:
          $ref: '#/components/schemas/TestWorkflowExecutionHealth'
    TestWorkflowSystem:
      type: object
      properties:
        pureByDefault:
          $ref: '#/components/schemas/BoxedBoolean'
        isolatedContainers:
          $ref: '#/components/schemas/BoxedBoolean'
    TestWorkflowTagValue:
      description: tag values to pass to the test workflow execution
      type: object
      additionalProperties:
        type: string
    TestWorkflowTarballFilePattern:
      description: dynamic expression or static list of file patterns to pack
      type: object
      properties:
        static:
          type: array
          items: {}
        expression:
          type: string
    TestWorkflowTarballRequest:
      type: object
      properties:
        from:
          description: path to load the files from
          type: string
        files:
          $ref: '#/components/schemas/TestWorkflowTarballFilePattern'
      required:
        - from
    TestWorkflowTarget:
      type: object
      properties:
        match:
          description: labels to attach to the job
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        not:
          description: labels to attach to the job
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        replicate:
          type: array
          items:
            type: string
    TestWorkflowTemplate:
      type: object
      properties:
        name:
          description: kubernetes resource name
          type: string
        namespace:
          description: kubernetes namespace
          type: string
        description:
          description: human-readable description
          type: string
        labels:
          description: test workflow labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        annotations:
          description: test workflow annotations
          type: object
          additionalProperties:
            type: string
        created:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        updated:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        spec:
          $ref: '#/components/schemas/TestWorkflowTemplateSpec'
        sync:
          $ref: '#/components/schemas/Syncable'
    TestWorkflowTemplateRef:
      type: object
      properties:
        name:
          description: TestWorkflowTemplate name to include
          type: string
        config:
          $ref: '#/components/schemas/TestWorkflowConfigValue'
      required:
        - name
    TestWorkflowTemplateSpec:
      type: object
      properties:
        concurrency:
          $ref: '#/components/schemas/TestWorkflowConcurrencyPolicy'
        config:
          $ref: '#/components/schemas/TestWorkflowConfigSchema'
        system:
          $ref: '#/components/schemas/TestWorkflowSystem'
        content:
          $ref: '#/components/schemas/TestWorkflowContent'
        services:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowIndependentServiceSpec'
        container:
          $ref: '#/components/schemas/TestWorkflowContainerConfig'
        job:
          $ref: '#/components/schemas/TestWorkflowJobConfig'
        pod:
          $ref: '#/components/schemas/TestWorkflowPodConfig'
        setup:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowIndependentStep'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowIndependentStep'
        after:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowIndependentStep'
        events:
          type: array
          items:
            $ref: '#/components/schemas/TestWorkflowEvent'
        execution:
          $ref: '#/components/schemas/TestWorkflowExecutionSchema'
        pvcs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowPvcConfig'
    TestWorkflowWithExecution:
      type: object
      properties:
        workflow:
          $ref: '#/components/schemas/TestWorkflow'
        latestExecution:
          $ref: '#/components/schemas/TestWorkflowExecution'
    TestWorkflowWithExecutionSummary:
      type: object
      properties:
        workflow:
          $ref: '#/components/schemas/TestWorkflow'
        latestExecution:
          $ref: '#/components/schemas/TestWorkflowExecutionSummary'
    TestkubeEvent:
      type: object
      properties:
        id:
          description: The unique identifier of this event.
          type: string
        organizationId:
          description: The identifier of this event's organization.
          type: string
        environmentId:
          description: The identifier of this event's environment, if any.
          type: string
        eventTime:
          description: The timestamp at which this event (first) occurred.
          type: string
          format: date-time
        type:
          description: The type of this event.
          type: string
          enum:
            - Normal
            - Warning
        reason:
          description: The human-readable reason of this event.
          type: string
        note:
          description: The human-readable message of this event.
          type: string
        regarding:
          $ref: '#/components/schemas/EventTarget'
        series:
          $ref: '#/components/schemas/EventSeries'
      required:
        - id
        - organizationId
        - eventTime
        - type
        - reason
        - note
        - regarding
    TimeSeriesData:
      type: array
      items:
        $ref: '#/components/schemas/TimeSeriesDatum'
    TimeSeriesDatum:
      type: object
      properties:
        ts:
          description: The timestamp of this data point, in unix format.
          type: integer
          format: int64
        value:
          description: The value of this data point.
          type: integer
          format: int64
        segments:
          $ref: '#/components/schemas/TimeSeriesSegments'
      required:
        - ts
        - value
    TimeSeriesSegment:
      type: object
      properties:
        label:
          description: The label of this segment.
          type: string
        value:
          description: The value of this segment.
          type: integer
          format: int64
      required:
        - label
        - value
    TimeSeriesSegments:
      type: array
      items:
        $ref: '#/components/schemas/TimeSeriesSegment'
    Token:
      allOf:
        - $ref: '#/components/schemas/BasicObject'
        - type: object
          properties:
            type:
              description: token type for API access
              type: string
              enum:
                - user
                - agent
                - api
                - artifact
                - scim
              example: user
            token:
              description: Raw token value
              type: string
              example: tkcagnt_ade343dafecb5412232adeaa521add
            scopes:
              description: token scopes
              type: array
              items:
                $ref: '#/components/schemas/Scope'
              example:
                - identifier: tkcorg_xxxxxxxxxx
                  resource: org
                  role: admin
            meta:
              description: additional token meta data
              type: object
              additionalProperties:
                type: string
            expiresAt:
              description: token expiration date
              type: string
              format: date-time
            lastActive:
              description: date when token was active for the last time
              type: string
              format: date-time
          required:
            - type
            - token
            - scopes
            - expiresAt
            - createdAt
    Tokens:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Token'
      required:
        - elements
    Toleration:
      type: object
      properties:
        key:
          type: string
        operator:
          type: string
        value:
          type: string
        effect:
          type: string
        tolerationSeconds:
          $ref: '#/components/schemas/BoxedInteger'
    ToolCallStatus:
      description: Status of a tool call within a session
      type: string
      enum:
        - pending
        - approved
        - declined
        - completed
        - failed
    TopologySpreadConstraint:
      type: object
      properties:
        maxSkew:
          type: integer
        topologyKey:
          type: string
        whenUnsatisfiable:
          type: string
        labelSelector:
          $ref: '#/components/schemas/LabelSelector'
        minDomains:
          $ref: '#/components/schemas/BoxedInteger'
        nodeAffinityPolicy:
          $ref: '#/components/schemas/BoxedString'
        nodeTaintsPolicy:
          $ref: '#/components/schemas/BoxedString'
        matchLabelKeys:
          type: array
          items:
            type: string
    TypedLocalObjectReference:
      description: >-
        TypedLocalObjectReference contains enough information to let you locate
        the typed referenced object inside the same namespace
      type: object
      properties:
        apiGroup:
          $ref: '#/components/schemas/BoxedString'
          description: api group is the group for the resource being referenced
        kind:
          description: kind is the type of resource being referenced
          type: string
        name:
          description: name is the name of resource being referenced
          type: string
    TypedObjectReference:
      description: >-
        TypedObjectReference contains enough information to let you locate the
        typed referenced object inside the specified namespace
      type: object
      properties:
        namespace:
          $ref: '#/components/schemas/BoxedString'
          description: Namespace is the namespace of resource being referenced
      allOf:
        - $ref: '#/components/schemas/TypedLocalObjectReference'
    UsageStats:
      type: object
      properties:
        executionsCountTests:
          description: number of Test executions
          type: integer
          format: int64
        executionsCountTestsuites:
          description: number of Testsuite executions
          type: integer
          format: int64
        executionsCountTotal:
          description: number of total Test and Testsuite executions
          type: integer
          format: int64
        logsCountTests:
          description: number of Test log files
          type: integer
          format: int64
        logsCountTestsuites:
          description: number of Testsuite log files
          type: integer
          format: int64
        logsCountTotal:
          description: number of total Test and Testsuite log files
          type: integer
          format: int64
        logsSizeTests:
          description: size in bytes of Test logs
          type: integer
          format: int64
        logsSizeTestsuites:
          description: size in bytes of Testsuite logs
          type: integer
          format: int64
        logsSizeTotal:
          description: size in bytes of all logs
          type: integer
          format: int64
        artifactsCountTests:
          description: number of Test log files
          type: integer
          format: int64
        artifactsCountTestsuites:
          description: number of Testsuite log files
          type: integer
          format: int64
        artifactsCountTotal:
          description: number of total Test and Testsuite log files
          type: integer
          format: int64
        artifactsSizeTests:
          description: size in bytes of Test artifacts
          type: integer
          format: int64
        artifactsSizeTestsuites:
          description: size in bytes of Testsuite artifacts
          type: integer
          format: int64
        artifactsSizeTotal:
          description: size in bytes of all artifacts
          type: integer
          format: int64
        storageSizeTotal:
          description: size in bytes of all artifacts and logs
          type: integer
          format: int64
      required:
        - executionsCountTests
        - executionsCountTestsuites
        - executionsCountTotal
        - logsCountTests
        - logsCountTestsuites
        - logsCountTotal
        - logsSizeTests
        - logsSizeTestsuites
        - logsSizeTotal
        - artifactsCountTests
        - artifactsCountTestsuites
        - artifactsCountTotal
        - artifactsSizeTests
        - artifactsSizeTestsuites
        - artifactsSizeTotal
        - storageSizeTotal
    UserPreferences:
      type: object
      properties:
        id:
          description: preference id
          type: string
        values:
          type: array
          items:
            type: string
      required:
        - id
        - values
    UserReference:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
      required:
        - email
    Variable:
      type: object
      properties:
        name:
          type: string
        value:
          type: string
        type:
          $ref: '#/components/schemas/VariableType'
        secretRef:
          $ref: '#/components/schemas/SecretRef'
        configMapRef:
          $ref: '#/components/schemas/ConfigMapRef'
    VariableType:
      type: string
      enum:
        - basic
        - secret
    Variables:
      description: >-
        execution variables passed to executor converted to vars for usage in
        tests
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Variable'
      example:
        secret1:
          name: secret1
          type: secret
          value: secretvalue1
        var1:
          name: var1
          type: basic
          value: value1
    View:
      type: object
      properties:
        id:
          description: ID of the view
          type: string
          example: '1234567890'
        name:
          description: name of the view
          type: string
          example: my-example-view
        description:
          description: description of the view
          type: string
          example: This is an example view
        entity:
          $ref: '#/components/schemas/ViewEntity'
        filter:
          description: filter of the view
          type: string
          example: status=passed
        isPrivate:
          description: >-
            Whether the view is private (visible only to owner) or shared
            (visible to all users in environment)
          type: boolean
          example: true
    ViewEntity:
      description: Type of entity that the view is associated with
      type: string
      enum:
        - test-workflows
        - executions
      example: test-workflows
    Views:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/View'
      required:
        - elements
    Volume:
      description: >-
        Volume represents a named volume in a pod that may be accessed by any
        container in the pod.
      type: object
      properties:
        name:
          type: string
        hostPath:
          $ref: '#/components/schemas/HostPathVolumeSource'
        emptyDir:
          $ref: '#/components/schemas/EmptyDirVolumeSource'
        gcePersistentDisk:
          $ref: '#/components/schemas/GCEPersistentDiskVolumeSource'
        awsElasticBlockStore:
          $ref: '#/components/schemas/AWSElasticBlockStoreVolumeSource'
        secret:
          $ref: '#/components/schemas/SecretVolumeSource'
        nfs:
          $ref: '#/components/schemas/NFSVolumeSource'
        persistentVolumeClaim:
          $ref: '#/components/schemas/PersistentVolumeClaimVolumeSource'
        cephfs:
          $ref: '#/components/schemas/CephFSVolumeSource'
        azureFile:
          $ref: '#/components/schemas/AzureFileVolumeSource'
        azureDisk:
          $ref: '#/components/schemas/AzureDiskVolumeSource'
        configMap:
          $ref: '#/components/schemas/ConfigMapVolumeSource'
        csi:
          $ref: '#/components/schemas/CSIVolumeSource'
        projected:
          $ref: '#/components/schemas/ProjectedVolumeSource'
      required:
        - name
    VolumeMount:
      description: VolumeMount describes a mounting of a Volume within a container.
      type: object
      properties:
        mountPath:
          description: >-
            Path within the container at which the volume should be mounted. 
            Must not contain ':'.
          type: string
        mountPropagation:
          $ref: '#/components/schemas/BoxedString'
        name:
          description: This must match the Name of a Volume.
          type: string
        readOnly:
          description: >-
            Mounted read-only if true, read-write otherwise (false or
            unspecified). Defaults to false.
          type: boolean
        subPath:
          description: >-
            Path within the volume from which the container's volume should be
            mounted. Defaults to "" (volume's root).
          type: string
        subPathExpr:
          description: >-
            Expanded path within the volume from which the container's volume
            should be mounted. Behaves similarly to SubPath but environment
            variable references $(VAR_NAME) are expanded using the container's
            environment. Defaults to "" (volume's root). SubPathExpr and SubPath
            are mutually exclusive.
          type: string
      required:
        - mountPath
        - name
    VolumeSource:
      type: object
    Webhook:
      description: CRD based webhook data
      type: object
      properties:
        name:
          type: string
          example: webhook1
        namespace:
          type: string
          example: testkube
        labels:
          description: webhook labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        annotations:
          description: webhook annotations
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        created:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        updated:
          type: string
          format: date-time
          example: '2022-07-30T06:54:15Z'
        disabled:
          description: whether webhook is disabled
          type: boolean
          default: false
          example:
            - true
            - false
        uri:
          type: string
          example: https://hooks.app.com/services/1
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
        selector:
          description: Labels to filter for tests and test suites
          type: string
        payloadObjectField:
          description: will load the generated payload for notification inside the object
          type: string
        payloadTemplate:
          description: golang based template for notification payload
          type: string
        payloadTemplateReference:
          description: name of the template resource
          type: string
        headers:
          description: webhook headers (golang template supported)
          type: object
          additionalProperties:
            type: string
          example:
            Content-Type: application/xml
        config:
          $ref: '#/components/schemas/WebhookConfig'
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/WebhookParameterSchema'
        webhookTemplateRef:
          $ref: '#/components/schemas/WebhookTemplateRef'
        sync:
          $ref: '#/components/schemas/Syncable'
      required:
        - name
    WebhookConfig:
      description: configuration values
      type: object
      additionalProperties:
        $ref: '#/components/schemas/WebhookConfigValue'
    WebhookConfigValue:
      description: configuration value
      type: object
      properties:
        value:
          $ref: '#/components/schemas/BoxedString'
          description: public value to use in webhook template
        secret:
          $ref: '#/components/schemas/SecretRef'
          description: private value stored in secret to use in webhook template
    WebhookCreateRequest:
      description: webhook create request body
      type: object
      allOf:
        - $ref: '#/components/schemas/Webhook'
    WebhookParameterSchema:
      description: parameter definition
      type: object
      properties:
        name:
          description: unique parameter name
          type: string
        description:
          description: description for the parameter
          type: string
        required:
          description: whether parameter is required
          type: boolean
          default: false
        example:
          description: example value for the parameter
          type: string
        default:
          $ref: '#/components/schemas/BoxedString'
        pattern:
          description: regular expression to match
          type: string
      required:
        - name
    WebhookTemplate:
      description: CRD based webhook data template
      type: object
      properties:
        name:
          type: string
          example: webhook1
        namespace:
          type: string
          example: testkube
        uri:
          type: string
          example: https://hooks.app.com/services/1
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
        selector:
          description: Labels to filter for tests and test suites
          type: string
        payloadObjectField:
          description: will load the generated payload for notification inside the object
          type: string
        payloadTemplate:
          description: golang based template for notification payload
          type: string
        payloadTemplateReference:
          description: name of the template resource
          type: string
        headers:
          description: webhook headers (golang template supported)
          type: object
          additionalProperties:
            type: string
          example:
            Content-Type: application/xml
        labels:
          description: webhook labels
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        annotations:
          description: webhook annotations
          type: object
          additionalProperties:
            type: string
          example:
            app: backend
            env: prod
        disabled:
          description: whether webhook is disabled
          type: boolean
          default: false
          example:
            - true
            - false
        config:
          $ref: '#/components/schemas/WebhookConfig'
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/WebhookParameterSchema'
        sync:
          $ref: '#/components/schemas/Syncable'
      required:
        - name
    WebhookTemplateCreateRequest:
      description: webhook template create request body
      type: object
      allOf:
        - $ref: '#/components/schemas/WebhookTemplate'
    WebhookTemplateRef:
      type: object
      properties:
        name:
          description: webhook template name to use
          type: string
      required:
        - name
    WebhookTemplateUpdateRequest:
      description: webhook template update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/WebhookTemplate'
    WebhookUpdateRequest:
      description: webhook update request body
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Webhook'
    WeightedPodAffinityTerm:
      type: object
      properties:
        weight:
          type: integer
        podAffinityTerm:
          $ref: '#/components/schemas/PodAffinityTerm'
      required:
        - podAffinityTerm
    WindowsSecurityContextOptions:
      type: object
      properties:
        gmsaCredentialSpecName:
          $ref: '#/components/schemas/BoxedString'
        gmsaCredentialSpec:
          $ref: '#/components/schemas/BoxedString'
        runAsUserName:
          $ref: '#/components/schemas/BoxedString'
        hostProcess:
          $ref: '#/components/schemas/BoxedBoolean'
  responses:
    AlreadyJoinedOrganization:
      description: Already joined organization
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/JoinOrganization'
    ApiInfo:
      description: successful operation for organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiInfo'
    ApplicationAuditLogKeymap:
      description: successful operation for listing application audit logs keymap
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApplicationAuditLogKeymap'
    ArtifactURL:
      description: successful operation for artifact url
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ArtifactURL'
    AuditLogSubjectFilterValues:
      description: successful operation for listing distinct audit log subjects
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuditLogDistinctSubjects'
    BadRequestError:
      description: 400 Bad Request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Conflict:
      description: 409 Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Credential:
      description: successful operation for credential
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Credential'
    Environment:
      description: successful operation for environment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Environment'
    EnvironmentDurationStats:
      description: successful operation for environment duration stats
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvironmentDurationStats'
    EnvironmentExecutionStats:
      description: successful operation for environment execution stats
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvironmentExecutionStats'
    EnvironmentFeatures:
      description: Role Features
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvironmentFeatures'
    EnvironmentMembers:
      description: successful operation for environment members
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvironmentMembers'
    EnvironmentWorkflowSummaries:
      description: successful operation for environment workflow summary
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnvironmentWorkflowSummaries'
    Environments:
      description: successful operation for environment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Environments'
    ExecutionRefs:
      description: List of references to executions of either Test, TestSuite or Workflows
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExecutionRefs'
    ExportedApplicationAuditLog:
      description: successful operation for application audit log export
      headers:
        Content-Disposition:
          description: The filename of the exported file
          required: true
          schema:
            type: string
      content:
        application/octet-stream:
          schema:
            type: string
            format: binary
    Features:
      description: Global Testkube Pro/Enterprise features
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Features'
    ForbiddenError:
      description: 403 Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    GoneError:
      description: 410 Gone
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    HubspotVisitorSession:
      description: hubspot visitor's session data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HubspotVisitorSession'
    Incidents:
      description: list of incidents
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Incidents'
    InternalServerError:
      description: 500 Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    JUnitReports:
      description: JUnit test reports
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/JUnitReport'
    JoinOrganization:
      description: Join organization response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JoinOrganization'
    Labels:
      description: successful operation for labels
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Labels'
    License:
      description: License info
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/License'
    Logs:
      description: successful operation for listing logs
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Logs'
    LogsSearchKeywords:
      description: successful operation for listing logs search keywords
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LogsSearchKeywords'
    Member:
      description: successful operation for member operations
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Member'
    MemberPermissionsResponse:
      description: A list of permissions
      content:
        application/json:
          schema:
            type: array
            items:
              type: object
              properties:
                name:
                  type: string
                  example: namespace
                slug:
                  type: string
                  example: slug
                type:
                  type: string
                  example: environment
                role:
                  type: string
                  example: admin
                reason:
                  type: object
                  properties:
                    type:
                      type: string
                      example: Team
                    name:
                      type: string
                      example: team X
    Members:
      description: successful operation for organization members
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Members'
    MethodNotAllowedError:
      description: 405 Method Not Allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NoBody:
      description: Empty body response
    NoContent:
      description: No content after resource created
    NotFoundError:
      description: 404 Not Found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Organization:
      description: successful operation for organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Organization'
    OrganizationEnvironmentsVersions:
      description: successful operation for organization usage
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OrganizationEnvironmentsVersions'
    OrganizationLimits:
      description: successful operation for organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlanLimits'
    OrganizationPaymentInvoiceDetails:
      description: Invoice details
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InvoiceDetails'
    OrganizationUsage:
      description: successful operation for organization usage
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OrganizationUsage'
    Organizations:
      description: successful operation for organizations
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Organizations'
    PaginatedApplicationAuditLog:
      description: successful operation for listing application audit logs
      content:
        application/json:
          schema:
            type: object
            properties:
              items:
                $ref: '#/components/schemas/ApplicationAuditLog'
              pageSize:
                description: Number of returned audit events per page
                type: integer
              pageIndex:
                description: Current page index
                type: integer
              totalPages:
                description: Total number of pages
                type: integer
              totalItems:
                description: Total number of audit events
                type: integer
            required:
              - items
              - pageSize
              - pageIndex
              - totalPages
              - totalItems
    PaymentRequiredError:
      description: 402 Payment Required
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RoleFeatures:
      description: Role Features
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RoleFeatures'
    Setting:
      description: Setting for organization/environment/user
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Setting'
    Settings:
      description: Settings for organization/environment/user
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Settings'
    SlugAvailability:
      description: Generic response which indicates success.
      content:
        application/json:
          schema:
            type: object
            properties:
              available:
                description: Whether the slug is still available.
                type: boolean
            required:
              - available
    StatusPages:
      description: list of status pages
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StatusPages'
    StripeCheckoutSession:
      description: Emails list used for payment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StripeCheckoutSession'
    StripePortalSession:
      description: Emails list used for payment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StripePortalSession'
    TimeSeriesData:
      description: successful operation for insight
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TimeSeriesData'
    Token:
      description: successful operation for creating token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Token'
    Tokens:
      description: successful operation for tokens
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Tokens'
    TooManyRequests:
      description: 429 Too Many Requests
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    UnauthorizedError:
      description: 401 Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    View:
      description: successful operation for view
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/View'
    Views:
      description: successful operation for views
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Views'
  parameters:
    AIAssistantID:
      name: assistantId
      in: path
      description: Unique identifier of the AI assistant
      required: true
      schema:
        type: string
    AIMCPServerID:
      name: serverId
      in: path
      description: Unique identifier of the MCP server
      required: true
      schema:
        type: string
    AIMCPServerToolID:
      name: toolId
      in: path
      description: Unique identifier of the MCP server tool
      required: true
      schema:
        type: string
    AISessionID:
      name: sessionId
      in: path
      description: Unique identifier of the assistant session
      required: true
      schema:
        type: string
    AIToolCallID:
      name: toolCallId
      in: path
      description: Unique identifier of the tool call
      required: true
      schema:
        type: string
    ActorName:
      name: actorName
      in: query
      schema:
        description: Test workflow running conntext actor name
        type: string
    ActorType:
      name: actorType
      in: query
      schema:
        description: Test workflow running conntext actor type
        type: string
    AgentCapabilityQP:
      name: capability
      in: query
      description: filter resources by agent capability
      schema:
        $ref: '#/components/schemas/AgentCapability'
    AgentName:
      name: agentID
      in: path
      description: The identifier of the agent
      required: true
      schema:
        type: string
    Aggregate:
      name: aggregate
      in: query
      description: The aggregation to perform on the time series bucket.
      required: true
      schema:
        type: string
      example: sum
    All:
      name: all
      in: query
      description: flag to request all resources
      schema:
        type: boolean
        default: false
    ArtifactID:
      name: artifactID
      in: path
      description: unique id of the artifact
      required: true
      schema:
        type: string
    BoardID:
      name: boardID
      in: path
      description: The identifier of this board
      required: true
      schema:
        type: string
    BucketSize:
      name: bucketSize
      in: query
      description: bucketSize in seconds to count concurrent runners in
      schema:
        type: integer
      example: 1
    ConcurrencyLevel:
      name: concurrency
      in: query
      schema:
        type: integer
        default: 10
    CredentialName:
      name: credentialName
      in: path
      description: The identifier of the credential
      required: true
      schema:
        type: string
    DateTime:
      name: date
      in: query
      description: date in RFC3339 format, i.e. "2006-01-02T15:04:05Z"
      schema:
        type: string
        format: date-time
      example: '2006-01-02T15:04:05Z'
    EndDateFilter:
      name: endDate
      in: query
      description: endDate for filtering
      schema:
        type: string
        format: date
    EndDateTime:
      name: endDate
      in: query
      description: endDate for filtering in RFC3339 format, i.e. "2006-01-02T15:04:05Z"
      schema:
        type: string
        format: date-time
      example: '2006-01-02T15:04:05Z'
    Environment:
      name: env
      in: query
      description: env filters the data according to environments.
      schema:
        type: string
    EnvironmentID:
      name: environmentID
      in: path
      description: unique id of the environment
      required: true
      schema:
        type: string
    EnvironmentIDQP:
      name: environmentId
      in: query
      description: filter by environment id
      schema:
        type: string
    EventType:
      name: event
      in: query
      description: filter by event type in audit logs
      schema:
        type: string
    ExecutionID:
      name: executionID
      in: path
      description: unique id of the test execution
      required: true
      schema:
        type: string
    ExecutionSelector:
      name: executionSelector
      in: query
      schema:
        description: Execution Labels to add to executions
        type: string
    ExecutionsStatusFilter:
      name: status
      in: query
      description: optional status filter containing multiple values separated by comma
      schema:
        $ref: '#/components/schemas/ExecutionStatus'
    ExportFormat:
      name: format
      in: query
      description: specify the format of the exported report
      required: true
      schema:
        type: string
      example: csv
    Filename:
      name: filename
      in: path
      description: filename of the object usually used for artifacts
      required: true
      schema:
        type: string
    Fill:
      name: fill
      in: query
      description: fill missing buckets in the time series
      schema:
        type: boolean
    Filter:
      name: f
      in: query
      description: The filter for this operation.
      required: true
      schema:
        type: string
    FilterTestsuiteName:
      name: testSuiteName
      in: query
      description: name of the testsuite
      schema:
        type: string
    ForceAgent:
      name: forceAgent
      in: query
      description: force cancellation using agent
      schema:
        type: boolean
        default: false
    GroupBy:
      name: groupBy
      in: query
      description: group by field
      schema:
        type: string
    GroupID:
      name: groupID
      in: path
      description: The identifier of this resource group
      required: true
      schema:
        type: string
    Health:
      name: health
      in: query
      description: >-
        Filter by workflow health categories (comma-separated). Options -
        perfect, excellent, good, fair, poor, critical
      schema:
        type: string
      example: excellent,good
    ID:
      name: id
      in: path
      description: unique id of the object
      required: true
      schema:
        type: string
    IncludeDeleted:
      name: includeDeleted
      in: query
      description: consider also soft-deleted records
      schema:
        type: boolean
    InlineTemplates:
      name: inline
      in: query
      description: should inline templates in the resolved workflow
      schema:
        type: boolean
        default: false
    InviteID:
      name: inviteID
      in: path
      description: unique invite ID
      required: true
      schema:
        type: string
    Kind:
      name: kind
      in: query
      description: The test definition's kind, either 'test', 'suite' or 'workflow'.
      schema:
        type: string
    LastDays:
      name: lastDays
      in: query
      description: how many last days should be filtered
      schema:
        type: integer
    LastNDays:
      name: last
      in: query
      description: last N days to show
      schema:
        type: integer
        default: 7
    LastSeconds:
      name: lastSeconds
      in: query
      description: how many last seconds should be filtered
      schema:
        type: integer
    Limit:
      name: limit
      in: query
      description: limit queries for list of resources
      schema:
        type: integer
    Mask:
      name: mask
      in: query
      schema:
        description: mask to filter files
        type: string
    Measure:
      name: measure
      in: query
      description: The y-axis to measure within the time series.
      required: true
      schema:
        type: string
      example: execution-count
    MemberEmail:
      name: memberEmail
      in: path
      description: unique email of the user
      required: true
      schema:
        type: string
    Name:
      name: name
      in: query
      description: object name to search for
      schema:
        type: string
    Namespace:
      name: namespace
      in: query
      schema:
        description: Namespace of the object
        type: string
        default: testkube
    Offset:
      name: offset
      in: query
      description: skip some items in list of resources
      schema:
        type: integer
    OptionalTestName:
      name: testName
      in: query
      description: name of the test
      schema:
        type: string
    OrganizationID:
      name: organizationID
      in: path
      description: unique id of the organization
      required: true
      schema:
        type: string
    Page:
      name: page
      in: query
      description: The desired page for this list, or the first page when absent.
      schema:
        type: integer
    PageIndex:
      name: page
      in: query
      description: the page index to start at
      schema:
        type: integer
        default: 0
    PageSize:
      name: pageSize
      in: query
      description: The desired page size for this list, or a default page size when absent.
      schema:
        type: integer
    Period:
      name: period
      in: query
      description: >-
        The period past since or before until, in seconds. This is ignored if
        both start and end timestamps are provided.
      schema:
        type: number
      example: 3600
    Query:
      name: q
      in: query
      description: The query for this operation.
      required: true
      schema:
        type: string
    Runner:
      name: runner
      in: query
      description: Filter by runner/agent ID
      schema:
        type: string
    Segment:
      name: segment
      in: query
      description: >-
        Creates a breakdown for each time series metric for the given segment
        property.
      schema:
        type: string
      example: status
    Selector:
      name: selector
      in: query
      description: >-
        Only workflow executions with given status are included in this time
        series chart.
      schema:
        type: string
      example: kubernetes.io/app=demo
    Since:
      name: since
      in: query
      description: >-
        Only show events that occurred after this date. This is a timestamp in
        RFC 3339 format.
      schema:
        type: string
        format: date-time
      example: '2006-01-02T15:04:05Z'
    SkipDeleteCRD:
      name: skipDeleteCRD
      in: query
      description: dont delete CRD
      schema:
        type: boolean
        default: false
    SkipDeleteExecutions:
      name: skipDeleteExecutions
      in: query
      description: dont delete executions
      schema:
        type: boolean
        default: false
    SkipResultCount:
      name: skipResultCount
      in: query
      description: skip result count in usage calculation
      schema:
        type: boolean
    StartDateFilter:
      name: startDate
      in: query
      description: startDate for filtering in ISO-8601 format, i.e. "yyyy-mm-dd"
      schema:
        type: string
        format: date
    StartDateTime:
      name: startDate
      in: query
      description: startDate for filtering in RFC3339 format, i.e. "2006-01-02T15:04:05Z"
      schema:
        type: string
        format: date-time
      example: '2006-01-02T15:04:05Z'
    Status:
      name: status
      in: query
      description: >-
        Only workflow executions with given status are included in this time
        series chart.
      schema:
        type: string
      example: failed
    StatusPageID:
      name: statusPageID
      in: path
      description: unique id of the status page
      required: true
      schema:
        type: string
    Subject:
      name: subject
      in: query
      description: filter by subject in audit logs
      schema:
        type: string
    TagSelector:
      name: tagSelector
      in: query
      description: Test workflow execution tags
      schema:
        type: string
    TeamID:
      name: teamID
      in: path
      description: The identifier of this team
      required: true
      schema:
        type: string
    TestExecutionName:
      name: testExecutionName
      in: query
      schema:
        description: test execution name stated the test execution
        type: string
    TestExecutionsStatusFilter:
      name: status
      in: query
      description: optional status filter containing multiple values separated by comma
      schema:
        $ref: '#/components/schemas/TestSuiteExecutionStatus'
    TestName:
      name: testName
      in: path
      description: unique id of the test
      required: true
      schema:
        type: string
    TestSuiteExecutionName:
      name: testSuiteExecutionName
      in: query
      schema:
        description: test suite execution name stated the test suite execution
        type: string
    TestSuiteName:
      name: testSuiteName
      in: path
      description: unique id of the test
      required: true
      schema:
        type: string
    TestType:
      name: testType
      in: query
      description: test type of the executor
      required: true
      schema:
        type: string
    TestWorkflowExecutionName:
      name: testWorkflowExecutionName
      in: query
      schema:
        description: test workflow execution name stated the test workflow execution
        type: string
    TestWorkflowName:
      name: testWorkflowName
      in: path
      description: name of the test workflow
      required: true
      schema:
        type: string
    TestWorkflowNames:
      name: testWorkflowNames
      in: query
      schema:
        type: array
        items:
          type: string
    TextSearch:
      name: textSearch
      in: query
      description: full-text search
      schema:
        type: string
      example: foo
    TokenID:
      name: tokenID
      in: path
      description: unique ID of the API Token
      required: true
      schema:
        type: string
    Type:
      name: type
      in: query
      description: object type
      schema:
        type: string
        default: ''
    Until:
      name: until
      in: query
      description: >-
        Only show events that occurred before this date. This is a timestamp in
        RFC 3339 format.
      schema:
        type: string
        format: date-time
      example: '2006-01-02T16:04:05Z'
    Visibility:
      name: visibility
      in: query
      description: specifies how public the incident is
      schema:
        type: string
        enum:
          - draft
          - published
          - archived
    Workflow:
      name: workflow
      in: query
      description: The workflow for which the time series should be created.
      schema:
        type: string
      example: my-workflow
    executionID:
      name: executionID
      in: path
      description: unique id of the object execution
      required: true
      schema:
        type: string
  requestBodies:
    Environment:
      description: environment details body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Environment'
      required: true
    EnvironmentFeatures:
      description: environment features body
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/EnvironmentFeature'
      required: true
    LogsSearchKeywords:
      description: Logs search keywords
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LogsSearchKeywords'
      required: true
    MemberRoleChange:
      description: environment details body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MemberRoleChange'
      required: true
    Organization:
      description: environment details body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Organization'
      required: true
    OrganizationLimits:
      description: environment details body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlanLimits'
      required: true
    Preferences:
      description: User preferences upsert
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UserPreferences'
    ServeArtifact:
      description: Serve artifact request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServeArtifact'
      required: true
    SettingUpsert:
      description: Settings upsert request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Setting'
      required: true
    StripeCheckoutSession:
      description: Stripe checkout session request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StripeCheckoutSessionRequest'
      required: true
    StripeEvent:
      description: Stripe event request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StripeEvent'
      required: true
    StripePortalSession:
      description: Stripe checkout session request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StripePortalSessionRequest'
      required: true
    Token:
      description: token body
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                description: API Token name
                type: string
                example: Organization Read-only token
              expiration:
                description: Expiration represented as duration string
                type: string
                format: duration
                example: P3D
              scopes:
                description: API token scopes
                type: array
                items:
                  $ref: '#/components/schemas/Scope'
                example:
                  - identifier: tkcorg_xxxxxxxxxx
                    resource: org
                    role: admin
            required:
              - name
      required: true
    UploadsBody:
      description: Upload files request body data
      content:
        multipart/form-data:
          schema:
            type: object
            properties:
              parentName:
                type: string
                example: test-1
              parentType:
                type: string
                enum:
                  - test
                  - execution
              filePath:
                type: string
                example: folder/file.txt
      required: true
    View:
      description: view details body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/View'
      required: true
  headers:
    link:
      schema:
        type: string
      example: >-
        <https://api.testkube.io/resource?page=3>; rel="next",
        <https://api.testkube.io/resource?page=1>; rel="previous"
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
