openapi: 3.1.0
info:
  title: Webhook API - v1beta1
  description: API for registering and managing HTTP webhooks and subscriptions.
  version: v1beta1
  contact: {}
  license:
    name: HPE License
    url: https://www.hpe.com/us/en/software/licensing.html
servers:
  - url: https://global.api.greenlake.hpe.com
tags:
  - name: Webhooks
    description: Everything about Webhooks
  - name: Subscriptions
    description: Everything about Subscriptions
security:
  - Bearer: []
paths:
  /events/v1beta1/webhooks:
    post:
      tags:
        - Webhooks
      operationId: createWebhook
      summary: Register a new webhook
      description: >-
        This endpoint allows clients to create a new webhook to establish a
        callback mechanism for key events on GLCP services.
      requestBody:
        description: Webhook payload
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRegistrationInput'
            examples:
              register-webhook:
                summary: Register Webhook
                value:
                  name: License Notification
                  description: Webhook for receiving license notifications
                  destination: https://example.com/new-endpoint
                  secret: s3cr3tKey
      responses:
        '201':
          description: Webhook successfully registered.
          headers:
            Location:
              description: URI to get details of the webhook creation operation.
              schema:
                type: string
                format: uri-reference
              examples:
                async-op:
                  summary: URI to retrieve the status of the Webhook Creation Operation
                  value: >-
                    /events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
              examples:
                create-webhook-record:
                  summary: Register Webhook
                  value:
                    id: 123e4567-e89b-12d3-a456-426614174000
                    type: events/webhook
                    name: License Notification
                    description: Webhook for receiving license notifications
                    destination: https://example.com/new-endpoint
                    paused: false
                    status: ACTIVE
                    resourceUri: >-
                      /events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000
                    generation: 1
                    hpePrincipal: user:<opaque-global-id>
                    createdBy: sample.user@example.com
                    createdAt: '2024-04-29T15:25:06.194Z'
                    updatedAt: '2024-04-29T15:25:06.194Z'
                    clientId: 0908777a-788f-45da-afb8-295c626e4d14
                    issuerUrl: https://example.com/new-endpoint
                    authType: Oauth
                    dualSecret: false
                    batching: false
                    challengeRequestEnabled: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-request-body:
                  summary: Invalid request body error
                  value:
                    errorCode: HPE_GL_EVENTS_INVALID_REQUEST_BODY
                    message: Invalid request body
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 422
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while creating webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
    get:
      tags:
        - Webhooks
      operationId: retrieveWebhooks
      summary: Get all webhooks
      description: >-
        Retrieves a list of webhooks, organized in descending order based on
        their creation time. <br><br> **Pagination**: This endpoint exclusively
        supports offset-based pagination.
      parameters:
        - name: limit
          in: query
          description: >-
            Specifies the number of results to be returned. The default value is
            200.
          required: false
          schema:
            maximum: 200
            minimum: 1
            type: integer
            format: int64
            default: 200
        - name: offset
          in: query
          description: >-
            Specifies the zero-based resource offset to start the response from.
            The default value is 0.
          required: false
          schema:
            type: integer
            format: int64
            default: 0
            minimum: 0
      responses:
        '200':
          description: Webhooks retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponseList'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-query-params:
                  summary: Invalid query params
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid query params
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
  /events/v1beta1/webhooks/{id}:
    get:
      tags:
        - Webhooks
      operationId: retrieveWebhook
      summary: Get a webhook by ID
      description: >-
        Retrieve detailed information about a specific webhook by its unique
        identifier
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
            format: uuid
            default: 0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific webhook ID
              description: Get specific webhook
              value: 0908777a-788f-45da-afb8-295c626e4d14
      responses:
        '200':
          description: Webhook retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-query-params:
                  summary: Invalid query params
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid query params
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A webhook doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
    patch:
      tags:
        - Webhooks
      operationId: updateWebhook
      summary: Update a webhook by ID
      description: >-
        Update an existing webhook's settings, such as its name, description,
        destination, etc
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
            format: uuid
            default: 0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific webhook ID
              description: Update specific webhook
              value: 0908777a-788f-45da-afb8-295c626e4d14
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/WebhookRegistrationUpdate'
      responses:
        '200':
          description: Webhook updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-query-params:
                  summary: Invalid query params
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid query params
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A webhook doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-request-body:
                  summary: Invalid request body error
                  value:
                    errorCode: HPE_GL_EVENTS_INVALID_REQUEST_BODY
                    message: Invalid request body
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 422
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
    delete:
      tags:
        - Webhooks
      operationId: deleteWebhook
      summary: Delete a webhook by ID
      description: Remove a specific webhook from the system
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
            format: uuid
            default: 0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific webhook ID
              description: Delete specific webhook
              value: 0908777a-788f-45da-afb8-295c626e4d14
        - name: force
          in: query
          description: >-
            The `force` query parameter is used to force deletion in situations
            where the webhook has one or more subscriptions.
          schema:
            type: boolean
            default: false
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Bad Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A webhook doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
  /events/v1beta1/webhooks/{id}/verify:
    post:
      tags:
        - Webhooks
      operationId: webhookVerification
      summary: Webhook Verification Endpoint
      description: >
        This endpoint is designed to ensure the webhook URL provided by the user
        is correct and the server is prepared to receive webhook requests.
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
            format: uuid
            default: 0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific webhook ID
              description: Verify specific webhook
              value: 0908777a-788f-45da-afb8-295c626e4d14
      responses:
        '200':
          description: Webhook validated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyWebhookResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Bad Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A webhook doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
  /events/v1beta1/webhooks/{id}/recent-deliveries:
    get:
      tags:
        - Webhooks
      operationId: recentDeliveries
      summary: Fetch recent webhook deliveries
      description: >-
        This endpoint is dedicated to retrieve detailed information about recent
        deliveries for a specific webhook.
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
            format: uuid
            default: 0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific webhook ID
              description: Get recent deliveries for specific webhook
              value: 0908777a-788f-45da-afb8-295c626e4d14
        - name: limit
          in: query
          description: >-
            Specifies the number of results to be returned. The default value is
            200.
          required: false
          schema:
            maximum: 200
            minimum: 1
            type: integer
            format: int64
            default: 200
        - name: offset
          in: query
          description: >-
            Specifies the zero-based resource offset to start the response from.
            The default value is 0.
          required: false
          schema:
            type: integer
            format: int64
            default: 0
            minimum: 0
      responses:
        '200':
          description: Recent deliveries retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentDeliveriesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Bad Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A webhook doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving recent
                      deliveries, if the issue persists, Please contact HPE
                      Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
  /events/v1beta1/webhooks/{id}/delivery-failures/{failureId}/retry:
    post:
      tags:
        - Webhooks
      operationId: deliveryFailuresRetry
      summary: Retry webhook delivery failures
      description: >-
        This endpoint is dedicated to retry delivery failures for a specific
        webhook.
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook ID
          schema:
            type: string
            format: uuid
            default: 0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific webhook ID
              description: Get specific webhook delivery failures
              value: 0908777a-788f-45da-afb8-295c626e4d14
        - name: failureId
          in: path
          required: true
          description: Webhook Failure ID
          schema:
            type: string
            format: uuid
            default: a4831e24-c536-4719-88ca-2afe5a959237
          examples:
            equals:
              summary: Example with specific webhook failure ID
              description: Retry specific webhook delivery failures
              value: a4831e24-c536-4719-88ca-2afe5a959237
      responses:
        '200':
          description: Delivery failures retried submitted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryFailureRetry'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Bad Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A webhook doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while retrieving webhook
                      failures, if the issue persists, Please contact HPE
                      Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
  /events/v1beta1/subscriptions:
    post:
      tags:
        - Subscriptions
      operationId: createSubscription
      summary: Create a new subscription
      description: >-
        Register a new subscription to start receiving event notifications
        through the configured webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/SubscriptionInput'
      responses:
        '201':
          description: Subscription successfully registered.
          headers:
            Location:
              description: URI to get details of the subscription creation operation.
              schema:
                type: string
                format: uri-reference
              examples:
                get-sub:
                  summary: >-
                    URI to retrieve the status of the Subscription Creation
                    Operation
                  value: >-
                    /events/v1beta1/subscriptions/123e4567-e89b-12d3-a456-426614174000
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-request-body:
                  summary: Invalid request body error
                  value:
                    errorCode: HPE_GL_EVENTS_INVALID_REQUEST_BODY
                    message: Invalid request body
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 422
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while creating webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
    get:
      tags:
        - Subscriptions
      operationId: retrieveSubscriptions
      summary: Get all subscriptions for a webhook
      description: >-
        Retrieves a list of subscriptions associated to webhooks, organized in
        descending order based on their creation time. <br><br> **Pagination**:
        This endpoint exclusively supports offset-based pagination. <br><br>
        **Filtering**: Following are the supported filter parameters &#58;
        `webhookId`
      parameters:
        - name: limit
          in: query
          description: >-
            Specifies the number of results to be returned. The default value is
            10.
          required: false
          schema:
            maximum: 10
            minimum: 1
            type: integer
            format: int64
            default: 10
        - name: offset
          in: query
          description: >-
            Specifies the zero-based resource offset to start the response from.
            The default value is 0.
          required: false
          schema:
            type: integer
            format: int64
            default: 0
            minimum: 0
        - name: filter
          in: query
          description: >
            Filter subscriptions events using an [OData
            V4](https://www.odata.org/documentation/) formatted filter string.
          required: true
          schema:
            title: Filter
            type: string
            format: uuid
            description: >
              Filter data using a subset of OData 4.0 and return only the subset
              of resources that match the filter.

              Get list of subscriptions that can be filtered by:

              - webhookId
            default: ''
          examples:
            FilterWithWebhookId:
              summary: Filter with webhookId
              description: Returns subscriptions for a user within a particular webhook.
              value: webhookId eq '123e4567-e89b-12d3-a456-426614174000'
      responses:
        '200':
          description: Subscriptions retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSubscriptionListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-request-body:
                  summary: Invalid request body error
                  value:
                    errorCode: HPE_GL_EVENTS_INVALID_REQUEST_BODY
                    message: Invalid request body
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 422
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while creating webhook, if the
                      issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
    delete:
      tags:
        - Subscriptions
      operationId: DeleteSubscription
      summary: Delete subscription for a webhook
      description: >-
        Delete the list of subscriptions by the IDs, stopping further event
        notification linked to the subscriptions
      parameters:
        - in: query
          name: id
          required: true
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              format: uuid
            default: id=0908777a-788f-45da-afb8-295c626e4d14
          examples:
            equals:
              summary: Example with specific subscription ID
              description: Delete all subscriptions based on the IDs
              value:
                - 0908777a-788f-45da-afb8-295c626e4d14
                - 0908777a-788f-45da-afb8-295c626e4d11
                - 0908777a-788f-45da-afb8-295c626e4d12
          description: The ID of the subscription to delete.
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A subscription doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while creating subscription, if
                      the issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
    patch:
      tags:
        - Subscriptions
      operationId: updateSubscription
      summary: Update subscription with specific IDs
      description: Update all subscription identified by the given IDs.
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/PatchSubscriptionInput'
      responses:
        '200':
          description: Successfully updated the given subscription
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-req-body:
                  value:
                    errorCode: HPE_GL_ERROR_BAD_REQUEST
                    message: Invalid request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 400
        '401':
          description: Unauthorized - Invalid JWT token in Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-token:
                  summary: Invalid Token Error
                  value:
                    errorCode: HPE_GL_ERROR_UNAUTHORIZED
                    message: Invalid JWT token in Request
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 401
        '403':
          description: Forbidden - The operation is forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-permission:
                  summary: Invalid Permission Error
                  value:
                    errorCode: HPE_GL_ERROR_FORBIDDEN
                    message: Invalid Permission Error
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 403
        '404':
          description: Bad Request, A subscription doesn't exist with the given ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not-found:
                  summary: Not found error
                  value:
                    errorCode: HPE_GL_ERROR_NOT_FOUND
                    message: Webhook not found
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 404
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid-request-body:
                  summary: Invalid request body error
                  value:
                    errorCode: HPE_GL_EVENTS_INVALID_REQUEST_BODY
                    message: Invalid request body
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 422
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Request limit per hour.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of requests left for the time window.
            X-RateLimit-Reset:
              schema:
                type: string
                format: date-time
              description: The UTC date/time at which the current rate limit window resets.
        '500':
          description: >-
            Unexpected Server Error, Please re-try and contact HPE Support if
            the error is not resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                unexpected-error:
                  value:
                    errorCode: HPE_GL_ERROR_INTERNAL_SERVER_ERROR
                    message: >-
                      Unexpected error occurred while creating subscription, if
                      the issue persists, Please contact HPE Support
                    debugId: 75d40213-6776-40ff-a959-89a7514ef7fc
                    httpStatusCode: 500
components:
  securitySchemes:
    Bearer:
      description: >-
        Personal access token compliant with RFC8725 issued by the HPE GreenLake
        platform.
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    WebhookRegistrationInput:
      type: object
      description: Represents the data required to register a new webhook.
      additionalProperties: false
      required:
        - name
        - destination
        - secret
      properties:
        name:
          type: string
          description: The name of the webhook.
          examples:
            - License Notification
        description:
          type: string
          description: A brief description of the webhook.
          examples:
            - Webhook for receiving license notifications
        destination:
          type: string
          description: The URL where events will be sent.
          examples:
            - https://example.com/new-endpoint
        secret:
          type: string
          description: A secret for verifying the authenticity of incoming requests.
          examples:
            - s3cr3tKey
        secondarySecret:
          type: string
          description: A secret for verifying the authenticity of incoming requests.
          examples:
            - s3cr3tKey
        authType:
          type: string
          description: Authentication Type Oauth or APIKey
          enum:
            - Oauth
            - APIKey
            - ''
        clientId:
          type: string
          description: Client Id used for Oauth authnetication
          examples:
            - d941ee23-d4ab-454f-ba63-355bc63d50f5
        clientSecret:
          type: string
          description: Client Secret used for Oauth Authentication
          examples:
            - d941ee23-d4ab-454f-ba63-355bc63d50f5_api
        issuerUrl:
          type: string
          description: Token issuer endpoint
          examples:
            - https://example.com/oauth2
        apiKey:
          type: string
          description: Api Key used for authentication from client endpoint
          examples:
            - bvrjpcbxsnmpbrflwqnhfjdxhytswwkfyfmnxrqwlteqxepbwnacspvekeo
        batching:
          type: boolean
          description: Indicates whether the webhook uses batching.
          examples:
            - false
        challengeRequestEnabled:
          type: boolean
          default: true
          description: If set to false, no challenge requests will be sent to webhook
          examples:
            - true
            - false
    WebhookRegistrationUpdate:
      type: object
      description: Contains fields that can be updated for an existing webhook
      additionalProperties: false
      properties:
        name:
          type: string
          description: The name of the webhook.
          examples:
            - License Notification
        description:
          type: string
          description: A brief description of the webhook.
          examples:
            - Webhook for receiving license notifications
        destination:
          type: string
          description: The URL where events will be sent.
          examples:
            - https://example.com/new-endpoint
        secret:
          type: string
          description: A secret for verifying the authenticity of incoming requests.
          examples:
            - s3cr3tKey
        secondarySecret:
          type: string
          description: A secret for verifying the authenticity of incoming requests.
          examples:
            - s3cr3tKey
        paused:
          description: >-
            Indicates whether the webhook is paused. `false` means the webhook
            is not paused.
          type: boolean
          default: false
          examples:
            - false
            - true
        authType:
          type: string
          description: Authentication Type Oauth or APIKey
          enum:
            - Oauth
            - APIKey
            - ''
        clientId:
          type: string
          description: Client Id used for Oauth authnetication
          examples:
            - d941ee23-d4ab-454f-ba63-355bc63d50f5
        clientSecret:
          type: string
          description: Client Secret used for Oauth Authentication
          examples:
            - d941ee23-d4ab-454f-ba63-355bc63d50f5_api
        issuerUrl:
          type: string
          description: Token issuer endpoint
          examples:
            - https://example.com/oauth2
        apiKey:
          type: string
          description: Api Key used for authentication from client endpoint
          examples:
            - bvrjpcbxsnmpbrflwqnhfjdxhytswwkfyfmnxrqwlteqxepbwnacspvekeo
        batching:
          description: Indicates whether the webhook uses batching.
          type: boolean
          examples:
            - false
        challengeRequestEnabled:
          type: boolean
          description: If set to false, no challenge requests will be sent to webhook
          examples:
            - true
            - false
    WebhookResponse:
      type: object
      description: The response schema for webhook operations.
      required:
        - id
        - type
        - createdAt
        - updatedAt
        - generation
        - paused
        - name
        - destination
        - hpePrincipal
        - authType
        - clientId
        - issuerUrl
        - createdBy
        - description
        - resourceUri
        - status
        - dualSecret
        - batching
        - challengeRequestEnabled
      properties:
        id:
          type: string
          description: The unique identifier of the webhook.
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        type:
          type: string
          description: The type of the resource.
          const: events/webhook
        name:
          type: string
          description: The name of the webhook.
          examples:
            - License Notification
        description:
          type: string
          description: A brief description of the webhook.
          examples:
            - Webhook for receiving license notifications
        destination:
          type: string
          description: The URL where events will be sent.
          examples:
            - https://example.com/new-endpoint
        paused:
          description: >-
            Indicates whether the webhook is paused. `false` means the webhook
            is not paused.
          type: boolean
          default: false
          examples:
            - false
        status:
          description: Controlled by System only
          type: string
          default: PENDING
          enum:
            - ACTIVE
            - DISABLED
            - PENDING
            - WARNING
            - ERROR
          examples:
            - ACTIVE
        stateReason:
          type: string
          description: The reason for the current state of the webhook.
          examples:
            - Failure in Event Deliveries
            - HMAC validation failed. Please verify webhook secret.
            - 'Webhook URL unreachable. error: <errorMsg>'
            - 'Webhook Disabled by user: <hpePrincipalID>'
        resourceUri:
          type: string
          description: URI to the resource itself (i.e. a self link).
          examples:
            - /events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000
        generation:
          type: integer
          description: Monotonically increasing update counter.
          examples:
            - 1
        hpePrincipal:
          type: string
          description: Security principal subject notation.
          examples:
            - user:<opaque-global-id>
        createdBy:
          type: string
          description: The user that created the webhook.
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the webhook was created.
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the webhook was last updated
        authType:
          type: string
          description: type of authentication (oauth,apikey)
          examples:
            - oauth
            - apikey
        clientId:
          type: string
          description: ClientId used for generating bearer token for verification
          examples:
            - a822f43a-9e72-4a04-8476-ad00422b987f
        issuerUrl:
          type: string
          description: The token generating url
          examples:
            - http://example.com
        dualSecret:
          description: Indicates whether the webhook uses dual secret authentication.
          type: boolean
          default: false
          examples:
            - false
        batching:
          description: Indicates whether the webhook uses batching.
          type: boolean
          default: false
          examples:
            - false
        endpointRateLimit:
          type:
            - integer
            - 'null'
          description: >-
            The rate limit (requests per minute) allowed by the webhook
            endpoint. This value is determined during webhook verification when
            the endpoint responds with a WebHook-Allowed-Rate header. A value of
            -1 indicates unlimited rate, positive integers specify requests per
            minute, and null indicates no rate limit has been specified by the
            endpoint.
          examples:
            - 100
            - -1
            - null
        challengeRequestEnabled:
          type: boolean
          default: true
          description: If false, no challenge requests will be sent to webhook
          examples:
            - true
            - false
    DestinationResponse:
      type: object
      description: The response from the destination URL.
      properties:
        statusCode:
          type: integer
          description: The HTTP status code returned by the destination.
          format: int32
        message:
          type: string
          description: The message returned by the destination.
          examples:
            - OK
        requestedRate:
          type:
            - integer
            - 'null'
          description: >-
            The rate of events as requested by the destination. Null if not
            defined.
    VerifyWebhookResponse:
      type: object
      description: The response schema for verifying a webhook.
      allOf:
        - $ref: '#/components/schemas/WebhookResponse'
        - type: object
          properties:
            endpointRateLimit:
              type:
                - integer
                - 'null'
              description: >-
                The rate limit (requests per minute) allowed by the webhook
                endpoint. This value is determined during webhook verification
                when the endpoint responds with a WebHook-Allowed-Rate header. A
                value of -1 indicates unlimited rate, positive integers specify
                requests per minute, and null indicates no rate limit has been
                specified by the endpoint.
              examples:
                - 100
                - -1
                - null
            destinationResponse:
              $ref: '#/components/schemas/DestinationResponse'
    WebhookResponseList:
      type: object
      description: A collection of WebhookResponse items.
      required:
        - items
        - count
        - offset
        - total
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/WebhookResponse'
        count:
          type: integer
        offset:
          type: integer
        total:
          type: integer
    WebhookResourceInputRef:
      type: object
      description: >-
        A reference to a specific webhook resource, providing a link (URI)
        directly to the referenced webhook.
      required:
        - resourceUri
      properties:
        resourceUri:
          type: string
          examples:
            - /events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000
          description: URI to the webhook
    WebhookResourceResponseRef:
      type: object
      description: The response schema for WebhookSubscription.
      required:
        - resourceUri
      properties:
        resourceUri:
          type: string
          examples:
            - /events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000
          description: URI to the webhook
    PatchSubscriptionInput:
      type: object
      description: Schema for updating a subscription.
      additionalProperties: false
      required:
        - subscriptionId
        - eventType
        - webhook
      properties:
        subscriptionId:
          type: string
          description: Subscription Id to update.
        eventType:
          type: string
          description: >-
            The type of event to subscribe. [Events
            Standard](https://developer.greenlake.hpe.com/docs/greenlake/services/event/public/events/)
          examples:
            - com.hpe.greenlake.sample-publisher.v1beta1.sample-event1
        webhook:
          $ref: '#/components/schemas/WebhookResourceInputRef'
        eventFilter:
          type: string
          description: The filter to apply to events.
          examples:
            - createdAt lt 2021-05-12T07:20:00.00Z
    SubscriptionInput:
      type: object
      description: Schema for creating a new subscription.
      additionalProperties: false
      required:
        - eventType
        - webhook
      properties:
        eventType:
          type: string
          description: >-
            The type of event to subscribe. [Events
            Standard](https://developer.greenlake.hpe.com/docs/greenlake/services/event/public/events/)
          examples:
            - com.hpe.greenlake.sample-publisher.v1beta1.sample-event1
        webhook:
          $ref: '#/components/schemas/WebhookResourceInputRef'
        eventFilter:
          type: string
          description: The filter to apply to events.
          examples:
            - createdAt lt 2021-05-12T07:20:00.00Z
    DeliveryFailureRetry:
      type: object
      description: Details about a delivery failure incident.
      required:
        - id
        - type
        - httpResponseCode
        - resourceUri
        - requestHeaders
        - requestBody
        - responseHeaders
        - responseBody
        - createdAt
        - updatedAt
        - generation
        - failureId
      properties:
        id:
          type: string
          description: Unique identifier of the delivery failure.
          format: uuid
        type:
          type: string
          description: The type of the resource.
          const: events/deliveryFailure
        httpResponseCode:
          type: integer
          description: HTTP Error Code returned by the destination
          format: int32
        resourceUri:
          type: string
          description: URI to the delivery failure.
          const: /events/v1beta1/webhooks/{webhookId}
        requestHeaders:
          type: object
          description: Headers included in the webhook's request.
          examples:
            - Content-Type: application/json
        requestBody:
          type: object
          description: The body of the request from the webhook.
          examples:
            - cloudEvents: data
        responseHeaders:
          type: object
          description: Headers included in the webhook's response.
          examples:
            - Content-Type: application/json
        responseBody:
          type: string
          description: The body of the response from the webhook.
          examples:
            - error: Internal processing error
        createdAt:
          type: string
          description: The date and time the webhook failure happened.
          format: date-time
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the delivery failure was last updated
        generation:
          type: integer
          description: Monotonically increasing update counter.
          examples:
            - 1
        failureId:
          type: string
          description: Unique identifier of the delivery failure.
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
    RecentDeliveryResponse:
      type: object
      description: >-
        Details about a delivery incident, supporting both single and batch
        deliveries.
      required:
        - id
        - type
        - httpResponseCode
        - createdAt
        - requestHeaders
        - requestBody
        - responseBody
        - status
        - retryStatus
        - createdAt
        - updatedAt
        - generation
        - description
      properties:
        id:
          type: string
          description: >-
            Unique identifier of the delivery. For batch deliveries, this is the
            batch ID; for single deliveries, the cloudevent ID.
          format: uuid
        type:
          type: string
          description: The type of the resource.
          const: events/deliveryFailure
        httpResponseCode:
          type: integer
          description: HTTP Error Code returned by the destination
          format: int32
        resourceUri:
          type: string
          description: URI to the delivery failure.
          const: /events/v1beta1/webhooks/{webhookId}
        createdAt:
          type: string
          description: The date and time the webhook delivery happened.
          format: date-time
        generation:
          type: integer
          description: Monotonically increasing update counter.
          examples:
            - 1
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the delivery was last updated
        requestHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers included in the webhook's request.
          examples:
            - Content-Type:
                - application/json
                - headers
        requestBody:
          type: object
          description: A single object payload.
          examples:
            - cloudEvents: data
        status:
          description: Controlled by System only
          type: string
          default: SUCCESS
          enum:
            - SUCCESS
            - FAILURE
          examples:
            - SUCCESS
        retryStatus:
          description: Indicates whether the delivery can be retried
          type: string
          default: NORETRY
          enum:
            - NORETRY
            - RETRY
          examples:
            - NORETRY
        responseHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers included in the webhook's response.
          examples:
            - Content-Type: application/json
        responseBody:
          type: string
          description: The body of the response from the webhook.
          examples:
            - error: Internal processing error
        subject:
          type: string
          description: The cloud event subject.
          examples:
            - events.<workspaceId>.<webhookId>
        failureId:
          type: string
          description: Unique identifier of the delivery failure.
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        description:
          type: string
          description: >
            Human-readable description of the delivery. For single event
            deliveries, this is the event type. For batch deliveries, this is a
            string like "Batch of 10 events".
    BatchRecentDeliveryResponse:
      type: object
      description: Details about a delivery failure incident.
      required:
        - id
        - type
        - httpResponseCode
        - createdAt
        - requestHeaders
        - requestBody
        - responseBody
        - status
        - retryStatus
        - createdAt
        - updatedAt
        - generation
        - description
        - batchId
      properties:
        id:
          type: string
          description: Unique identifier of the delivery failure.
          format: uuid
        type:
          type: string
          description: The type of the resource.
          const: events/deliveryFailure
        httpResponseCode:
          type: integer
          description: HTTP Error Code returned by the destination
          format: int32
        resourceUri:
          type: string
          description: URI to the delivery failure.
          const: /events/v1beta1/webhooks/{webhookId}
        createdAt:
          type: string
          description: The date and time the webhook failure happened.
          format: date-time
        generation:
          type: integer
          description: Monotonically increasing update counter.
          examples:
            - 1
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the delivery failure was last updated
        requestHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers included in the webhook's request.
          examples:
            - Content-Type:
                application/json: null
                headers: null
        requestBody:
          type: array
          description: The body of the request from the webhook.
          examples:
            - - cloudEvents: data1
              - cloudEvents: data2
        status:
          description: Controlled by System only
          type: string
          default: SUCCESS
          enum:
            - SUCCESS
            - FAILURE
          examples:
            - SUCCESS
        retryStatus:
          description: Indicates whether the delivery can be retried
          type: string
          default: NORETRY
          enum:
            - NORETRY
            - RETRY
          examples:
            - NORETRY
        responseHeaders:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Headers included in the webhook's response.
          examples:
            - Content-Type: application/json
        responseBody:
          type: string
          description: The body of the response from the webhook.
          examples:
            - error: Internal processing error
        subject:
          type: string
          description: The cloud event subject.
          examples:
            - events.<workspaceId>.<webhookId>
        batchId:
          type: string
          description: Unique identifier for the batch of deliveries.
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        failureId:
          type: string
          description: Unique identifier of the delivery failure.
          format: uuid
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        description:
          type: string
          description: >
            Human-readable description of the delivery. For single event
            deliveries, this is the event type. For batch deliveries, this is a
            string like "Batch of 10 events".
    SubscriptionResponse:
      type: object
      description: Outlines the details of a subscription response.
      required:
        - id
        - type
        - serviceManager
        - eventType
        - resourceUri
        - webhook
        - hpePrincipal
        - apiGroup
        - createdBy
        - createdAt
        - updatedAt
        - generation
        - updatedBy
        - friendlyName
      properties:
        id:
          type: string
          description: Unique identifier of the subscription.
          format: uuid
          examples:
            - 0908777a-788f-45da-afb8-295c626e4d14
        type:
          type: string
          description: The type of the resource.
          const: events/subscription
        serviceManager:
          type: string
          description: The service manager name.
          examples:
            - 00000000-0000-0000-0000-000000000000
        apiGroup:
          type: string
          description: The name of the publisher.
          examples:
            - Sample Publisher
        eventType:
          type: string
          description: The subscription type name.
          examples:
            - com.hpe.greenlake.sample-publisher.v1beta1.sample-event1
        friendlyName:
          type: string
          description: UI friendly title for the event Type.
          examples:
            - Sample Event
        description:
          type: string
          description: The subscription description.
          examples:
            - Custom Role Created
        resourceUri:
          type: string
          description: URI to the subscription.
          examples:
            - /events/v1beta1/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6
        webhook:
          $ref: '#/components/schemas/WebhookResourceResponseRef'
        hpePrincipal:
          type: string
          description: Security principal subject notation.
          examples:
            - user:<opaque-global-id>
        createdBy:
          type: string
          description: The user that created the subscription.
        createdAt:
          type: string
          format: date-time
          description: The date and time the subscription is created.
        updatedBy:
          type: string
          description: The user that updated the subscription.
        updatedAt:
          type: string
          format: date-time
          description: The last date and time the subscription is updated.
        generation:
          type: integer
          minimum: 0
          description: >-
            Monotonically increasing update counter to track the subscription
            version.
          examples:
            - 1
        eventFilter:
          type: string
          description: The filter to apply to events.
          examples:
            - createdAt lt 2021-05-12T07:20:00.00Z
    GetSubscriptionListResponse:
      type: object
      description: A list response format for subscriptions.
      required:
        - items
        - count
        - offset
        - total
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionResponse'
          description: >-
            An array of subscription objects, each representing a unique
            subscription.
        count:
          type: integer
          description: >-
            The number of subscription objects returned in the `items` array for
            the current request.
        offset:
          type: integer
          description: >-
            The zero-based index in the complete list of retrieved subscriptions
            that marks the beginning of the response.
        total:
          type: integer
          description: >-
            The total number of subscriptions available in the system that match
            the provided query or filters.
    RecentDeliveriesResponse:
      type: object
      description: Provides a list of RecentDeliveriesResponse objects
      required:
        - items
        - count
        - offset
        - total
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RecentDeliveryResponse'
          description: >-
            An array of failure response objects that detail each failed
            delivery attempt associated with a specific webhook.
        count:
          type: integer
          description: >-
            The number of failure response objects contained in the `items`
            array for the current response.
        offset:
          type: integer
          description: >-
            The zero-based index in the complete list of failures that marks the
            start of the current set of data.
        total:
          type: integer
          description: >-
            The total number of delivery failures recorded in the system that
            match the provided query or filters.
    ApiError:
      type: object
      description: A generic error schema used across the API for error handling.
      required:
        - errorCode
        - message
        - debugId
        - httpStatusCode
      properties:
        httpStatusCode:
          type: integer
          description: HTTP equivalent status code
        message:
          type: string
          description: User-friendly error message
        debugId:
          type: string
          format: uuid
          description: Unique identifier for the instance of this error
        errorCode:
          type: string
          description: Unique identifier for the instance of this error
