Accessing sheets within workspaces using the Smartsheet API
Hi!
I am attempting to pull sheets from inside one of my workspaces using the api, but have run into issues passing both the workspace id and sheet id to GET in sequence. For example, I am able to useGET /workspaces/{workspaceid}
to retrieve the workspace object and its contents, but how would I go about using a GET command to retrieve a nested sheet object from within this workspace?
Essentially what I would like to do is as follows, but I think I may be a bit off on the syntax.
GET /workspaces/{workspaceid}/{sheet_id}
Any input would be appreciated.
Best Answer
-
Kevin St-Pierre ✭✭✭
Hi Tanner,
Since 'SheetId' is a unique value, you do not need to specify a workspace when using the GET function.
GET /workspaces/{workspaceid}
- will allow you to retrieve the list of all sheets, folders, reports, templates, etc, that belongs to the workspace and return the objects Ids.GET /sheets/{sheetId}
- will return the specified sheet details, regardless of its workspace (as long as the credentials/token you are using in your request has proper access to that sheet)You can find more information about the
GET Sheet
request here:https://smartsheet-platform.github.io/api-docs/#get-sheet
Answers
-
Kevin St-Pierre ✭✭✭
Hi Tanner,
Since 'SheetId' is a unique value, you do not need to specify a workspace when using the GET function.
GET /workspaces/{workspaceid}
- will allow you to retrieve the list of all sheets, folders, reports, templates, etc, that belongs to the workspace and return the objects Ids.GET /sheets/{sheetId}
- will return the specified sheet details, regardless of its workspace (as long as the credentials/token you are using in your request has proper access to that sheet)You can find more information about the
GET Sheet
request here:https://smartsheet-platform.github.io/api-docs/#get-sheet -
Perfect! Thank you Kevin