Testiny Test Cases API

Manual and automated test cases, folders, and saved queries.

OpenAPI Specification

testiny-test-cases-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Testiny Automation Test Cases API
  description: The Testiny API is the documented public REST API behind the Testiny test management platform. It exposes the same resources you work with in the Testiny app - projects, test cases (and test case folders and queries), test plans, test runs, and automated test runs and results - over a consistent REST pattern. Every entity supports single-item CRUD (GET/PUT/DELETE on /{entity}/{id}, POST to create), search via POST /{entity}/find, bulk create/update/delete via /{entity}/bulk, soft-delete/undelete, and relationship management via POST /{entity}/mapping/bulk/{otherEntities}. Test results are recorded by mapping test cases to a test run (a result status per case, with optional per-step results and attachments). All requests authenticate with an X-Api-Key header. This is a curated subset of the full schema published at https://app.testiny.io/api/v1/swagger.json (OpenAPI 3.0.4, 124 paths); consult the live schema for the complete surface. Endpoint paths and the security scheme here are grounded in that live schema; request/response bodies are modeled and simplified.
  version: 1.38.0
  contact:
    name: Testiny
    url: https://www.testiny.io
  license:
    name: Proprietary
    url: https://www.testiny.io/terms/
servers:
- url: https://app.testiny.io/api/v1
  description: Testiny API endpoint
security:
- ApiKeyAuth: []
tags:
- name: Test Cases
  description: Manual and automated test cases, folders, and saved queries.
paths:
  /testcase:
    get:
      operationId: listTestCases
      tags:
      - Test Cases
      summary: List test cases
      responses:
        '200':
          description: A list of test cases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createTestCase
      tags:
      - Test Cases
      summary: Create a test case
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestCaseInput'
      responses:
        '200':
          description: The created test case.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /testcase/find:
    post:
      operationId: findTestCases
      tags:
      - Test Cases
      summary: Find test cases
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataReadParams'
      responses:
        '200':
          description: Matching test cases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityList'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /testcase/bulk:
    post:
      operationId: bulkCreateTestCases
      tags:
      - Test Cases
      summary: Bulk create test cases
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TestCaseInput'
      responses:
        '200':
          description: The created test cases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityList'
    put:
      operationId: bulkUpdateTestCases
      tags:
      - Test Cases
      summary: Bulk update test cases
      responses:
        '200':
          description: The updated test cases.
    delete:
      operationId: bulkDeleteTestCases
      tags:
      - Test Cases
      summary: Bulk delete test cases
      responses:
        '200':
          description: Deletion result.
  /testcase/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getTestCase
      tags:
      - Test Cases
      summary: Get a test case
      responses:
        '200':
          description: The requested test case.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entity'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateTestCase
      tags:
      - Test Cases
      summary: Update a test case
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestCaseInput'
      responses:
        '200':
          description: The updated test case.
    delete:
      operationId: deleteTestCase
      tags:
      - Test Cases
      summary: Delete a test case
      responses:
        '200':
          description: Deletion result.
  /testcase/mapping/bulk/{otherEntities}:
    post:
      operationId: mapTestCases
      tags:
      - Test Cases
      summary: Add/update/remove test case mappings
      description: Add, delete, or update mappings between test cases and other entities (for example testcase:testrun). Use the op query parameter to select the operation.
      parameters:
      - $ref: '#/components/parameters/OtherEntities'
      - $ref: '#/components/parameters/MappingOp'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MappingRequest'
      responses:
        '200':
          description: Mapping result.
  /testcase/upload-attachment/{id}:
    post:
      operationId: uploadTestCaseAttachment
      tags:
      - Test Cases
      summary: Upload an attachment to a test case
      parameters:
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: The stored attachment (blob).
  /testcase-folder:
    get:
      operationId: listTestCaseFolders
      tags:
      - Test Cases
      summary: List test case folders
      responses:
        '200':
          description: A list of test case folders.
    post:
      operationId: createTestCaseFolder
      tags:
      - Test Cases
      summary: Create a test case folder
      responses:
        '200':
          description: The created folder.
  /testcase-query:
    get:
      operationId: listTestCaseQueries
      tags:
      - Test Cases
      summary: List saved test case queries
      responses:
        '200':
          description: A list of saved queries.
    post:
      operationId: createTestCaseQuery
      tags:
      - Test Cases
      summary: Create a saved test case query
      responses:
        '200':
          description: The created query.
  /export/testcase/csv:
    get:
      operationId: exportTestCasesCsv
      tags:
      - Test Cases
      summary: Export test cases as CSV
      responses:
        '200':
          description: CSV export of test cases.
          content:
            text/csv:
              schema:
                type: string
components:
  schemas:
    DataReadParams:
      type: object
      description: Query parameters for find endpoints - filtering, ordering, paging, and nested mappings. Computed columns are prefixed with $.
      additionalProperties: true
      properties:
        filter:
          type: object
          additionalProperties: true
        idsOnly:
          type: boolean
        offset:
          type: integer
        limit:
          type: integer
        order:
          type: array
          items:
            type: string
    Entity:
      type: object
      description: A generic Testiny entity envelope. Concrete fields vary by entity type.
      additionalProperties: true
      properties:
        id:
          type: integer
        project_id:
          type: integer
    TestCaseInput:
      type: object
      required:
      - project_id
      - title
      properties:
        project_id:
          type: integer
        title:
          type: string
        precondition_text:
          type: string
        steps_text:
          type: string
        expected_result_text:
          type: string
        folder_id:
          type: integer
        priority:
          type: string
    MappingRequest:
      type: object
      description: Bulk mapping payload between the primary entity and otherEntities.
      properties:
        mappings:
          type: array
          items:
            type: object
            additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    EntityList:
      type: object
      properties:
        meta:
          type: object
          additionalProperties: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/Entity'
  responses:
    Unauthorized:
      description: Missing or invalid X-Api-Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    MappingOp:
      name: op
      in: query
      required: true
      description: The mapping operation to perform.
      schema:
        type: string
        enum:
        - add
        - delete
        - update
        - add_or_update
    Id:
      name: id
      in: path
      required: true
      description: The numeric ID of the entity.
      schema:
        type: integer
    OtherEntities:
      name: otherEntities
      in: path
      required: true
      description: The mapping type in entity:entity form, for example testcase:testrun.
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key created in Testiny (Account settings / organization) with fine-grained permissions. Passed as the X-Api-Key request header. Treat the API key like a password.