Skip to content

Webhook API - v1beta1 (v1beta1)

API for registering and managing HTTP webhooks and subscriptions.

Overview
License

HPE License

Languages
Servers
Mock server

https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/event/public/openapi/webhook-v1beta1/webhook-v1beta1-nbapi/

https://global.api.greenlake.hpe.com/

Webhooks

Everything about Webhooks

Operations

Subscriptions

Everything about Subscriptions

Operations

Create a new subscription

Request

Register a new subscription to start receiving event notifications through the configured webhook

Security
Bearer
Bodyapplication/jsonrequiredArray [
eventTypestringrequired

The type of event to subscribe. Events Standard

webhookobject(WebhookResourceInputRef)required

A reference to a specific webhook resource, providing a link (URI) directly to the referenced webhook.

webhook.​resourceUristringrequired

URI to the webhook

eventFilterstring

The filter to apply to events.

]
curl -i -X POST \
  https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/event/public/openapi/webhook-v1beta1/webhook-v1beta1-nbapi/events/v1beta1/subscriptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "eventType": "com.hpe.greenlake.sample-publisher.v1beta1.sample-event1",
      "webhook": {
        "resourceUri": "/events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000"
      }
    }
  ]'

Responses

Subscription successfully registered.

Headers
Locationstring(uri-reference)

URI to get details of the subscription creation operation.

Examples:
/events/v1beta1/subscriptions/123e4567-e89b-12d3-a456-426614174000
Bodyapplication/jsonArray [
idstring(uuid)required

Unique identifier of the subscription.

typestringrequired

The type of the resource.

Value "events/subscription"
serviceManagerstringrequired

The service manager name.

eventTypestringrequired

The subscription type name.

resourceUristringrequired

URI to the subscription.

webhookobject(WebhookResourceResponseRef)required

The response schema for WebhookSubscription.

webhook.​resourceUristringrequired

URI to the webhook

hpePrincipalstringrequired

Security principal subject notation.

apiGroupstringrequired

The name of the publisher.

createdBystringrequired

The user that created the subscription.

createdAtstring(date-time)required

The date and time the subscription is created.

updatedAtstring(date-time)required

The last date and time the subscription is updated.

generationinteger>= 0required

Monotonically increasing update counter to track the subscription version.

updatedBystringrequired

The user that updated the subscription.

friendlyNamestringrequired

UI friendly title for the event Type.

descriptionstring

The subscription description.

eventFilterstring

The filter to apply to events.

]
Response
application/json
[ { "id": "0908777a-788f-45da-afb8-295c626e4d14", "type": "events/subscription", "serviceManager": "00000000-0000-0000-0000-000000000000", "apiGroup": "Sample Publisher", "eventType": "com.hpe.greenlake.sample-publisher.v1beta1.sample-event1", "friendlyName": "Sample Event", "description": "Custom Role Created", "resourceUri": "/events/v1beta1/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6", "webhook": {}, "hpePrincipal": "user:<opaque-global-id>", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedBy": "string", "updatedAt": "2019-08-24T14:15:22Z", "generation": 1, "eventFilter": "createdAt lt 2021-05-12T07:20:00.00Z" } ]

Get all subscriptions for a webhook

Request

Retrieves a list of subscriptions associated to webhooks, organized in descending order based on their creation time.

Pagination: This endpoint exclusively supports offset-based pagination.

Filtering: Following are the supported filter parameters : webhookId

Security
Bearer
Query
filterstring(uuid)(Filter)required

Filter subscriptions events using an OData V4 formatted filter string.

Default ""
Examples:

Returns subscriptions for a user within a particular webhook.

filter=webhookId eq '123e4567-e89b-12d3-a456-426614174000'
limitinteger(int64)[ 1 .. 10 ]

Specifies the number of results to be returned. The default value is 10.

Default 10
offsetinteger(int64)>= 0

Specifies the zero-based resource offset to start the response from. The default value is 0.

Default 0
curl -i -X GET \
  https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/event/public/openapi/webhook-v1beta1/webhook-v1beta1-nbapi/events/v1beta1/subscriptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Subscriptions retrieved successfully.

Bodyapplication/json
itemsArray of objects(SubscriptionResponse)required

An array of subscription objects, each representing a unique subscription.

items[].​idstring(uuid)required

Unique identifier of the subscription.

items[].​typestringrequired

The type of the resource.

Value "events/subscription"
items[].​serviceManagerstringrequired

The service manager name.

items[].​eventTypestringrequired

The subscription type name.

items[].​resourceUristringrequired

URI to the subscription.

items[].​webhookobject(WebhookResourceResponseRef)required

The response schema for WebhookSubscription.

items[].​webhook.​resourceUristringrequired

URI to the webhook

items[].​hpePrincipalstringrequired

Security principal subject notation.

items[].​apiGroupstringrequired

The name of the publisher.

items[].​createdBystringrequired

The user that created the subscription.

items[].​createdAtstring(date-time)required

The date and time the subscription is created.

items[].​updatedAtstring(date-time)required

The last date and time the subscription is updated.

items[].​generationinteger>= 0required

Monotonically increasing update counter to track the subscription version.

items[].​updatedBystringrequired

The user that updated the subscription.

items[].​friendlyNamestringrequired

UI friendly title for the event Type.

items[].​descriptionstring

The subscription description.

items[].​eventFilterstring

The filter to apply to events.

countintegerrequired

The number of subscription objects returned in the items array for the current request.

offsetintegerrequired

The zero-based index in the complete list of retrieved subscriptions that marks the beginning of the response.

totalintegerrequired

The total number of subscriptions available in the system that match the provided query or filters.

Response
application/json
{ "items": [ {} ], "count": 0, "offset": 0, "total": 0 }

Delete subscription for a webhook

Request

Delete the list of subscriptions by the IDs, stopping further event notification linked to the subscriptions

Security
Bearer
Query
idArray of strings(uuid)required

The ID of the subscription to delete.

Default "id=0908777a-788f-45da-afb8-295c626e4d14"
Examples:

Delete all subscriptions based on the IDs

id=0908777a-788f-45da-afb8-295c626e4d14&id=0908777a-788f-45da-afb8-295c626e4d11&id=0908777a-788f-45da-afb8-295c626e4d12
curl -i -X DELETE \
  'https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/event/public/openapi/webhook-v1beta1/webhook-v1beta1-nbapi/events/v1beta1/subscriptions?id=id%3D0908777a-788f-45da-afb8-295c626e4d14' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

No Content

Response
No content

Update subscription with specific IDs

Request

Update all subscription identified by the given IDs.

Security
Bearer
Bodyapplication/merge-patch+jsonrequiredArray [
subscriptionIdstringrequired

Subscription Id to update.

eventTypestringrequired

The type of event to subscribe. Events Standard

webhookobject(WebhookResourceInputRef)required

A reference to a specific webhook resource, providing a link (URI) directly to the referenced webhook.

webhook.​resourceUristringrequired

URI to the webhook

eventFilterstring

The filter to apply to events.

]
curl -i -X PATCH \
  https://stage-developer-portal-hpe.redocly.app/_mock/docs/greenlake/services/event/public/openapi/webhook-v1beta1/webhook-v1beta1-nbapi/events/v1beta1/subscriptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '[
    {
      "subscriptionId": "string",
      "eventType": "com.hpe.greenlake.sample-publisher.v1beta1.sample-event1",
      "webhook": {
        "resourceUri": "/events/v1beta1/webhooks/123e4567-e89b-12d3-a456-426614174000"
      }
    }
  ]'

Responses

Successfully updated the given subscription

Bodyapplication/jsonArray [
idstring(uuid)required

Unique identifier of the subscription.

typestringrequired

The type of the resource.

Value "events/subscription"
serviceManagerstringrequired

The service manager name.

eventTypestringrequired

The subscription type name.

resourceUristringrequired

URI to the subscription.

webhookobject(WebhookResourceResponseRef)required

The response schema for WebhookSubscription.

webhook.​resourceUristringrequired

URI to the webhook

hpePrincipalstringrequired

Security principal subject notation.

apiGroupstringrequired

The name of the publisher.

createdBystringrequired

The user that created the subscription.

createdAtstring(date-time)required

The date and time the subscription is created.

updatedAtstring(date-time)required

The last date and time the subscription is updated.

generationinteger>= 0required

Monotonically increasing update counter to track the subscription version.

updatedBystringrequired

The user that updated the subscription.

friendlyNamestringrequired

UI friendly title for the event Type.

descriptionstring

The subscription description.

eventFilterstring

The filter to apply to events.

]
Response
application/json
[ { "id": "0908777a-788f-45da-afb8-295c626e4d14", "type": "events/subscription", "serviceManager": "00000000-0000-0000-0000-000000000000", "apiGroup": "Sample Publisher", "eventType": "com.hpe.greenlake.sample-publisher.v1beta1.sample-event1", "friendlyName": "Sample Event", "description": "Custom Role Created", "resourceUri": "/events/v1beta1/subscriptions/3fa85f64-5717-4562-b3fc-2c963f66afa6", "webhook": {}, "hpePrincipal": "user:<opaque-global-id>", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedBy": "string", "updatedAt": "2019-08-24T14:15:22Z", "generation": 1, "eventFilter": "createdAt lt 2021-05-12T07:20:00.00Z" } ]