API Question
I'm trying to get a list of all the shares for a sheet. This would include all the item shares(someone shared this specific sheet) and the workspace shares (someone can access the sheet because the workspace was shared.
According to the API documentation this call should do it:
curl --silent "https://api.smartsheet.com/2.0/sheets/$Sheet_ID/shares?includeAll=true&sharingInclude=WORKSPACE&accessApiLevel=1" -H "Authorization: Bearer $token
All I am getting back are the ITEM shares.
Thanks.
/marc
Best Answers
-
-
Hi @Jeff Reisman and @marc4
Thanks for bringing this up! I also saw the same behaviour when following the API the documentation - I checked in with our team and it looks like the documentation incorrectly states what parameters to include.
The Item shares is the default, but you can get Workspace shares with
include=workspaceShares
I've submitted feedback on our documentation so it will be updated in the future.
Thanks again!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thanks
/marc
Answers
-
I'm seeing the same behavior. Weird. Looks like you'll have to make two calls to get both sheet shares and workspace shares and then join your results.
https://api.smartsheet.com/2.0/workspaces/{workspaceId}/shares?includeAll=true&accessApiLevel=1
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
-
Hi @Jeff Reisman and @marc4
Thanks for bringing this up! I also saw the same behaviour when following the API the documentation - I checked in with our team and it looks like the documentation incorrectly states what parameters to include.
The Item shares is the default, but you can get Workspace shares with
include=workspaceShares
I've submitted feedback on our documentation so it will be updated in the future.
Thanks again!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thanks
/marc
-
Thanks @Genevieve P. !
Always happy to see documentation get updated. A while back I sent in revisions to the help page for the HAS function. It took a month or two, but they finally were made! 😂
I'm brand new to using the Smartsheet API. We've acquired some new software tools and I'm having a grand time using the API to add connectivity between Smartsheet and other data sources and databases. Keeping my data in sync between Smartsheet and other databases has just gotten a lot more robust and reliable.
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Haha yes - they will get updated eventually!
On the main Help Articles there are feedback buttons - please do use them as you're looking for information. We always appreciate hearing how we can improve and help you find answers!
Glad to hear you're having fun with the API 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
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