openapi: 3.0.3
info:
  title: pagerduty-api
  version: 0.0.1
servers:
- url: https://events.pagerduty.com
paths:
  /generic/2010-04-15/create_event.json:
    post:
      description: Create an alert on Pagerduty
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComSpeedwingPagerdutyApiV0ModelsCreateEvent'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComSpeedwingPagerdutyApiV0ModelsResult'
components:
  schemas:
    ComSpeedwingPagerdutyApiV0ModelsResult:
      type: object
      required:
      - status
      - message
      - incident_key
      properties:
        status:
          type: string
        message:
          type: string
        incident_key:
          type: string
    ComSpeedwingPagerdutyApiV0ModelsCreateEvent:
      type: object
      required:
      - service_key
      - event_type
      properties:
        service_key:
          type: string
        event_type:
          $ref: '#/components/schemas/ComSpeedwingPagerdutyApiV0EnumsEventType'
        incident_key:
          type: string
        description:
          type: string
        details:
          type: object
          additionalProperties: true
        client:
          type: string
        client_url:
          type: string
        contexts:
          type: object
          additionalProperties: true
    ComSpeedwingPagerdutyApiV0EnumsEventType:
      type: string
      enum:
      - trigger
      - acknowledge
      - resolve
