HI all,

Thank you so much for your feedback.

Since the bot detection alert subscriptions related resources are related
to alert subscriptions, it has been planned to add 'bot-detection' as a
subresource to 'alert-subscriptions' resource. Hence the resources will be
revamped as follows.

Description

Revamped Resource

Operation

Get bot detection alert subscriptions

/alert-subscriptions/bot-detection

GET

Add a bot detection alert subscription

/alert-subscriptions/bot-detection

POST

Delete a bot detection alert subscription

/alert-subscriptions/bot-detection/{uuid}

DELETE


   - Please find the OAS definitions below.

'/alert-subscriptions/bot-detection':
    #-----------------------------------------------------
    # Retrieve the list of subscriptions for bot detection alerts
    #-----------------------------------------------------
    get:
      security:
        - OAuth2Security:
            - apim:admin
            - apim:bot_data
      operationId: getBotDetectionAlertSubscriptions
      produces:
        - application/json
      summary: |
        Get the list of subscriptions for bot detection
      description: |
        Get the list of subscriptions which are subscribed to receive email
alerts for bot detection
      responses:
        200:
          description: |
            OK.
            The list of bot detection alert subscriptions are returned.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              type: string
          schema:
            $ref: '#/definitions/BotDetectionSubscriptionList'
        500:
          description: |
            Internal Server Error
            An error occurred while retrieving bot detection alert
subscriptions.
          schema:
            $ref: '#/definitions/Error'

    #-----------------------------------------------------
    # Subscribe for bot detection alerts
    #-----------------------------------------------------
    post:
      security:
        - OAuth2Security:
            - apim:admin
            - apim:bot_data
      operationId: subscribeForBotDetectionAlerts
      summary: Subscribe for bot detection alerts
      description: |
        Register a subscription for bot detection alerts
      parameters:
        - in: body
          name: email
          description: |
            The email to register for subscription
          required: true
          schema:
            $ref: '#/definitions/BotDetectionSubscription'
      responses:
        200:
          description: |
            OK.
            Bot detection alert subscription is registered successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              type: string
          schema:
            $ref: '#/definitions/BotDetectionSubscription'
        400:
          description: |
            Bad Request.
            Invalid request or validation error.
          schema:
            $ref: '#/definitions/Error'
        404:
          description: |
            Not Found.
            The resource to be updated does not exist.
          schema:
            $ref: '#/definitions/Error'
        500:
          description: |
            Internal Server Error
            An error occurred while adding a bot detection subscription.
          schema:
            $ref: '#/definitions/Error'

  '/alert-subscriptions/bot-detection/{uuid}':
    #-----------------------------------------------------
    # Unsubscribe from bot detection alerts
    #-----------------------------------------------------
    delete:
      security:
        - OAuth2Security:
            - apim:admin
            - apim:bot_data
      operationId: unsubscribeFromBotDetectionAlerts
      summary: Unsubscribe from bot detection alerts.
      description: |
        Delete a subscription from bot detection alerts.
      parameters:
        - name: uuid
          in: query
          description: |
            Pass the uuid of the subscription to unsubscribe
          required: true
          type: string
      responses:
        200:
          description: |
            OK.
            Bot detection alert subscription is deleted successfully.
          headers:
            Content-Type:
              description: |
                The content type of the body.
              type: string
        404:
          description: |
            Not Found.
            Resource to be deleted does not exist.
          schema:
            $ref: '#/definitions/Error'
        500:
          description: |
            Internal Server Error
            An error occurred while deleting a bot detection subscription.
          schema:
            $ref: '#/definitions/Error'


   - The relevant schemas are shown below.

  #-----------------------------------------------------
  # The Bot Detection Subscription List resource
  #-----------------------------------------------------
  BotDetectionSubscriptionList:
    title: Bot Detection Subscription List
    properties:
      count:
        type: integer
        description: |
          Number of Bot Detection Alert Subscriptions returned.
        example: 3
      list:
        type: array
        items:
          $ref: '#/definitions/BotDetectionSubscription'

  #-----------------------------------------------------
  # The Bot Detection Subscription resource
  #-----------------------------------------------------
  BotDetectionSubscription:
    title: Bot Detection Subscription
    required:
      - email
    properties:
      uuid:
        type: string
        description: UUID of the subscription
        example: "urn:uuid:1ed6d2de-29df-4fed-a96a-46d2329dce65"
      email:
        type: string
        description: email
        example: "[email protected]"


Your feedback regarding this is highly appreciated.

Thank you!
-- 
*Hisan Hunais* | Software Engineer | WSO2 Inc.
(m) +94768526186 | (e) [email protected]

[image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to