Documentation Discrepancy in "List Report Shares" API Parameters
Hi Team,
I hope you’re having a great day.
I have a question regarding the List Report Shares API and its parameters. The documentation mentions using sharingInclude=workspace
, but it seems to have no effect on the response. Upon reviewing the Java SDK source code, I noticed the parameter include=workspaceShares
is used instead, and it works as expected.
Could you confirm if this is a documentation error?
Looking forward to your clarification.
Best regards,
Buren
Answers
-
Hi @Buren
I tested the option with Python code using Smartsheet Python SDK and found it did make a difference.
As shown below, with "include_workspace_shares = True", I got workspace share.
The sample code for Java is as follows;
// Omit pagination parameters
PagedResult<Share> shares = smartsheet.reportResources().shareResources().listShares(
665829219035012L, // long reportId
null, // PaginationParameters
true // Boolean includeWorkspaceShares
);So, what is misleading is this part.
query Parameters
sharingInclude
string
When applicable for the specific object this parameter defines the scope
of the share. Possible values are ITEM or WORKSPACE. ITEM is an item-level
share (that is, the specific object to which the share applies is shared with
the user or group). WORKSPACE is a workspace-level share (that is, the
workspace that contains the object to which the share applies is shared
with the user or group).
Enum: "ITEM" "WORKSPACE"
-
Thank you for your response. I noticed in the Java SDK implementation that the
sheets/{{taskSheetId}}/shares
endpoint includes a parameterinclude=workspaceShares
. This parameter is not documented but is actually effective. I believe this parameter should be documented.Additionally, when using cURL to directly call the HTTP endpoint, the parameter
sharingInclude=workspace
oritem
, as mentioned in the documentation, has no effect on the response. Furthermore, there is no usage of thesharingInclude
field in the Java SDK implementation. I believe this is an error in the documentation, as it seems there’s a mix-up or mistake betweensharingInclude
andinclude
.Here is code sample of java sdk code source
Best wishes
Buren
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 448 Global Discussions
- 145 Industry Talk
- 481 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 73 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives