Kubeshop templates API

The templates API from Kubeshop — 1 operation(s) for templates.

OpenAPI Specification

kubeshop-templates-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Testkube Standalone Agent api 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: templates
paths:
  /templates:
    get:
      tags:
      - templates
      summary: List templates
      description: List templates available in cluster
      operationId: listTemplates
      parameters:
      - $ref: '#/components/parameters/Selector'
      responses:
        200:
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Template'
            text/yaml:
              schema:
                type: string
        400:
          description: problem with input for CRD generation
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        502:
          description: problem with read information from kubernetes cluster
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
components:
  schemas:
    Template:
      description: Golang based template
      type: object
      required:
      - name
      - type
      - body
      properties:
        name:
          type: string
          description: template name for reference
          example: webhook-template
        namespace:
          type: string
          description: template namespace
          example: testkube
        type:
          $ref: '#/components/schemas/TemplateType'
        body:
          type: string
          description: template body to use
          example: '{"id": "{{ .Id }}"}'
        labels:
          type: object
          description: template labels
          additionalProperties:
            type: string
          example:
            env: prod
            app: backend
    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
    TemplateType:
      description: template type by purpose
      type: string
      enum:
      - job
      - container
      - cronjob
      - scraper
      - pvc
      - webhook
      - pod
  parameters:
    Selector:
      in: query
      name: selector
      schema:
        type: string
        description: Labels to filter by