Format of event data sent in webhook

345
1
08-20-2019 01:09 PM
Highlighted
New Contributor III

Is the survey data attached to the webhook payload URL formatted in JSON? Is there an example of what it would look like? 

I assume it looks like the following:

{"fields":

      {

         "Attribute1": value,

         "Attribute2": value,

         "Attribute3": value

      }

}

Reply
0 Kudos
1 Reply
Highlighted
Esri Esteemed Contributor

Hi Mario,

We plan on providing formal documentation on the webhook payload in the future; it's a bit more complex and part of it will be dependent on the structure of the form as well.  The easiest way to get a payload for your form is to register a webhook and observe the submission attempt in a browser's developer tools.

At a high level, the payload is a JSON object:

{ 
    "eventType": "add"|"edit",
    "portalInfo": {},
    "surveyInfo": {},
    "userInfo": {},
    "applyEdits": [],
    "response" : {},
    "feature": {}
}

The feature resource will be the most direct access point to the survey data, with a set of question:answer key/values.

Reply
0 Kudos