Canonical Issues API

The issues API from Canonical — 6 operation(s) for issues.

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/issues/{issue_id}/attach Attach test results to an issue · Add Issue Attachments #
Ask an LLM
“How do I link failing test results to a known issue?”
“Can I attach test results matching a filter to an issue instead of listing them?”
Tell an agent
Attach test results {test_results} to issue {issue_id}.
Link all test results matching {filters} to issue {issue_id}.
POST /v1/issues/{issue_id}/detach Detach test results from an issue · Remove Issue Attachments #
Ask an LLM
“Can I unlink test results that were wrongly attached to an issue?”
“How do I detach results that match a filter from an issue?”
Tell an agent
Detach test results {test_results} from issue {issue_id}.
Unlink results matching {filters} from issue {issue_id}.
POST /v1/issues/{issue_id}/attachment-rules Create an auto-attachment rule for an issue · Post Attachment Rule #
Ask an LLM
“Can new test results be attached to an issue automatically when they match certain criteria?”
“What criteria can an attachment rule match on, such as test case names or environments?”
Tell an agent
Create an attachment rule on issue {issue_id} for test cases {test_case_names}.
Auto-attach results from environments {envs} with status {statuses} to issue {issue_id}.
PATCH /v1/issues/{issue_id}/attachment-rules/{attachment_rule_id} Enable or disable an attachment rule · Patch Attachment Rule #
Ask an LLM
“Can I temporarily pause an issue's attachment rule without deleting it?”
“Is there a way to switch an attachment rule back on?”
Tell an agent
Set attachment rule {rule_id} on issue {issue_id} to enabled = {enabled}.
Disable attachment rule {rule_id} of issue {issue_id}.
DELETE /v1/issues/{issue_id}/attachment-rules/{attachment_rule_id} Delete an issue attachment rule · Delete Attachment Rule #
Ask an LLM
“How do I remove an automatic attachment rule from an issue?”
“Can I stop an issue from auto-collecting test results by deleting its rule?”
Tell an agent destructive · confirm first
Delete attachment rule {rule_id} on issue {issue_id}.
Remove rule {rule_id} from issue {issue_id}.
GET /v1/issues List tracked issues · Get Issues #
Ask an LLM
“Which known issues are being tracked against test results?”
“Can I filter issues by source, project or status?”
Tell an agent
List issues from project {project} with status {status}.
Search issues for {q}.
PUT /v1/issues Create or update an issue by URL · Create Or Update Issue #
Ask an LLM
“How do I register a bug tracker issue so test results can be linked to it?”
“Does sending an issue URL that already exists update it instead of duplicating it?”
Tell an agent
Register the issue at {url}.
Create or update the issue {url} with title {title} and status {status}.
GET /v1/issues/{issue_id} Get one issue · Get Issue #
Ask an LLM
“Where can I see a tracked issue and its attached test results?”
“Can I look up a single issue by its ID?”
Tell an agent
Show issue {issue_id}.
Get the details and attachment rules of issue {issue_id}.
PATCH /v1/issues/{issue_id} Update an issue's title, status or auto-rerun · Patch Issue #
Ask an LLM
“Can I turn on automatic reruns for tests linked to an issue?”
“How do I change the status of a tracked issue?”
Tell an agent
Set the status of issue {issue_id} to {status}.
Enable auto-rerun ({auto_rerun}) on issue {issue_id}.

Documentation

Specifications

Schemas & Data

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:canonical-issues-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-issues-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Test Observer Issues 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: Issues
paths:
  /v1/issues/{issue_id}/attach:
    post:
      tags:
      - Issues
      summary: Add Issue Attachments
      operationId: add_issue_attachments_v1_issues__issue_id__attach_post
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueAttachmentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_issue_attachment
      - change_issue_attachment_bulk
  /v1/issues/{issue_id}/detach:
    post:
      tags:
      - Issues
      summary: Remove Issue Attachments
      operationId: remove_issue_attachments_v1_issues__issue_id__detach_post
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueAttachmentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_issue_attachment
      - change_issue_attachment_bulk
  /v1/issues/{issue_id}/attachment-rules:
    post:
      tags:
      - Issues
      summary: Post Attachment Rule
      operationId: post_attachment_rule_v1_issues__issue_id__attachment_rules_post
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueTestResultAttachmentRulePostRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MinimalIssueTestResultAttachmentRuleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_attachment_rule
  /v1/issues/{issue_id}/attachment-rules/{attachment_rule_id}:
    patch:
      tags:
      - Issues
      summary: Patch Attachment Rule
      operationId: patch_attachment_rule_v1_issues__issue_id__attachment_rules__attachment_rule_id__patch
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      - name: attachment_rule_id
        in: path
        required: true
        schema:
          type: integer
          title: Attachment Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueTestResultAttachmentRulePatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MinimalIssueTestResultAttachmentRuleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_attachment_rule
    delete:
      tags:
      - Issues
      summary: Delete Attachment Rule
      operationId: delete_attachment_rule_v1_issues__issue_id__attachment_rules__attachment_rule_id__delete
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      - name: attachment_rule_id
        in: path
        required: true
        schema:
          type: integer
          title: Attachment Rule Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_attachment_rule
  /v1/issues:
    get:
      tags:
      - Issues
      summary: Get Issues
      operationId: get_issues_v1_issues_get
      parameters:
      - name: source
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/IssueSource'
          - type: 'null'
          description: Filter by issue source (e.g., github, jira, launchpad)
          title: Source
        description: Filter by issue source (e.g., github, jira, launchpad)
      - name: project
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by project name
          title: Project
        description: Filter by project name
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/IssueStatus'
          - type: 'null'
          description: Filter by issue status. Accepts multiple values
          title: Status
        description: Filter by issue status. Accepts multiple values
      - name: families
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/FamilyName'
          - type: 'null'
          description: Filter by artefact family (e.g., snap, deb, charm, image)
          title: Families
        description: Filter by artefact family (e.g., snap, deb, charm, image)
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: 'Maximum number of results to return (default: 50)'
          default: 50
          title: Limit
        description: 'Maximum number of results to return (default: 50)'
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: 'Number of results to skip for pagination (default: 0)'
          default: 0
          title: Offset
        description: 'Number of results to skip for pagination (default: 0)'
      - name: q
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Search term for issue source, project, keys, title, and status
          title: Q
        description: Search term for issue source, project, keys, title, and status
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuesGetResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_issue
    put:
      tags:
      - Issues
      summary: Create Or Update Issue
      operationId: create_or_update_issue_v1_issues_put
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssuePutRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_issue
  /v1/issues/{issue_id}:
    get:
      tags:
      - Issues
      summary: Get Issue
      operationId: get_issue_v1_issues__issue_id__get
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_issue
    patch:
      tags:
      - Issues
      summary: Patch Issue
      operationId: patch_issue_v1_issues__issue_id__patch
      parameters:
      - name: issue_id
        in: path
        required: true
        schema:
          type: integer
          title: Issue Id
      - name: title
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/IssueStatus'
          - type: 'null'
          title: Status
      - name: auto_rerun_enabled
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Auto Rerun Enabled
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssuePatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_issue
      - change_auto_rerun
components:
  schemas:
    MinimalIssueTestResultAttachmentRuleResponse:
      properties:
        id:
          type: integer
          title: Id
        enabled:
          type: boolean
          title: Enabled
        families:
          items:
            $ref: '#/components/schemas/FamilyName'
          type: array
          title: Families
        artefacts:
          items:
            type: string
          type: array
          title: Artefacts
        artefact_versions:
          items:
            type: string
          type: array
          title: Artefact Versions
        artefact_stages:
          items:
            type: string
          type: array
          title: Artefact Stages
        artefact_tracks:
          items:
            type: string
          type: array
          title: Artefact Tracks
        environment_names:
          items:
            type: string
          type: array
          title: Environment Names
        test_plans:
          items:
            type: string
          type: array
          title: Test Plans
        test_case_names:
          items:
            type: string
          type: array
          title: Test Case Names
        template_ids:
          items:
            type: string
          type: array
          title: Template Ids
        test_result_statuses:
          items:
            $ref: '#/components/schemas/TestResultStatus'
          type: array
          title: Test Result Statuses
        execution_metadata:
          $ref: '#/components/schemas/ExecutionMetadata'
      type: object
      required:
      - id
      - enabled
      - families
      - artefacts
      - artefact_versions
      - artefact_stages
      - artefact_tracks
      - environment_names
      - test_plans
      - test_case_names
      - template_ids
      - test_result_statuses
      - execution_metadata
      title: MinimalIssueTestResultAttachmentRuleResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FamilyName:
      type: string
      enum:
      - snap
      - deb
      - charm
      - image
      - solution
      title: FamilyName
    IssueStatus:
      type: string
      enum:
      - unknown
      - open
      - closed
      title: IssueStatus
    IssuePatchRequest:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        status:
          anyOf:
          - $ref: '#/components/schemas/IssueStatus'
          - type: 'null'
        auto_rerun_enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Auto Rerun Enabled
      type: object
      title: IssuePatchRequest
    IssuePutRequest:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        status:
          anyOf:
          - $ref: '#/components/schemas/IssueStatus'
          - type: 'null'
        auto_rerun_enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Auto Rerun Enabled
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
      type: object
      required:
      - url
      title: IssuePutRequest
    IssueSource:
      type: string
      enum:
      - jira
      - github
      - launchpad
      title: IssueSource
    TestResultSearchFilters:
      properties:
        families:
          items:
            $ref: '#/components/schemas/FamilyName'
          type: array
          title: Families
        artefacts:
          items:
            type: string
          type: array
          title: Artefacts
        artefact_versions:
          items:
            type: string
          type: array
          title: Artefact Versions
        artefact_stages:
          items:
            type: string
          type: array
          title: Artefact Stages
        artefact_tracks:
          items:
            type: string
          type: array
          title: Artefact Tracks
        artefact_is_archived:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Artefact Is Archived
        environments:
          items:
            type: string
          type: array
          title: Environments
        test_cases:
          items:
            type: string
          type: array
          title: Test Cases
        template_ids:
          items:
            type: string
          type: array
          title: Template Ids
        test_plans:
          items:
            type: string
          type: array
          title: Test Plans
        execution_metadata:
          $ref: '#/components/schemas/ExecutionMetadata'
        issues:
          anyOf:
          - items:
              type: integer
            type: array
          - type: string
            enum:
            - any
            - none
          title: Issues
        test_result_statuses:
          items:
            $ref: '#/components/schemas/TestResultStatus'
          type: array
          title: Test Result Statuses
        test_execution_statuses:
          items:
            $ref: '#/components/schemas/TestExecutionStatus'
          type: array
          title: Test Execution Statuses
        reviewer_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: string
            enum:
            - any
            - none
          title: Reviewer Ids
        assignee_ids:
          anyOf:
          - items:
              type: integer
            type: array
          - type: string
            enum:
            - any
            - none
          - type: 'null'
          title: Assignee Ids
          deprecated: true
        rerun_is_requested:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Rerun Is Requested
        execution_is_latest:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Execution Is Latest
        from_date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: From Date
        until_date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Until Date
        offset:
          anyOf:
          - type: integer
          - type: 'null'
          title: Offset
        limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Limit
      type: object
      title: TestResultSearchFilters
    TestResultStatus:
      type: string
      enum:
      - PASSED
      - FAILED
      - SKIPPED
      title: TestResultStatus
    IssueTestResultAttachmentRulePostRequest:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: true
        families:
          items:
            $ref: '#/components/schemas/FamilyName'
          type: array
          title: Families
        artefacts:
          items:
            type: string
          type: array
          title: Artefacts
        artefact_versions:
          items:
            type: string
          type: array
          title: Artefact Versions
        artefact_stages:
          items:
            type: string
          type: array
          title: Artefact Stages
        artefact_tracks:
          items:
            type: string
          type: array
          title: Artefact Tracks
        environment_names:
          items:
            type: string
          type: array
          title: Environment Names
        test_plans:
          items:
            type: string
          type: array
          title: Test Plans
        test_case_names:
          items:
            type: string
          type: array
          title: Test Case Names
        template_ids:
          items:
            type: string
          type: array
          title: Template Ids
        test_result_statuses:
          items:
            $ref: '#/components/schemas/TestResultStatus'
          type: array
          title: Test Result Statuses
        execution_metadata:
          $ref: '#/components/schemas/ExecutionMetadata'
      type: object
      title: IssueTestResultAttachmentRulePostRequest
    IssueTestResultAttachmentRulePatchRequest:
      properties:
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
      type: object
      title: IssueTestResultAttachmentRulePatchRequest
    ExecutionMetadata:
      additionalProperties:
        items:
          type: string
          maxLength: 200
          minLength: 1
          description: Execution Metadata Value
        type: array
      propertyNames:
        maxLength: 200
        minLength: 1
        description: Execution Metadata Category
      type: object
      title: Execution Metadata
      description: A mapping of string categories to lists of string values.
      examples:
      - charm:
        - postgresql-k8s
        - mysql-k8s
        charm:postgresql-k8s:revision:
        - '495'
    TestExecutionStatus:
      type: string
      enum:
      - NOT_STARTED
      - IN_PROGRESS
      - PASSED
      - FAILED
      - NOT_TESTED
      - ENDED_PREMATURELY
      title: TestExecutionStatus
    IssueResponse:
      properties:
        id:
          type: integer
          title: Id
        source:
          $ref: '#/components/schemas/IssueSource'
        project:
          type: string
          title: Project
        key:
          type: string
          title: Key
        title:
          type: string
          title: Title
        status:
          $ref: '#/components/schemas/IssueStatus'
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
        auto_rerun_enabled:
          type: boolean
          title: Auto Rerun Enabled
        attachment_rules:
          items:
            $ref: '#/components/schemas/MinimalIssueTestResultAttachmentRuleResponse'
          type: array
          title: Attachment Rules
      type: object
      required:
      - id
      - source
      - project
      - key
      - title
      - status
      - url
      - auto_rerun_enabled
      - attachment_rules
      title: IssueResponse
    MinimalIssueResponse:
      properties:
        id:
          type: integer
          title: Id
        source:
          $ref: '#/components/schemas/IssueSource'
        project:
          type: string
          title: Project
        key:
          type: string
          title: Key
        title:
          type: string
          title: Title
        status:
          $ref: '#/components/schemas/IssueStatus'
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        labels:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Labels
        test_executions_count:
          type: integer
          title: Test Executions Count
          default: 0
      type: object
      required:
      - id
      - source
      - project
      - key
      - title
      - status
      - url
      title: MinimalIssueResponse
    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
    IssueAttachmentRequest:
      properties:
        test_results:
          anyOf:
          - items:
              type: integer
            type: array
          - type: 'null'
          title: Test Results
        test_results_filters:
          anyOf:
          - $ref: '#/components/schemas/TestResultSearchFilters'
          - type: 'null'
        attachment_rule:
          anyOf:
          - type: integer
          - type: 'null'
          title: Attachment Rule
      type: object
      title: IssueAttachmentRequest
    IssuesGetResponse:
      properties:
        issues:
          items:
            $ref: '#/components/schemas/MinimalIssueResponse'
          type: array
          title: Issues
        count:
          type: integer
          title: Count
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
      - issues
      - count
      - limit
      - offset
      title: IssuesGetResponse