Canonical Test Cases API

The test-cases API from Canonical — 3 operation(s) for test-cases.

Operations 5

GET /v1/test-cases/reported-issues Get Reported Issues #
POST /v1/test-cases/reported-issues Create Reported Issue #
PUT /v1/test-cases/reported-issues/{issue_id} Update Reported Issue #
DELETE /v1/test-cases/reported-issues/{issue_id} Delete Reported Issue #
GET /v1/test-cases Get Test Cases #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/canonical-test-cases-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

canonical-test-cases-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Test Observer Test Cases API
  description: Test Observer API (see https://github.com/canonical/test_observer)
  license:
    name: GNU Affero General Public License v3
    url: https://raw.githubusercontent.com/canonical/test_observer/refs/heads/main/backend/LICENSE
  version: 0.1.0
tags:
- name: Test Cases
paths:
  /v1/test-cases/reported-issues:
    get:
      tags:
      - Test Cases
      summary: Get Reported Issues
      operationId: get_reported_issues_v1_test_cases_reported_issues_get
      parameters:
      - name: template_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Template Id
      - name: case_name
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Case Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestReportedIssueResponse'
                title: Response Get Reported Issues V1 Test Cases Reported Issues Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_test_case_reported_issue
    post:
      tags:
      - Test Cases
      summary: Create Reported Issue
      operationId: create_reported_issue_v1_test_cases_reported_issues_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestReportedIssueRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestReportedIssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_test_case_reported_issue
  /v1/test-cases/reported-issues/{issue_id}:
    put:
      tags:
      - Test Cases
      summary: Update Reported Issue
      operationId: update_reported_issue_v1_test_cases_reported_issues__issue_id__put
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestReportedIssueRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestReportedIssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_test_case_reported_issue
    delete:
      tags:
      - Test Cases
      summary: Delete Reported Issue
      operationId: delete_reported_issue_v1_test_cases_reported_issues__issue_id__delete
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_test_case_reported_issue
  /v1/test-cases:
    get:
      tags:
      - Test Cases
      summary: Get Test Cases
      description: 'Returns test cases as a flat list with their template IDs.


        Template ID represents the generic test (e.g., "disk/stats_name")

        Test case name is the specific instance (e.g., "disk/stats_nvme0n1")

        Multiple test cases can share the same template ID but have different names.'
      operationId: get_test_cases_v1_test_cases_get
      parameters:
      - name: q
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Search term for test case names
          title: Q
        description: Search term for test case names
      - name: families
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/FamilyName'
          - type: 'null'
          description: Filter by artefact families
          title: Families
        description: Filter by artefact families
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: Maximum number of results (defaults to 50 if not specified)
          default: 50
          title: Limit
        description: Maximum number of results (defaults to 50 if not specified)
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Number of results to skip for pagination
          default: 0
          title: Offset
        description: Number of results to skip for pagination
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestCasesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_test
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TestCasesResponse:
      properties:
        test_cases:
          items:
            $ref: '#/components/schemas/TestCaseInfo'
          type: array
          title: Test Cases
      type: object
      required:
      - test_cases
      title: TestCasesResponse
    FamilyName:
      type: string
      enum:
      - snap
      - deb
      - charm
      - image
      - solution
      title: FamilyName
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    TestReportedIssueResponse:
      properties:
        id:
          type: integer
          title: Id
        template_id:
          type: string
          title: Template Id
          default: ''
        case_name:
          type: string
          title: Case Name
          default: ''
        description:
          type: string
          title: Description
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
      - id
      - description
      - url
      - created_at
      - updated_at
      title: TestReportedIssueResponse
    TestReportedIssueRequest:
      properties:
        template_id:
          type: string
          title: Template Id
          default: ''
        case_name:
          type: string
          title: Case Name
          default: ''
        description:
          type: string
          title: Description
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
      type: object
      required:
      - description
      - url
      title: TestReportedIssueRequest
    TestCaseInfo:
      properties:
        test_case:
          type: string
          title: Test Case
        template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Template Id
      type: object
      required:
      - test_case
      - template_id
      title: TestCaseInfo