我开发工作任务的小脚本,我需要删除使用API从smartsheet行,但我不知道我究竟做错了。这是我的代码:如何使用smartsheet API来删除任务和谷歌Apps脚本
function deleteRow(rowId){
var url = "https://api.smartsheet.com/2.0/sheets/"+sheet_id+"/rows";
Logger.log(rowId);
var options = {
"headers": {"authorization": "Bearer 4qg7ryl8bugi51ziuuq6a9mey0"},
"parameters": {"ids": "6469321685788548"},
"method": "delete",
"contentType": "application/json",
muteHttpExceptions: true
};
var response = UrlFetchApp.fetch(url, options);
Logger.log(response);
}
sheet_id是写入任务的地方。 rowId是我想要删除的内容。我得到的错误是:
[17-12-27 12:28:12:149 CET] {
"errorCode" : 1009,
"message" : "A required parameter is missing from your request: ids.",
"refId" : "5er1e7ha2p0n"
}
任何人都知道如何使它工作?
感谢的回报。
你可能想仔细检查你的变量,特别是'sheet_id',如果它有一个值。 –