Kubeshop Executions API

The Executions API from Kubeshop — 19 operation(s) for executions.

OpenAPI Specification

kubeshop-executions-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Testkube Standalone Agent api Executions API
  description: API for Testkube Standalone Agent
  contact:
    email: info@testkube.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  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
tags:
- name: Executions
paths:
  /executions:
    post:
      parameters:
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/ExecutionSelector'
      - $ref: '#/components/parameters/ConcurrencyLevel'
      summary: Starts new test executions
      description: New test executions returns new executions details on successful executions start
      operationId: executeTests
      requestBody:
        description: body passed to configure executions
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecutionRequest'
      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'
      tags:
      - 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'
      tags:
      - Executions
  /executions/{executionID}:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      summary: Get test execution by ID
      description: Returns execution with given executionID
      operationId: getExecutionByID
      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'
      tags:
      - Executions
  /executions/{id}/artifacts:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      summary: Get execution's artifacts by ID
      description: Returns artifacts of the given executionID
      operationId: getExecutionArtifacts
      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'
      tags:
      - Executions
  /executions/{id}/logs:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      summary: Get execution's logs by ID
      description: Returns logs of the given executionID
      operationId: getExecutionLogs
      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'
      tags:
      - Executions
  /executions/{id}/logs/v2:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      summary: Get execution's logs by ID version 2
      description: Returns logs of the given executionID version 2
      operationId: getExecutionLogsV2
      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'
      tags:
      - Executions
  /executions/{id}/artifacts/{filename}:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/Filename'
      summary: Download artifact
      description: Download the artifact file from the given execution
      operationId: downloadFile
      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'
      tags:
      - Executions
  /executions/{id}/artifact-archive:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/Mask'
      summary: Download artifact archive
      description: Download the artifact archive from the given execution
      operationId: downloadArchive
      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'
      tags:
      - Executions
  /test-suites/{id}/executions:
    post:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/LastNDays'
      - $ref: '#/components/parameters/TestSuiteExecutionName'
      tags:
      - Executions
      summary: Starts new test suite execution
      description: New test suite execution returns new execution details on successful execution start
      operationId: executeTestSuite
      requestBody:
        description: body passed to configure execution
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestSuiteExecutionRequest'
      responses:
        201:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSuiteExecutionsResult'
        400:
          description: problem with request body
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        404:
          description: test suite not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: problem with test suite execution
          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'
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageIndex'
      - $ref: '#/components/parameters/TestExecutionsStatusFilter'
      - $ref: '#/components/parameters/StartDateFilter'
      - $ref: '#/components/parameters/EndDateFilter'
      tags:
      - Executions
      summary: Get all test suite executions
      description: Returns array of all available test suite executions
      operationId: listTestSuiteExecutions
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSuiteExecutionsResult'
        500:
          description: problem with getting test suite executions from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
  /test-suites/{id}/executions/{executionID}:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Get test suite execution
      description: Returns test suite execution with given executionID
      operationId: getTestSuiteExecution
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSuiteExecution'
        404:
          description: test not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: problem with getting test suite executions from storage
          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:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Aborts testsuite execution
      description: Aborts testsuite execution with given executionID
      operationId: abortTestSuiteExecution
      responses:
        204:
          description: no content
        404:
          description: test suite not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: problem with read information from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
  /test-suites/{id}/executions/{executionID}/artifacts:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Get test suite execution artifacts
      description: Returns test suite execution artifacts with given executionID
      operationId: getTestSuiteExecutionArtifactsByTestsuite
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Artifact'
        404:
          description: test suite not found
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: problem with getting test suite executions from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
  /test-suite-executions:
    post:
      parameters:
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/ConcurrencyLevel'
      tags:
      - Executions
      summary: Starts new test suite executions
      description: New test suite executions returns new executions details on successful executions start
      operationId: executeTestSuites
      requestBody:
        description: body passed to configure executions
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestSuiteExecutionRequest'
      responses:
        201:
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestSuiteExecutionsResult'
        400:
          description: problem with request body
          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'
        500:
          description: problem with test suites executions
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    get:
      tags:
      - Executions
      summary: Get all test suite executions
      description: Returns array of test suite executions
      operationId: listAllTestSuiteExecutions
      parameters:
      - $ref: '#/components/parameters/LastNDays'
      - $ref: '#/components/parameters/TestName'
      - $ref: '#/components/parameters/TextSearch'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageIndex'
      - $ref: '#/components/parameters/TestExecutionsStatusFilter'
      - $ref: '#/components/parameters/StartDateFilter'
      - $ref: '#/components/parameters/EndDateFilter'
      - $ref: '#/components/parameters/Selector'
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSuiteExecutionsResult'
        500:
          description: problem with getting test suite executions from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
  /test-suite-executions/{executionID}:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      - $ref: '#/components/parameters/LastNDays'
      tags:
      - Executions
      summary: Get test suite execution by ID
      description: Returns test suite execution with given executionID
      operationId: getTestSuiteExecutionByID
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSuiteExecution'
        500:
          description: problem with getting test suite execution from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    patch:
      parameters:
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Aborts testsuite execution
      description: Aborts testsuite execution with given executionID
      operationId: abortTestSuiteExecutionByID
      responses:
        502:
          description: problem with read information from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        204:
          description: no content
  /test-suite-executions/{executionID}/artifacts:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Get test suite execution artifacts
      description: Returns test suite execution artifacts with given executionID
      operationId: getTestSuiteExecutionArtifacts
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Artifact'
        500:
          description: problem with getting test suite executions from storage
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
  /tests/{id}/executions:
    post:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/TestExecutionName'
      tags:
      - Executions
      summary: Starts new test execution
      description: New test execution returns new execution details on successful execution start
      operationId: executeTest
      requestBody:
        description: body passed to configure execution
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecutionRequest'
      responses:
        201:
          description: successful operation
          content:
            application/json:
              schema:
                $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'
        502:
          description: problem with communicating with kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: problem with test execution
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/LastNDays'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageIndex'
      - $ref: '#/components/parameters/ExecutionsStatusFilter'
      - $ref: '#/components/parameters/StartDateFilter'
      - $ref: '#/components/parameters/EndDateFilter'
      tags:
      - Executions
      summary: Get all test executions
      description: Returns array of all available test executions
      operationId: listTestExecutions
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionsResult'
        404:
          description: test or 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'
  /tests/{id}/executions/{executionID}:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Get test execution
      description: Returns execution with given executionID
      operationId: getTestExecution
      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'
    patch:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Aborts execution
      description: Aborts execution with given executionID
      operationId: abortExecution
      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'
  /uploads:
    post:
      tags:
      - Executions
      summary: Upload file
      description: Upload file to be used in executions and tests
      operationId: uploads
      requestBody:
        $ref: '#/components/requestBodies/UploadsBody'
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                type: string
            text/yaml:
              schema:
                type: string
        400:
          description: problem with the input
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: could not upload file
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
  /test-workflow-executions/{executionID}/artifacts:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      tags:
      - Executions
      summary: Get test workflow execution's artifacts by ID
      description: Returns artifacts of the given executionID
      operationId: getTestWorkflowExecutionArtifacts
      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'
        402:
          description: missing Pro subscription for a commercial feature
          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'
  /test-workflow-executions/{executionID}/artifacts/{filename}:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      - $ref: '#/components/parameters/Filename'
      tags:
      - Executions
      summary: Download test workflow artifact
      description: Download the artifact file from the given execution
      operationId: downloadTestWorkflowArtifact
      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'
        402:
          description: missing Pro subscription for a commercial feature
          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'
  /test-workflow-executions/{executionID}/artifact-archive:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      - $ref: '#/components/parameters/Mask'
      tags:
      - Executions
      summary: Download test workflow artifact archive
      description: Download the artifact archive from the given execution
      operationId: downloadTestWorkflowArtifactArchive
      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'
        402:
          description: missing Pro subscription for a commercial feature
          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'
components:
  schemas:
    RunningContext:
      description: running context for test or test suite execution
      type: object
      required:
      - type
      properties:
        type:
          type: string
          description: One of possible context types
          enum:
          - userCLI
          - userUI
          - testsuite
          - testtrigger
          - scheduler
          - testworkflow
        context:
          type: string
          description: Context value depending from its type
    Artifact:
      type: object
      description: API server artifact
      properties:
        name:
          type: string
          description: artifact file path
        size:
          type: integer
          description: file size in bytes
        executionName:
          type: string
          description: execution name that produced the artifact
          example: test-1
        status:
          type: string
          enum:
          - ready
          - processing
          - failed
    TestSuiteStepExecutionSummary:
      description: Test suite execution summary
      type: object
      required:
      - id
      - name
      - status
      properties:
        id:
          type: string
          example: 62f395e004109

# --- truncated at 32 KB (81 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kubeshop/refs/heads/main/openapi/kubeshop-executions-api-openapi.yml