Webhook notification resource

The notification resource defines the shape of the data provided to your service when a webhook notification request is submitted to your registered URL.

JSON representation

Each notification generated by the service is serialized into a webhookNotifiation instance:

{
  "subscriptionId": "string",
  "expirationDateTime": "datetime",
  "resource": "relative url",
  "clientState": "string optional",
  "changeType": "updated"
}

Since multiple notifications may be submitted to your service in a single request, these are combined together in an object with a single array value:

{
  "value": [
    {
      "subscriptionId": "101010111",
      "resource": "/me/drive/root",
      "changeType": "updated",
      "clientState": "sub2"
    },
    {
      "subscriptionId": "222020202",
      "resource": "/me/drive/root",
      "changeType": "updated",
      "clientState": "sub1"
    }
  ]
}

Properties

Property Name Type description
subscriptionId String The unique identifier for the subscription resource
expirationDateTime DateTime The date and time when the subscription will expire if not updated or renewed.
resource Relative URL URL to the item where the subscription is registered.
clientState String - optional An optional string value that is passed back in the notification message for this subscription.
changeType String Indicates the type of change that generated the notification. For OneDrive, this will always be updated.