Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

Help to understand webhook callback JSON

API Webhooks sends Sheet column update callback JSON with multiple row and cell objects as marked updated. How do you find the correct rowID to get column values for the updated row?

For example, I changed the status of one row column from A to B and received the following JSON from webhook callback:

 

Body: {"nonce":"1934c9df-9971-5e23-b29c-b7c7c0336554","timestamp":"2016-07-07T16:51:09.180+0000","webhookId":698952342388804,"scope":"sheet","scopeObjectId":2212066904827780,"events":[{"objectType":"sheet","eventType":"updated","id":22120werw04827780,"userId": 1505423423673668,"timestamp":"2016-07-07T16:51:04.000+0000"},{"objectType":"row","eventType":"updated","id":3849032838735748,"userId":1505423423673668,"timestamp":"2016-07-07T16:51:04.000+0000"},{"objectType":"row","eventType":"updated","id":2747482187818884,"userId":1505490560673668,"timestamp":"2016-07-07T16:51:04.000+0000"},{"objectType":"cell","eventType":"updated","rowId":3849032838735748,"columnId":7979084782299012,"userId":1505490560673668,"timestamp":"2016-07-07T16:51:04.000+0000"},{"objectType":"cell","eventType":"updated","rowId":2747482187818884,"columnId":6151301319944068,"userId":1505490560673668,"timestamp":"2016-07-07T16:51:04.000+0000"},{"objectType":"cell","eventType":"updated","rowId":2747482187818884,"columnId":7979084782299012,"userId":1505490560673668,"timestamp":"2016-07-07T16:51:04.000+0000"},{"objectType":"cell","eventType":"updated","rowId":3849032838735748,"columnId":2360722098284420,"userId":1505490560673668,"timestamp":"2016-07-07T16:51:04.000+0000"}]}

 

When I try to get the row object, only one of the IDs return values. What's the logic behind multiple row IDs and which one should be used to get row object to get all column values?

Comments

  • dAVE Inden
    dAVE Inden Employee

    The payloads returned to your callback URL are "skinny" payloads and show indications of what changed in the sheet. Additional requests may be needed to determine the actual values that have changed.

    The CallbackEvent objects will show what type of event happened and the corrsponding id where the changed occurred. In the case of a cell it will provide both the rowId and columnId of the change. Otherwise the id in the CallbackEvent object is the sheetId.

    If you continue to have trouble with this feel to reach out to us at api@smartsheet.com and we can work with you directly.

This discussion has been closed.