GetReport not working with Node.js
Hello,
I get an error when calling getReport ( or getReportAsCSV ).
{
statusCode: 404,
errorCode: 1006,
message: 'Not Found',
refId: 'lrrf81wvdugg'
}
The id exists ( I have double checked by calling ss.sheets.listSheets )
Here is the code I am using ( node.js )
var client = require('smartsheet');
var fs = require("fs")
// Set options
var options = {
id: 8702473624938372
};
var ss = client.createClient({ accessToken: "****************" });
// Get report
ss.reports.getReport(options)
.then(function(report) {
console.log(report);
})
.catch(function(error) {
console.log(error);
});
Thanks for your help
Answers
-
Hi @fredougo
Are you trying to get a Sheet or a Report? These are two different Smartsheet items.
From the URL it looks like the item you're looking to retrieve data from is actually a Sheet type of Smartsheet item. This means the Get Report API call will error since no Report exists with that specific ID.
Try using Get Sheet (see here) instead!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thanks Genevieve, you solved my problem!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives