Canonical Notifications API

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

Operations 6

GET /v1/users/me/notifications Get Own Notifications #
GET /v1/users/me/notifications/count Get Own Notification Count #
POST /v1/users/me/notifications/{notification_id}/dismiss Mark Own Notification As Read #
GET /v1/users/{user_id}/notifications Get Notifications #
GET /v1/users/{user_id}/notifications/count Get Notification Count #
POST /v1/users/{user_id}/notifications/{notification_id}/dismiss Mark Notification As Read #

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-notifications-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-notifications-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Test Observer Notifications 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: Notifications
paths:
  /v1/users/me/notifications:
    get:
      tags:
      - Notifications
      summary: Get Own Notifications
      description: Get all notifications for the authenticated user
      operationId: get_own_notifications_v1_users_me_notifications_get
      parameters:
      - 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: unread_only
        in: query
        required: false
        schema:
          type: boolean
          description: 'Whether to return only unread notifications (default: false)'
          default: false
          title: Unread Only
        description: 'Whether to return only unread notifications (default: false)'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/users/me/notifications/count:
    get:
      tags:
      - Notifications
      summary: Get Own Notification Count
      description: Get the count of notifications for the authenticated user
      operationId: get_own_notification_count_v1_users_me_notifications_count_get
      parameters:
      - name: unread_only
        in: query
        required: false
        schema:
          type: boolean
          description: 'Whether to return only unread notifications (default: false)'
          default: false
          title: Unread Only
        description: 'Whether to return only unread notifications (default: false)'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: integer
                title: Response Get Own Notification Count V1 Users Me Notifications Count Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/users/me/notifications/{notification_id}/dismiss:
    post:
      tags:
      - Notifications
      summary: Mark Own Notification As Read
      description: Mark the authenticated user's own notification as read
      operationId: mark_own_notification_as_read_v1_users_me_notifications__notification_id__dismiss_post
      parameters:
      - name: notification_id
        in: path
        required: true
        schema:
          type: integer
          title: Notification Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/users/{user_id}/notifications:
    get:
      tags:
      - Notifications
      summary: Get Notifications
      description: Get all notifications for the specified user
      operationId: get_notifications_v1_users__user_id__notifications_get
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          description: ID of the user whose notifications will be fetched
          title: User Id
        description: ID of the user whose notifications will be fetched
      - 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: unread_only
        in: query
        required: false
        schema:
          type: boolean
          description: 'Whether to return only unread notifications (default: false)'
          default: false
          title: Unread Only
        description: 'Whether to return only unread notifications (default: false)'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_notification
  /v1/users/{user_id}/notifications/count:
    get:
      tags:
      - Notifications
      summary: Get Notification Count
      description: Get the count of notifications for the specified user
      operationId: get_notification_count_v1_users__user_id__notifications_count_get
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          description: ID of the user whose notification count will be fetched
          title: User Id
        description: ID of the user whose notification count will be fetched
      - name: unread_only
        in: query
        required: false
        schema:
          type: boolean
          description: 'Whether to return only unread notifications (default: false)'
          default: false
          title: Unread Only
        description: 'Whether to return only unread notifications (default: false)'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: integer
                title: Response Get Notification Count V1 Users  User Id  Notifications Count Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - view_notification
  /v1/users/{user_id}/notifications/{notification_id}/dismiss:
    post:
      tags:
      - Notifications
      summary: Mark Notification As Read
      description: Mark a notification as read
      operationId: mark_notification_as_read_v1_users__user_id__notifications__notification_id__dismiss_post
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: integer
          description: ID of the user whose notification will be dismissed
          title: User Id
        description: ID of the user whose notification will be dismissed
      - name: notification_id
        in: path
        required: true
        schema:
          type: integer
          title: Notification Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-permissions:
      - change_notification
components:
  schemas:
    NotificationResponse:
      properties:
        id:
          type: integer
          title: Id
        user_id:
          type: integer
          title: User Id
        notification_type:
          $ref: '#/components/schemas/NotificationType'
        target_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Url
        created_at:
          type: string
          format: date-time
          title: Created At
        dismissed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Dismissed At
      type: object
      required:
      - id
      - user_id
      - notification_type
      - target_url
      - created_at
      - dismissed_at
      title: NotificationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NotificationsResponse:
      properties:
        notifications:
          items:
            $ref: '#/components/schemas/NotificationResponse'
          type: array
          title: Notifications
        count:
          type: integer
          title: Count
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
      - notifications
      - count
      - limit
      - offset
      title: NotificationsResponse
    NotificationType:
      type: string
      enum:
      - USER_ASSIGNED_ARTEFACT_REVIEW
      - USER_ASSIGNED_ENVIRONMENT_REVIEW
      title: NotificationType
    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