Kubeshop Test Workflow Executions API

The Test Workflow Executions API from Kubeshop — 7 operation(s) for test workflow executions.

OpenAPI Specification

kubeshop-test-workflow-executions-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Testkube Standalone Agent api Test Workflow 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: Test Workflow Executions
paths:
  /test-workflow-executions:
    post:
      parameters:
      - $ref: '#/components/parameters/Selector'
      - $ref: '#/components/parameters/ConcurrencyLevel'
      summary: Execute test workflows
      description: Execute test workflows in the kubernetes cluster
      operationId: executeTestWorkflows
      requestBody:
        description: test workflow execution request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowExecutionRequest'
      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'
      tags:
      - Test Workflow Executions
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      - $ref: '#/components/parameters/TagSelector'
      - $ref: '#/components/parameters/ActorName'
      - $ref: '#/components/parameters/ActorType'
      summary: List test workflow executions
      description: List test workflow executions
      operationId: listTestWorkflowExecutions
      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'
      tags:
      - Test Workflow Executions
  /test-workflow-executions/{executionID}:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      summary: Get test workflow execution
      description: Get test workflow execution details
      operationId: getTestWorkflowExecution
      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'
      tags:
      - Test Workflow Executions
  /test-workflow-executions/{executionID}/artifacts:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      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'
        '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'
      tags:
      - Test Workflow Executions
  /test-workflow-executions/{executionID}/artifacts/{filename}:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      - $ref: '#/components/parameters/Filename'
      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
        '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'
      tags:
      - Test Workflow Executions
  /test-workflow-executions/{executionID}/artifact-archive:
    get:
      parameters:
      - $ref: '#/components/parameters/executionID'
      - $ref: '#/components/parameters/Mask'
      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
        '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'
      tags:
      - Test Workflow Executions
  /test-workflow-executions/{executionID}/abort:
    post:
      parameters:
      - $ref: '#/components/parameters/executionID'
      - $ref: '#/components/parameters/ForceAgent'
      summary: Abort test workflow execution
      description: Abort test workflow execution
      operationId: abortTestWorkflowExecution
      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'
      tags:
      - Test Workflow Executions
  /test-workflow-executions/{executionID}/rerun:
    post:
      parameters:
      - $ref: '#/components/parameters/executionID'
      summary: Rerun test workflow execution
      description: Rerun test workflow execution
      operationId: rerunTestWorkflowExecution
      requestBody:
        description: test workflow running context
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowRunningContext'
      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'
      tags:
      - Test Workflow Executions
