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
- 63.7K Get Help
- 406 Global Discussions
- 218 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives