swagger: "2.0"
info:
  description: "SSA Notification service"
  version: "1.0.0"
  title: "Notification Service"
  contact:
    email: "dms-ssa@nrao.edu"
host: "shipman.aoc.nrao.edu"
schemes:
  - "http"
paths:
  /notify:
    get:
      summary: "Show all notifications we can send"
      description: ""
      operationId: "view_notifications"
      consumes:
        - "application/json"
      produces:
        - "application/json"
      responses:
        "200":
          description: "successful operation"
          schema:
            $ref: "#/definitions/Notification"
    post:
      summary: "Create a new notification"
      description: ""
      operationId: "create_notification"
      consumes:
        - "application/json"
      produces:
        - "application/json"
      responses:
        "400":
          description: "Invalid name supplied"
        "200":
          description: "successful operation"
          schema:
            $ref: "#/definitions/Notification"
  /notify/{name}:
    delete:
      summary: "Delete a notification"
      description: ""
      operationId: "delete_notification"
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - name: "name"
          in: "path"
          description: "name of notification to delete"
          required: true
          type: "string"
      responses:
        "404":
          description: "Notification not found"
        "200":
          description: "successful operation"
          schema:
            $ref: "#/definitions/Notification"
  /notify/{name}/send:
    post:
      summary: "Send a notification"
      description: ""
      operationId: "send_notification"
      consumes:
        - "application/json"
      produces:
        - "application/json"
      parameters:
        - name: "name"
          in: "path"
          description: "name of notification to send"
          required: true
          type: "string"
        - in: "body"
          name: "body"
          description: "Content to populate the notification with"
          required: true
          schema:
            $ref: "#/definitions/Notification"
      responses:
        "400":
          description: "Unable to send messages"
        "404":
          description: "Notification not found"
        "200":
          description: "successful operation"
          schema:
            $ref: "#/definitions/Notification"

definitions:
  Notification:
    type: "object"
    properties:
      name:
        type: "string"
      description:
        type: "string"
      template:
        type: "string"

externalDocs:
  description: "More about the capability service"
  url: "http://builder.aoc.nrao.edu/ssa/architecture/workspaces"
