Ubuntu Search API

Snap search and discovery

OpenAPI Specification

ubuntu-search-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Ubuntu Security CVE Bugs Search API
  description: The Ubuntu Security CVE API provides programmatic access to Ubuntu's CVE (Common Vulnerabilities and Exposures) database. It enables querying security notices, CVE details, affected packages, and patch status across Ubuntu releases.
  version: 1.0.0
  contact:
    name: Ubuntu Security Team
    url: https://ubuntu.com/security
servers:
- url: https://ubuntu.com/security
  description: Ubuntu Security API
tags:
- name: Search
  description: Snap search and discovery
paths:
  /v2/snaps/search:
    get:
      operationId: searchSnaps
      summary: Search Snaps
      description: Search for snaps in the Snap Store by name, keyword, or category.
      tags:
      - Search
      parameters:
      - name: q
        in: query
        required: false
        schema:
          type: string
        description: Search query string.
      - name: category
        in: query
        required: false
        schema:
          type: string
        description: Filter by snap category.
      - name: scope
        in: query
        required: false
        schema:
          type: string
          enum:
          - wide
        description: Search scope. Use 'wide' for cross-store search.
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: Comma-separated list of fields to include in the response.
      - name: Snap-Device-Series
        in: header
        required: true
        schema:
          type: string
          default: '16'
        description: Snap device series identifier.
      - name: User-Agent
        in: header
        required: true
        schema:
          type: string
        description: Client user agent string.
      responses:
        '200':
          description: List of matching snaps.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/SnapResult'
                  total:
                    type: integer
components:
  schemas:
    Snap:
      type: object
      properties:
        snap-id:
          type: string
          description: Unique snap identifier.
        name:
          type: string
          description: Snap package name.
        title:
          type: string
          description: Display title of the snap.
        summary:
          type: string
          description: Short description of the snap.
        description:
          type: string
          description: Full description of the snap.
        publisher:
          type: object
          properties:
            id:
              type: string
            username:
              type: string
            display-name:
              type: string
        channels:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Channel'
        categories:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
        media:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              url:
                type: string
                format: uri
              width:
                type: integer
              height:
                type: integer
        license:
          type: string
    Channel:
      type: object
      properties:
        channel:
          type: string
        revision:
          type: integer
        version:
          type: string
        released-at:
          type: string
          format: date-time
        size:
          type: integer
        download:
          type: object
          properties:
            url:
              type: string
              format: uri
            sha3-384:
              type: string
    SnapResult:
      type: object
      properties:
        snap:
          $ref: '#/components/schemas/Snap'
        result:
          type: string