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

  • jmyzk_cloudsmart_jp
    jmyzk_cloudsmart_jp Community Champion
    edited 01/09/25

    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"

  • Hi @jmyzk_cloudsmart_jp


    Thank you for your response. I noticed in the Java SDK implementation that the sheets/{{taskSheetId}}/shares endpoint includes a parameter include=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 or item, as mentioned in the documentation, has no effect on the response. Furthermore, there is no usage of the sharingInclude 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 between sharingInclude and include.

    Here is code sample of java sdk code source

    Best wishes
    Buren