Skip To Content

Payloads

Once a webhook is triggered, a payload is delivered to the specified payload URL. Each event for a specific webhook type follows a similar JSON schema, containing information that is relevant to the supported event. The sections below define the properties included in the payloads and provide example payloads for organization and service webhooks.

Organization webhook payloads

The following table lists the properties included in payloads for your organization webhooks, returning information on changes and updates to the users, groups, items, and roles in your organization.

PropertyDescription
webhookName

The name of the webhook that delivered the payload.

webhookId

The ID of the webhook that delivered the payload.

portalURL

The URL of the portal to which the webhook is registered.

when

The time that the payload was delivered.

username

The user that triggered the event.

userId

The ID of the user that triggered the event.

when

The time the event occurred.

operation

The operation type performed by the user. The list below outlines the operation type property returned in the payload and their associated Portal Directory API operations:

source

The item type on which the operation was performed. This can be item, group, or user.

id

The ID of the source item on which the operation was performed.

properties

The additional properties associated with specific event triggers. The following list outlines the additional properties included in the payload. For more information on which event triggers include additional properties, see Event triggers, or click the properties below to learn more about a specific trigger and its properties.

Payload example

The following example illustrates a sample payload for an organization webhook that triggers when a specific group has been updated:

{
  "info": {
    "webhookName": "Group monitoring",
    "webhookId": "72fed926aeb74c9ca8a22aacddc6725a",
    "portalURL": "https://orgURL/portal/",
    "when": 1543192196521
  },
  "events": [
    {
      "username": "administrator",
      "userId": "173dd04b69134bdf99c5000aad0b6298",
      "when": 1543192196521,
      "operation": "update",
      "source": "group",
      "id": "173dd04b69134bdf99c5000aad0b6298",
      "properties": {}
    }
  ]
}

Geoprocessing service webhook payloads

The following table lists the properties included in payloads for geoprocessing service webhooks, returning information on changes made to your geoprocessing services.

PropertyDescription
serviceType

The service type the webhook was configured for. For feature service webhooks, this property will only return GPServer.

jobId

The ID of the geoprocessing service job.

statusURL

The geoprocessing service job status URL that can be polled to return the job's status information.

name

The webhook name.

taskName

The geoprocessing tool name.

folderName

The folder where the geoprocessing service is located.

serviceName

The geoprocessing service's name.

eventType

The property representing how the geoprocessing service job completed. Geoprocessing service webhooks do not subscribe to specific event triggers. Rather, these webhooks deliver their payloads once a geoprocessing service job has completed. These payloads list if the job was completed successfully (esriJobSucceeded), unsuccessfully (esriJobFailed), or if the job was cancelled (esriJobCancelled).

Values: esriJobSucceeded | esriJobFailed | esriJobCancelled

when

The timestamp (formatted as milliseconds since epoch) of when the job completed.

Payload example

The following example illustrates a sample payload for a geoprocessing service webhook that triggers when a geoprocessing service job is complete.

{
  "serviceType": "GPServer",
  "jobId": "jeccad3d9099d4e1591859fdb08f4d1eb",
  "statusURL": https://machine.domain.com/webadaptor/rest/services/my_Service/GPServer/jobs/jeccad3d9099d4e1591859fdb08f4d1eb?f=pjson,
  "name": "webhook1",
  "taskName": "",
  "folderName": "",
  "serviceName": "my_Service",
  "events": [
    {
      "eventType": "esriJobSucceeded",
      "when": 1652458959318
    }
  ]
}

Feature service webhook payloads

The following table lists the properties included in payloads for feature service webhooks, returning information on changes made to your feature services.

PropertyDescription
serviceType

The service type the webhook was configured for. For feature service webhooks, this property will only return FeatureServer.

changesUrl

The URL to the Extract Changes endpoint for the service. While only the event trigger and time of occurrence is included in the payload, you can access this URL to learn more about the specific changes that occurred during the event.

id

The ID of the webhook that delivered the payload.

folderName

The folder where the feature service is located.

serviceName

The feature service's name.

eventType

The event type performed on the feature service. To learn more about the change type values that you can subscribe to when configuring your webhook, see the Event triggers topic.

Values: * | FeaturesCreated | FeaturesUpdated | FeaturesDeleted | FeaturesEdited | AttachmentsCreated | AttachmentsUpdated | AttachmentsDeleted | LayerSchemaChanged | LayerDefinitionChanged | FeatureServiceDefinitionChanged

when

The timestamp (formatted as milliseconds since epoch) of when the event occurred.

Payload example

The following example illustrates a sample payload for a feature service webhook that triggers when a feature service is updated (FeaturesUpdated), deleted (FeaturesDeleted), and edited (FeaturesEdited):

{
  "serviceType": "FeatureServer",
  "changesUrl": "https://machine.domain.com/webadaptor/rest/services/Hosted/my_Service/FeatureServer/extractChanges?serverGens=12942,13026",
  "id": "84e17696-c9d8-43cc-9cf7-5aeb658db12b",
  "folderName": "Hosted",
  "serviceName": "my_Service",
  "events": [
    {
      "eventType": "FeaturesUpdated",
      "when": 1652459863334
    },
    {
      "eventType": "FeaturesDeleted",
      "when": 1652459863334
    },
    {
      "eventType": "FeaturesEdited",
      "when": 1652459863334
    }
  ]
}