components:
  schemas:
    PodDNSConfig:
      type: object
      properties:
        nameservers:
          type: array
          items:
            type: string
        searches:
          type: array
          items:
            type: string
        options:
          type: array
          items:
            $ref: '#/components/schemas/PodDNSConfigOption'
    PodResourceClaim:
      type: object
      properties:
        name:
          type: string
        source:
          $ref: '#/components/schemas/ClaimSource'
    ImagePullPolicy:
      type: string
      enum:
      - Always
      - Never
      - IfNotPresent
    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'
    TestWorkflowStatus:
      type: string
      enum:
      - queued
      - assigned
      - starting
      - scheduling
      - running
      - pausing
      - paused
      - resuming
      - passed
      - failed
      - stopping
      - aborted
      - canceled
    NodeSelector:
      type: object
      properties:
        nodeSelectorTerms:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorTerm'
    ExecAction:
      type: object
      properties:
        command:
          type: array
          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.
          items:
            type: string
    TestWorkflowCronJobConfig:
      type: object
      description: cron job configuration
      required:
      - cron
      properties:
        cron:
          type: string
          description: cron schedule to run a test workflow
          example: '* * * * *'
        labels:
          type: object
          description: labels to attach to the cron job
          additionalProperties:
            type: string
        annotations:
          type: object
          description: annotations to attach to the cron job
          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
    TestWorkflowPause:
      type: object
      properties:
        ref:
          type: string
          description: step at which it was paused
        pausedAt:
          type: string
          format: date-time
          description: when the pause has started
        resumedAt:
          type: string
          format: date-time
          description: when the pause has ended
      required:
      - ref
      - pausedAt
    ProjectedVolumeSource:
      type: object
      description: Represents a projected volume source
      properties:
        defaultMode:
          $ref: '#/components/schemas/BoxedInteger'
        sources:
          description: sources is the list of volume projections. Each entry in this list handles one source.
          items:
            description: Projection that may be projected along with other supported volume types. Exactly one of these fields must be set.
            properties:
              clusterTrustBundle:
                type: object
                description: ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file.
                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:
                type: object
                description: configMap information about the configMap data to project
                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 '..'.
                    items:
                      description: Maps a string key to a path within a volume.
                      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
                      type: object
                    type: array
                  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:
                type: object
                description: downwardAPI information about the downwardAPI data to project
                properties:
                  items:
                    description: Items is a list of DownwardAPIVolume file
                    items:
                      description: DownwardAPIVolumeFile represents information to create the file containing the pod field
                      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
                      type: object
                    type: array
              secret:
                type: object
                description: secret information about the secret data to project
                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 '..'.
                    items:
                      description: Maps a string key to a path within a volume.
                      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
                      type: object
                    type: array
                  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:
                type: object
                description: serviceAccountToken is information about the serviceAccountToken data to project
                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
            type: object
          type: array
    TestWorkflowStepParallelTransfer:
      type: object
      properties:
        from:
          type: string
          description: path to load the files from
        to:
          type: string
          description: path to save the files to
        files:
          $ref: '#/components/schemas/TestWorkflowTarballFilePattern'
        mount:
          $ref: '#/components/schemas/BoxedBoolean'
      required:
      - from
    SecretVolumeSource:
      description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
      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 '..'.
          items:
            description: Maps a string key to a path within a volume.
            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
            type: object
          type: array
        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
      type: object
    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'
        timeouts:
          $ref: '#/components/schemas/TestWorkflowTimeouts'
        pvcs:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TestWorkflowPvcConfig'
    ExecutionTarget:
      type: object
      properties:
        match:
          type: object
          description: runner labels to match
          additionalProperties:
            type: array
            items:
              type: string
        not:
          type: object
          description: runner labels to NOT match
          additionalProperties:
            type: array
            items:
              type: string
        replicate:
          type: array
          description: list of runner labels to replicate the executions
          items:
            type: string
    TestWorkflowEvent:
      type: object
      properties:
        cronjob:
          $ref: '#/components/schemas/TestWorkflowCronJobConfig'
    AzureDiskVolumeSource:
      description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
      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
      type: object
    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
    GRPCAction:
      type: object
      properties:
        port:
          type: integer
        service:
          $ref: '#/components/schemas/BoxedString'
    PodAffinity:
      type: object
      properties:
        requiredDuringSchedulingIgnoredDuringExecution:
          type: array
          items:
            $ref: '#/components/schemas/PodAffinityTerm'
        preferredDuringSchedulingIgnoredDuringExecution:
          type: array
          items:
            $ref: '#/components/schemas/WeightedPodAffinityTerm'
    Problem:
      description: problem response in case of error
      type: object
      properties:
        type:
          type: string
          description: Type contains a URI that identifies the problem type.
          example: https://kubeshop.io/testkube/problems/invalidtestname
        title:
          type: string
          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.
          example: Invalid test name
        status:
          type: integer
          description: HTTP status code for this occurrence of the problem.
          example: 500
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the problem.
          example: Your test name can't contain forbidden characters like "}}}" passed
        instance:
          type: string
          description: A URI that identifies the specific occurrence of the problem. This URI may or may not yield further information if de-referenced.
          example: http://10.23.23.123:8088/tests
    TestWorkflowServiceSpec:
      type: object
      allOf:
      - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
      - $ref: '#/components/schemas/TestWorkflowIndependentServiceSpec'
      - properties:
          use:
            type: array
            items:
              $ref: '#/components/schemas/TestWorkflowTemplateRef'
    SecurityContext:
      type: object
      properties:
        capabilities:
          $ref: '#/components/schemas/Capabilities'
        privileged:
          $ref: '#/components/schemas/BoxedBoolean'
        seLinuxOptions:
          $ref: '#/components/schemas/SELinuxOptions'
        windowsOptions:
          $ref: '#/components/schemas/WindowsSecurityContextOptions'
        runAsUser:
          $ref: '#/components/schemas/TemplatableBoxedInteger'
        runAsGroup:
          $ref: '#/components/schemas/TemplatableBoxedInteger'
        runAsNonRoot:
          $ref: '#/components/schemas/BoxedBoolean'
        readOnlyRootFilesystem:
          $ref: '#/components/schemas/BoxedBoolean'
        allowPrivilegeEscalation:
          $ref: '#/components/schemas/BoxedBoolean'
        procMount:
          $ref: '#/components/schemas/BoxedString'
        seccompProfile:
          $ref: '#/components/schemas/SeccompProfile'
        appArmorProfile:
          $ref: '#/components/schemas/AppArmorProfile'
    TestWorkflowConfigSchema:
      type: object
      description: configuration definition
      additionalProperties:
        $ref: '#/components/schemas/TestWorkflowParameterSchema'
    TestWorkflowExecutionHealth:
      type: object
      properties:
        passRate:
          type: number
          format: float64
          description: 'Recency-weighted fraction of executions that passed (value between 0.0 and 1.0).

            '
        flipRate:
          type: number
          format: float64
          description: "Fraction of status changes among consecutive executions without recency weighting \n(value between 0.0 and 1.0).\n"
        overallHealth:
          type: number
          format: float64
          description: 'Combined health score, computed as passRate * (1 - flipRate)

            (value between 0.0 and 1.0).

            '
      required:
      - passRate
      - flipRate
      - overallHealth
    TestWorkflowReport:
      type: object
      properties:
        ref:
          type: string
          description: step reference
        kind:
          type: string
          enum:
          - junit
          description: report kind/type
          example: junit
        file:
          type: string
          description: file path to full report in artifact storage
        summary:
          $ref: '#/components/schemas/TestWorkflowReportSummary'
    NodeSelectorTerm:
      type: object
      properties:
        matchExpressions:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorRequirement'
        matchFields:
          type: array
  

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