Kubeshop Test Workflow Templates API

The Test Workflow Templates API from Kubeshop — 2 operation(s) for test workflow templates.

OpenAPI Specification

kubeshop-test-workflow-templates-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Testkube Standalone Agent api Test Workflow Templates 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 Templates
paths:
  /test-workflow-templates:
    get:
      parameters:
      - $ref: '#/components/parameters/Selector'
      summary: List test workflow templates
      description: List test workflow templates from the kubernetes cluster
      operationId: listTestWorkflowTemplates
      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'
      tags:
      - Test Workflow Templates
    delete:
      parameters:
      - $ref: '#/components/parameters/Selector'
      summary: Delete test workflow templates
      description: Delete test workflow templates from the kubernetes cluster
      operationId: deleteTestWorkflowTemplates
      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 Templates
    post:
      summary: Create test workflow template
      description: Create test workflow template in the kubernetes cluster
      operationId: createTestWorkflowTemplate
      requestBody:
        description: test workflow template body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowTemplate'
          text/yaml:
            schema:
              type: string
      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'
      tags:
      - Test Workflow Templates
    put:
      summary: Validate test workflow template
      description: Validate test workflow template specification against CRD schema
      operationId: validateTestWorkflowTemplate
      requestBody:
        description: test workflow template body
        required: true
        content:
          text/yaml:
            schema:
              type: string
      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'
      tags:
      - Test Workflow Templates
  /test-workflow-templates/{id}:
    get:
      parameters:
      - $ref: '#/components/parameters/ID'
      summary: Get test workflow template details
      description: Get test workflow template details from the kubernetes cluster
      operationId: getTestWorkflowTemplate
      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'
      tags:
      - Test Workflow Templates
    put:
      parameters:
      - $ref: '#/components/parameters/ID'
      summary: Update test workflow template details
      description: Update test workflow template details in the kubernetes cluster
      operationId: updateTestWorkflowTemplate
      requestBody:
        description: test workflow template body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestWorkflowTemplate'
          text/yaml:
            schema:
              type: string
      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'
      tags:
      - Test Workflow Templates
    delete:
      parameters:
      - $ref: '#/components/parameters/ID'
      summary: Delete test workflow template
      description: Delete test workflow template from the kubernetes cluster
      operationId: deleteTestWorkflowTemplate
      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'
      tags:
      - Test Workflow Templates
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
    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
    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
    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
    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'
    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'
    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
    NodeSelectorTerm:
      type: object
      properties:
        matchExpressions:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorRequirement'
        matchFields:
          type: array
          items:
            $ref: '#/components/schemas/NodeSelectorRequirement'
    PodDNSConfigOption:
      type: object
      properties:
        name:
          type: string
        value:
          $ref: '#/components/schemas/BoxedString'
    EnvReference:
      description: Reference to env resource
      type: object
      required:
      - reference
      properties:
        reference:
          $ref: '#/components/schemas/LocalObjectReference'
        mount:
          type: boolean
          description: whether we shoud mount resource
          example: /etc/data
        mountPath:
          type: string
          description: where we shoud mount resource
        mapToVariables:
          type: boolean
          description: whether we shoud map to variables from resource
          default: false
    ResourceFieldRef:
      type: object
      required:
      - resource
      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.'
      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
    TestWorkflowIndependentStepParallel:
      type: object
      allOf:
      - $ref: '#/components/schemas/TestWorkflowTemplateSpec'
      - $ref: '#/components/schemas/TestWorkflowStepExecuteStrategy'
      - $ref: '#/components/schemas/TestWorkflowStepControl'
      - $ref: '#/components/schemas/TestWorkflowStepOperations'
      - properties:
          parallelism:
            type: integer
            description: how many resources could be scheduled in parallel
          failFast:
            type: boolean
            description: abort remaining parallel workers on first failure
          description:
            type: string
            description: worker description to display
          logs:
            $ref: '#/components/schemas/BoxedString'
          transfer:
            type: array
            description: list of files to send to parallel steps
            items:
              $ref: '#/components/schemas/TestWorkflowStepParallelTransfer'
          fetch:
            type: array
            description: list of files to fetch from parallel steps
            items:
              $ref: '#/components/schemas/TestWorkflowStepParallelFetch'
    EnvVarSource:
      type: object
      description: EnvVarSource represents a source for the value of an EnvVar.
      properties:
        configMapKeyRef:
          type: object
          required:
          - key
          description: Selects a key of a ConfigMap.
          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:
              nullable: true
              description: Specify whether the ConfigMap or its key must be defined
              type: boolean
        fieldRef:
          $ref: '#/components/schemas/FieldRef'
        resourceFieldRef:
          $ref: '#/components/schemas/ResourceFieldRef'
        secretKeyRef:
          type: object
          required:
          - key
          description: Selects a key of a secret in the pod's namespace
          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:
              nullable: true
              description: Specify whether the Secret or its key must be defined
              type: boolean
    LabelSelector:
      type: object
      properties:
        matchLabels:
          type: object
          additionalProperties:
            type: string
        matchExpressions:
          type: array
          items:
            $ref: '#/components/schemas/LabelSelectorRequirement'
    VariableType:
      type: string
      enum:
      - basic
      - secret
    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'
      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).'
          format: int32
          type: integer
        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
      type: object
    PodSchedulingGate:
      type: object
      properties:
        name:
          type: string
    PreferredSchedulingTerm:
      type: object
      properties:
        weight:
          type: integer
        preference:
          $ref: '#/components/schemas/NodeSelectorTerm'
      required:
      - preference
    CSIVolumeSource:
      type: object
      description: Represents a so

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