Subscriptions

List all events for a webhook subscription

Changed on

πŸ”‘

Required OAuth scope: webhooks:read.

πŸ“–

This endpoint is paginated with a page size of 250 webhook events. For more information, see the Pagination guide.

Lists all events for a given webhook subscription.

get/api/v2/webhooks/subscriptions/{subscriptionId}/events

Request

  • Base URL
    https://app.360learning.com
  • URL
    https://app.360learning.com/api/v2/webhooks/subscriptions/{subscriptionId}/events
  • Auth
    OAuth 2
    Client credentials
    Token URL: /api/v2/oauth2/token

Path parameters

subscriptionIdstring ObjectId required
Example:507f1f77bcf86cd799439011

The unique ID of the webhook subscription.

Query parameters

ltstring date-time

Filter on dates lower than the given one

gtestring date-time

Filter on dates greater than or equal the given one

Filter on createdAt property with LHS bracket notation.

Expected value format is a date (YYYY-MM-DDThh:mm:ss.sssZ). The milliseconds are always set to 0.

{
  "lt": "2020-01-01T10:30:26.000Z",
  "gte": "2020-01-01T10:30:26.000Z"
}
eq'canceled' | 'delivered' | 'failed' | 'pending' | 'sending'

Filter on values equal to the given one

Filter on status property with LHS bracket notation.

Expected value format is a string (canceled, delivered, failed, pending, sending).

{
  "eq": "canceled"
}

Headers

360-api-version'v2.0' required

The version of the API.

Response

Returns one page of 250 webhook events.

_idstring required

The unique ID of the webhook event. It corresponds to the header value webhook-id in the webhook event request delivered to your endpoint.

createdAtstring date-time required

The date and time when the webhook event was created, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

status'canceled' | 'delivered' | 'failed' | 'pending' | 'sending' required

The status of the webhook event. Options are:

  • canceled: The event delivery was intentionally interrupted.
  • delivered: The event was successfully delivered.
  • failed: The event failed to be delivered after all the retries.
  • pending: The event delivery process is not yet started.
  • sending: The event delivery is in progress following the retry schedule.
payloadobject required

The payload sent in the webhook event.

Example response

[
  {
    "_id": "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2r"
  }
]

Changes

    • warning

      added the new canceled enum value to the / response property for the response status

    • info

      added the enum value canceled to the property eq of the query request parameter status