MINE Webhooks API

The Webhooks API from MINE — 6 operation(s) for webhooks.

OpenAPI Specification

mine-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: MineOS Aispm Webhooks API
  version: v1.0
servers:
- url: https://api.portal.saymine.com/
  description: MineOS EU API Endpoint
- url: https://api.us.portal.saymine.com/
  description: MineOS US API Endpoint
security:
- Bearer: []
tags:
- name: Webhooks
paths:
  /api/Webhooks/Configurations:
    get:
      tags:
      - Webhooks
      summary: Get all current webhook configurations
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfigurationsResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
  /api/Webhooks/Configurations/{id}:
    get:
      tags:
      - Webhooks
      summary: Get webhook configuration for a specific Id
      parameters:
      - name: id
        in: path
        description: Use 'default' for main Id or UUID
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfigurationResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
  /api/Webhooks/Subscribe:
    post:
      tags:
      - Webhooks
      summary: Adds a new webhook endpoint
      description: "This will always add a new webhook endpoint, even if a similar webhook url has already been configured\r\nMax number of webhook configurations is 30\r\nSupported event types: TicketCreated, TprmTrigger, TicketClosed"
      requestBody:
        description: ''
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriberPostRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriberPostRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriberPostRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriberPostRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
  /api/Webhooks/Subscribe/{id}:
    patch:
      tags:
      - Webhooks
      summary: Update an existing webhook configuration
      parameters:
      - name: id
        in: path
        description: ''
        required: true
        schema:
          type: string
      requestBody:
        description: ''
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/WebhookSubscribeRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscribeRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscribeRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/WebhookSubscribeRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfigurationResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
  /api/Webhooks/Endpoint:
    post:
      tags:
      - Webhooks
      summary: Sets webhook endpoint
      description: This will replace any existing endpoint that is currently set, either from the UI or a previous API call.
      parameters:
      - name: url
        in: query
        description: The URL of the new endpoint. Will replace any existing endpoint.
        schema:
          type: string
      requestBody:
        description: A list of enabled events to be sent to the endpoint.
        content:
          application/json-patch+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WebhookEventType'
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WebhookEventType'
          text/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WebhookEventType'
          application/*+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/WebhookEventType'
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
    delete:
      tags:
      - Webhooks
      summary: Disables webhook endpoint
      description: This will disable any existing endpoint that is currently set, either from the UI or a previous API call.
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
  /api/Webhooks/Unsubscribe/{id}:
    delete:
      tags:
      - Webhooks
      summary: Deletes webhook endpoint
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
components:
  schemas:
    WebhookEventType:
      enum:
      - Unknown
      - TicketCreated
      - WebhookSlim
      - CustomIntegration
      - SystemCreated
      - EmployeeInactive
      - TprmTrigger
      - TicketClosed
      - ExitRequireAttention
      - SystemStatusChange
      type: string
    WebhookSubscribeRequest:
      required:
      - supportedEventTypes
      - url
      type: object
      properties:
        url:
          maxLength: 2048
          minLength: 1
          type: string
          description: The URL to which the webhook will send the event data.
        supportedEventTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          description: The list of event types that the webhook will subscribe to.
        headerName:
          maxLength: 50
          type: string
          description: Custom Header Name
          nullable: true
        headerValue:
          maxLength: 50
          type: string
          description: Custom Header Value
          nullable: true
      additionalProperties: false
    WebhookConfigurationsResponse:
      type: object
      properties:
        items:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/WebhookConfigurationResponse'
          nullable: true
      additionalProperties: false
    WebhookSubscriberPostRequest:
      required:
      - supportedEventTypes
      - url
      type: object
      properties:
        url:
          maxLength: 2048
          minLength: 1
          type: string
          description: The URL to which the webhook will send the event data.
        supportedEventTypes:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          description: The list of event types that the webhook will subscribe to.
        headerName:
          maxLength: 50
          type: string
          description: Custom Header Name
          nullable: true
        headerValue:
          maxLength: 50
          type: string
          description: Custom Header Value
          nullable: true
        id:
          type: string
          description: The Id for the desired webhook subscription.
          nullable: true
      additionalProperties: false
    WebhookConfigurationResponse:
      type: object
      properties:
        id:
          type: string
          nullable: true
        enabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        lastModified:
          type: string
          format: date-time
          nullable: true
        endpoint:
          type: string
          nullable: true
        headerName:
          type: string
          nullable: true
        headerValue:
          type: string
          nullable: true
        supportedEventTypes:
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventType'
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: "Authorization header using the Bearer scheme. \r\n\r\nEnter 'Bearer' [space] and then your API Key in the text input below.\r\n\r\nExample: 'Bearer 12345abcdef'"
      name: Authorization
      in: header