创建带有子作用域的Webhook

桑迪T。
编辑05/19/23 API和开发者

你好,

我试图通过有效载荷创建一个webhook,请求体如下所示,这是API文档中的一个例子,它失败了,并返回了一个HTTP状态码400。

{"callbackUrl": "https://www.myApp.com/webhooks", "enabled": true, "events": ["*.]*"], "name": "Webhook for Sheet Creation", "version": 1, "scopeObjectId": 3285357287499652, "scope": " Sheet ", "subscope": [{"columnIds": [7960873114331012, 8731310160793142]}]}

身体反应:

{"errorCode": 1008, "message": "无法解析请求。发生以下错误:字段“subscope”的类型出乎意料。","refId": "kicl2j"}

然后,我试图删除子范围内的方括号,即:

{"callbackUrl": "https://www.myApp.com/webhooks", "enabled": true, "events": ["*.]*"], "name": "Webhook for Sheet Creation", "version": 1, "scopeObjectId": 3285357287499652, "scope": " Sheet ", "subscope": {"columnIds": [7960873114331012, 8731310160793142]}}

它也失败了,返回了一个HTTP状态码400。

身体反应:

{"errorCode": 1032, "message": " webhook属性"。, "refId": " 908wuo "}


有人知道什么线索吗?

列的类型重要吗?我使用的列类型包括“PICKLIST”和“CONTACT_LIST”。

最佳答案

答案

Hi @Shravan A<\/a> <\/p>

Smartsheet publishes a DNS A record at aws.relay.smartsheet.com which can be added to the Allowlist in your firewall. We recommend using the DNS record and not<\/strong> IP addresses because our IP addresses may change in the future. <\/p>

Here's the link to Authenticating Webhooks<\/a> in the API documentation. <\/p>

Cheers,<\/p>

Genevieve<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":320,"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":105733,"type":"question","name":"Reseting a row parentId","excerpt":"Hi, For some needs, i would like to reset the parentId value of a given row. what value should i be using to force the parentId to be reset ? I tried :0; null; \"0\"; \"null\" and none of them made any positive result :","categoryID":320,"dateInserted":"2023-05-26T14:22:47+00:00","dateUpdated":"2023-05-26T14:40:07+00:00","dateLastComment":"2023-05-26T20:12:12+00:00","insertUserID":105856,"insertUser":{"userID":105856,"name":"Etienne Mermillod","url":"https:\/\/community.smartsheet.com\/profile\/Etienne%20Mermillod","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!mjjbH0nZWJQ!cu9Yh9XS-Xo!wwrdU3Cq-QN","dateLastActive":"2023-05-26T20:49:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭"},"updateUserID":91566,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-06T19:28:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":41,"score":null,"hot":3370244699,"url":"https:\/\/community.smartsheet.com\/discussion\/105733\/reseting-a-row-parentid","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/105733\/reseting-a-row-parentid","format":"Rich","lastPost":{"discussionID":105733,"commentID":377787,"name":"Re: Reseting a row parentId","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/377787#Comment_377787","dateInserted":"2023-05-26T20:12:12+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-06T19:28:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/8JN94KOJFPH3\/image.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-05-26T19:50:49+00:00","dateAnswered":"2023-05-26T19:47:30+00:00","acceptedAnswers":[{"commentID":377776,"body":"

Are you trying to outdent a row?<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":320,"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":105573,"type":"question","name":"How to update picklist column","excerpt":"Hi, Currently I have a few columns which contain individual list items, but when I send an update through the API they appear as a single string Is there a specific way I need to be sending list items so that each item appears individually?","categoryID":320,"dateInserted":"2023-05-23T11:04:52+00:00","dateUpdated":null,"dateLastComment":"2023-05-24T14:36:12+00:00","insertUserID":161700,"insertUser":{"userID":161700,"name":"Jagdeep","url":"https:\/\/community.smartsheet.com\/profile\/Jagdeep","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-05-25T10:01:33+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-06T19:28:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":65,"score":null,"hot":3369780664,"url":"https:\/\/community.smartsheet.com\/discussion\/105573\/how-to-update-picklist-column","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/105573\/how-to-update-picklist-column","format":"Rich","tagIDs":[227,334,446],"lastPost":{"discussionID":105573,"commentID":377376,"name":"Re: How to update picklist column","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/377376#Comment_377376","dateInserted":"2023-05-24T14:36:12+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-06T19:28:40+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-05-24T14:31:01+00:00","dateAnswered":"2023-05-23T13:12:19+00:00","acceptedAnswers":[{"commentID":377108,"body":"

There needs to be a line break delimiter between options.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":320,"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":227,"urlcode":"api-and-developers","name":"API and Developers"},{"tagID":334,"urlcode":"automations","name":"Automations"},{"tagID":446,"urlcode":"update-requests","name":"Update Requests"}]}],"title":"Trending in API & Developers","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

API和开发者趋势