I am trying to send include
parameters with a get-sheet request smartsheet.sheets.getSheet(options) using the Node.js sdk. The API documentation is vague on how to add the include
parameters in the API call.
I found a Smartsheet Developers Blog post Demystifying Query Parameters in the Smartsheet API that provides more guidance, but the Node.js example code they provide is invalid javascript:
// Set options
var options = {
queryParameters: {
include: "attachments",
include: "source",
includeAll: true
}
};
// List sheets
smartsheet.sheets.listSheets(options)
.then(function(response) {
...
In the above code the last include
query parameter will override all of the prior values and you will be left with a options
variable that looses the "attachements" parameter:
queryParameters: {
include: "source",
includeAll: true
}
To me the obvious solutions would be for include
to take an array like:
include: ["attachments", "source"],
Any suggestions?