Ampersand Notification API

The Notification API from Ampersand — 2 operation(s) for notification.

OpenAPI Specification

ampersand-notification-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Ampersand public API Key Notification API
  version: 1.0.0
servers:
- url: https://api.withampersand.com/v1
security:
- APIKeyHeader: []
- Bearer: []
tags:
- name: Notification
paths:
  /projects/{projectIdOrName}/notification-event-topic-routes:
    post:
      summary: Ampersand Create a Notification Event-topic Route
      operationId: createEventTopicRoute
      tags:
      - Notification
      parameters:
      - name: projectIdOrName
        in: path
        required: true
        description: The Ampersand project ID or project name.
        schema:
          type: string
        example: my-project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - eventType
              - topicId
              properties:
                eventType:
                  type: string
                  description: The type of notification event.
                  enum:
                  - read.backfill.done
                  - connection.created
                  - connection.error
                  - connection.refreshed
                  - connection.deleted
                  - installation.created
                  - installation.updated
                  - installation.deleted
                  - read.schedule.paused
                  - write.async.done
                  - destination.webhook.disabled
                topicId:
                  type: string
                  description: The ID of the topic to route events to.
            examples:
              route_example:
                summary: Create event-topic route
                value:
                  eventType: installation.created
                  topicId: 1234567890abcdef
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationEventTopicRoute'
        400:
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: ../problem/problem.yaml#/components/schemas/ApiProblem
        422:
          description: Unprocessable Entity
          content:
            application/problem+json:
              schema:
                $ref: ../problem/problem.yaml#/components/schemas/InputValidationProblem
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: ../problem/problem.yaml#/components/schemas/ApiProblem
      x-codegen-request-body-name: eventTopicRoute
    get:
      summary: Ampersand List Notification Event-topic Routes
      operationId: listEventTopicRoutes
      tags:
      - Notification
      parameters:
      - name: projectIdOrName
        in: path
        required: true
        description: The Ampersand project ID or project name.
        schema:
          type: string
      - name: topicId
        in: query
        required: false
        description: Filter by topic ID.
        schema:
          type: string
      - name: eventType
        in: query
        required: false
        description: Filter by notification event type.
        schema:
          $ref: '#/components/schemas/NotificationEventType'
      responses:
        200:
          description: List of event-topic routes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NotificationEventTopicRoute'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: ../problem/problem.yaml#/components/schemas/ApiProblem
  /projects/{projectIdOrName}/notification-event-topic-routes/{routeId}:
    delete:
      summary: Ampersand Delete a Notification Event-topic Route
      operationId: deleteEventTopicRoute
      tags:
      - Notification
      parameters:
      - name: projectIdOrName
        in: path
        required: true
        description: The Ampersand project ID or project name.
        schema:
          type: string
      - name: routeId
        in: path
        required: true
        description: The event-topic route ID.
        schema:
          type: string
      responses:
        204:
          description: Deleted
        404:
          description: Route not found
          content:
            application/problem+json:
              schema:
                $ref: ../problem/problem.yaml#/components/schemas/InputValidationProblem
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: ../problem/problem.yaml#/components/schemas/ApiProblem
components:
  schemas:
    NotificationEventType:
      type: string
      description: The type of notification event.
      enum:
      - connection.created
      - connection.error
      - connection.refreshed
      - connection.deleted
      - installation.created
      - installation.updated
      - installation.deleted
      - read.schedule.paused
      - read.backfill.done
      - read.triggered.done
      - read.triggered.error
      - write.async.done
      - destination.webhook.disabled
    NotificationEventTopicRoute:
      title: Notification Event Topic Route
      required:
      - id
      - eventType
      - topicId
      - projectId
      - createTime
      type: object
      properties:
        id:
          type: string
          description: The event-topic route ID.
        eventType:
          $ref: '#/components/schemas/NotificationEventType'
        topicId:
          type: string
          description: The ID of the topic to route events to.
        projectId:
          type: string
          description: The Ampersand project ID.
        createTime:
          type: string
          format: date-time
          description: The time when the event-topic route was created.
        updateTime:
          type: string
          format: date-time
          description: The time when the event-topic route was last updated.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: X-Api-Key
      in: header
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT