Kubeshop repository API

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

OpenAPI Specification

kubeshop-repository-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Testkube Standalone Agent api repository 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: repository
paths:
  /repositories:
    post:
      tags:
      - repository
      summary: Validate new repository
      description: Validate new repository based on variables passed in request
      operationId: validateRepository
      requestBody:
        description: repository request body data
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Repository'
      responses:
        204:
          description: no content
        400:
          description: problem with repository definition - probably some bad input occurs (invalid JSON body or similar)
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        500:
          description: problem with creating folder for partial git checkout
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
        502:
          description: problem with communicating with kubernetes cluster or git server
          content:
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Problem'
components:
  schemas:
    Repository:
      description: repository representation for tests in git repositories
      type: object
      required:
      - type
      - uri
      properties:
        type:
          type: string
          enum:
          - git
          description: VCS repository type
        uri:
          type: string
          description: uri of content file or git directory
          example: https://github.com/kubeshop/testkube
        branch:
          type: string
          description: branch/tag name for checkout
          example: main
        commit:
          type: string
          description: commit id (sha) for checkout
          example: b928cbb7186944ab9275937ec1ac3d3738ca2e1d
        path:
          type: string
          description: if needed we can checkout particular path (dir or file) in case of BIG/mono repositories
          example: test/perf
        username:
          type: string
          description: git auth username for private repositories
        token:
          type: string
          description: git auth token for private repositories
        usernameSecret:
          $ref: '#/components/schemas/SecretRef'
        tokenSecret:
          $ref: '#/components/schemas/SecretRef'
        certificateSecret:
          type: string
          description: secret with certificate for private repositories. Should contain one key ending with .crt such as "mycorp.crt", whose value is the certificate file content, suitable for git config http.sslCAInfo
        workingDir:
          type: string
          description: if provided we checkout the whole repository and run test from this directory
          example: /
        authType:
          type: string
          enum:
          - basic
          - header
          description: auth type for git requests
    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
    SecretRef:
      required:
      - name
      - key
      type: object
      description: Testkube internal reference for secret storage in Kubernetes secrets
      properties:
        namespace:
          type: string
          description: object kubernetes namespace
        name:
          type: string
          description: object name
        key:
          type: string
          description: object key