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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives