API - "Get Workspace folders" Method Results Not Matching Documentation
I'm making the call with the parameters matching the documentation and not getting the same results. I'm only getting "id", "name" and "permalink" for each folder. The "Responses" in the documentation includes an array with reports, sheets, sights and templates, as well as details for each of those objects.
Am I doing something incorrectly in my call, or is the documentation inaccurate?
If the documentation is inaccurate, is there a method available to accomplish the output in the documentation without looping through each folder?
Periods added below to format indenting, in the hope that it's easier to read. Didn't have success with the code format option.
Input
{
…"uri": "https://api.smartsheet.com/2.0/workspaces/7229146649651076/folders",
…"method": "GET",
…"queries": {
……"accessApiLevel": "0",
……"includeAll": "true"
…},
…"headers": {
……"Authorization": "sanitized",
……"Content-Type": "application/json"
…}
}
Sample Output with Sensitive Data Redacted
{
…"statusCode": 200,
…"headers": {
……"Date": "Wed, 31 Jul 2024 17:24:23 GMT",
……[REDACTED]
……"Content-Length": "3713"
…},
…"body": {
……"pageNumber": 1,
……"totalPages": 1,
……"totalCount": 26,
……"data": [
………{
…………"id": REDACTED,
…………"name": "REDACTED",
…………"permalink": "REDACTED"
………},
………[REDACTED]
………{
…………"id": REDACTED,
…………"name": "REDACTED",
…………"permalink": "REDACTED"
………}
……]
…}
}
Answers
-
I'm experiencing something similar now with the "Get Reports" method. Only returning five fields, versus the large array of data in the documentation.
-
Hi @adp_cl
To retrieve the contents of Sheets, Reports, and Sights within a folder using the Smartsheet API, you need to utilize the Folder ID obtained from the "Get Workspace Folder" method. Once you have the Folder ID, you should call the "Get Folder" method. This process is necessary because the "Get Workspace Folder" method typically provides basic details like "id", "name", and "permalink" for each folder, but does not include detailed information about the contents within those folders. Using the Folder ID with the "Get Folder" method allows you to access more specific details about the sheets, reports, and sights contained within that folder. So, the API document's response example is somewhat misleading.
-
Thank you, @jmyzk_cloudsmart_jp . I'm familiar with the "Get folder" method and looping through folders.
The documentation is very misleading, unless I'm missing some sort of criteria in my call. I was hopeful that I would be able to use this method instead of looping "Get folder" calls.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 464 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives