Canonical Teams API

The teams API from Canonical — 3 operation(s) for teams.

Operations 6

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

GET /v1/teams List teams · Get Teams #
Ask an LLM
“Which teams are set up in Test Observer?”
“What teams exist and what permissions do they have?”
Tell an agent
List all teams.
Show every team with its permissions.
POST /v1/teams Create a team · Create Team #
Ask an LLM
“How do I create a new review team?”
“Can a team be given artefact matching rules when it is created?”
Tell an agent
Create team {name}.
Create team {name} with permissions {permissions}.
GET /v1/teams/{team_id} Get a team · Get Team #
Ask an LLM
“Who is on a particular team and what can they do?”
“Which artefacts does a given team match?”
Tell an agent
Show team {team_id}.
Get the members and permissions of team {team_id}.
PATCH /v1/teams/{team_id} Update a team's permissions or matching rules · Update Team #
Ask an LLM
“Can I change the permissions of an existing team?”
“How do I update which artefacts a team is responsible for?”
Tell an agent
Set team {team_id} permissions to {permissions}.
Update artefact matching rules of team {team_id} to {rules}.
POST /v1/teams/{team_id}/members/{user_id} Add a user to a team · Add Team Member #
Ask an LLM
“How do I add a reviewer to a team?”
“Can a user belong to more than one team?”
Tell an agent
Add user {user_id} to team {team_id}.
Make {user_id} a member of team {team_id}.
DELETE /v1/teams/{team_id}/members/{user_id} Remove a user from a team · Remove Team Member #
Ask an LLM
“How do I take someone off a team?”
“Does removing a member from a team delete the user account?”
Tell an agent destructive · confirm first
Remove user {user_id} from team {team_id}.
Drop {user_id} from team {team_id} membership.

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:canonical-teams-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-teams-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Test Observer Teams 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: Teams
paths:
  /v1/teams:
    get:
      tags:
      - Teams
      summary: Get Teams
      operationId: get_teams_v1_teams_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TeamResponse'
                type: array
                title: Response Get Teams V1 Teams Get
      x-permissions:
      - view_team
    post:
      tags:
      - Teams
      summary: Create Team
      description: Create a new team
      operationId: create_team_v1_teams_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_team
  /v1/teams/{team_id}:
    get:
      tags:
      - Teams
      summary: Get Team
      operationId: get_team_v1_teams__team_id__get
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
          title: Team Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_team
    patch:
      tags:
      - Teams
      summary: Update Team
      operationId: update_team_v1_teams__team_id__patch
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
          title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_team
  /v1/teams/{team_id}/members/{user_id}:
    post:
      tags:
      - Teams
      summary: Add Team Member
      description: Add a user to a team
      operationId: add_team_member_v1_teams__team_id__members__user_id__post
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
          title: Team Id
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_team
    delete:
      tags:
      - Teams
      summary: Remove Team Member
      description: Remove a user from a team
      operationId: remove_team_member_v1_teams__team_id__members__user_id__delete
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
          title: Team Id
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_team
components:
  schemas:
    Permission:
      type: string
      enum:
      - view_user
      - change_user
      - view_team
      - change_team
      - add_application
      - change_application
      - view_application
      - view_permission
      - view_issue
      - change_issue
      - change_issue_attachment
      - change_issue_attachment_bulk
      - change_attachment_rule
      - change_auto_rerun
      - view_test
      - change_test
      - view_rerun
      - change_rerun
      - change_rerun_bulk
      - view_artefact
      - change_artefact
      - view_environment_review
      - change_environment_review
      - view_report
      - view_test_case_reported_issue
      - change_test_case_reported_issue
      - view_environment_reported_issue
      - change_environment_reported_issue
      - view_notification
      - change_notification
      - view_sentry_debug
      title: Permission
    TeamCreate:
      properties:
        name:
          type: string
          title: Name
        permissions:
          items:
            $ref: '#/components/schemas/Permission'
          type: array
          title: Permissions
          default: []
        artefact_matching_rules:
          items:
            $ref: '#/components/schemas/ArtefactMatchingRuleBase'
          type: array
          title: Artefact Matching Rules
          default: []
      type: object
      required:
      - name
      title: TeamCreate
    FamilyName:
      type: string
      enum:
      - snap
      - deb
      - charm
      - image
      - solution
      title: FamilyName
    TeamPatch:
      properties:
        permissions:
          anyOf:
          - items:
              $ref: '#/components/schemas/Permission'
            type: array
          - type: 'null'
          title: Permissions
        artefact_matching_rules:
          anyOf:
          - items:
              $ref: '#/components/schemas/ArtefactMatchingRuleBase'
            type: array
          - type: 'null'
          title: Artefact Matching Rules
      type: object
      title: TeamPatch
    TeamResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        permissions:
          items:
            $ref: '#/components/schemas/Permission'
          type: array
          title: Permissions
        members:
          items:
            $ref: '#/components/schemas/UserMinimalResponse'
          type: array
          title: Members
        artefact_matching_rules:
          items:
            $ref: '#/components/schemas/ArtefactMatchingRuleInResponse'
          type: array
          title: Artefact Matching Rules
      type: object
      required:
      - id
      - name
      - permissions
      - members
      - artefact_matching_rules
      title: TeamResponse
    ArtefactMatchingRuleInResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        family:
          $ref: '#/components/schemas/FamilyName'
        stage:
          anyOf:
          - type: string
          - type: 'null'
          title: Stage
        track:
          anyOf:
          - type: string
          - type: 'null'
          title: Track
        branch:
          anyOf:
          - type: string
          - type: 'null'
          title: Branch
        store:
          anyOf:
          - type: string
          - type: 'null'
          title: Store
        series:
          anyOf:
          - type: string
          - type: 'null'
          title: Series
        os:
          anyOf:
          - type: string
          - type: 'null'
          title: Os
        release:
          anyOf:
          - type: string
          - type: 'null'
          title: Release
        owner:
          anyOf:
          - type: string
          - type: 'null'
          title: Owner
        grant_permissions:
          items:
            $ref: '#/components/schemas/Permission'
          type: array
          title: Grant Permissions
      type: object
      required:
      - id
      - name
      - family
      - stage
      - track
      - branch
      - store
      - series
      - os
      - release
      - owner
      - grant_permissions
      title: ArtefactMatchingRuleInResponse
      description: Artefact matching rule fields when included in responses (no relationships)
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    ArtefactMatchingRuleBase:
      properties:
        name:
          type: string
          title: Name
          default: ''
        family:
          $ref: '#/components/schemas/FamilyName'
        stage:
          type: string
          title: Stage
          default: ''
        track:
          type: string
          title: Track
          default: ''
        branch:
          type: string
          title: Branch
          default: ''
        store:
          type: string
          title: Store
          default: ''
        series:
          type: string
          title: Series
          default: ''
        os:
          type: string
          title: Os
          default: ''
        release:
          type: string
          title: Release
          default: ''
        owner:
          type: string
          title: Owner
          default: ''
        grant_permissions:
          items:
            $ref: '#/components/schemas/Permission'
          type: array
          title: Grant Permissions
      type: object
      required:
      - family
      title: ArtefactMatchingRuleBase
      description: Base model for artefact matching rule with common fields
    UserMinimalResponse:
      properties:
        id:
          type: integer
          title: Id
        launchpad_handle:
          anyOf:
          - type: string
          - type: 'null'
          title: Launchpad Handle
        email:
          type: string
          title: Email
        name:
          type: string
          title: Name
        is_admin:
          type: boolean
          title: Is Admin
      type: object
      required:
      - id
      - email
      - name
      - is_admin
      title: UserMinimalResponse