URGENT BUG : Endpoint https://api.smartsheet.com/2.0/users/sheets giving an incorrect response

Hi Team, @Genevieve P.

We have been using this endpoint to fetch the sheets, this used to return the owner that was needed to be used in subsequent api calls with 'Assume-user'.

Somehow the above api call is returning the owner field as empty and the ownerId as a 0.
Therefore, all my processes are failing.

Can someone please check this, Is it a bug, or the response has changed ?
How do i fetch the owner for any of the above reasons ?

Thanks & Regards,
Narinder

Answers

  • Also the { "pageNumber": 1, "pageSize": 100, "totalPages": -1, "totalCount": -1, }
    are all in negative irrespective of the pageSize I mention.


    Thanks,

  • Narinder Paul
    Narinder Paul ✭✭
    edited 05/06/24

    Hi @Lee Joramo
    Sorry for troubling you again.

    Can you help me with this?
    Are you facing any similar issue.

  • Hi @Genevieve P.
    Can you help me with this issue ?

    Thanks,
    Narinder

  • Hi @Narinder Paul

    With the change to Plan Asset Ownership instead of individual Member Ownership, there will no longer be an individual "owner" of an item in the future. Here's an announcement about the gradual change that will be happening over the coming year: Changes to asset Admin permissions and new Plan Asset Admin role, now generally available!

    I would recommend getting an Admin of the sheet moving forward.

    Cheers,
    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

  • Hi @Genevieve P.

    Thanks for the response.
    I have some queries for the same.

    I have been using the /user/sheets endpoint (Fetch org sheets) to fetch all the sheets in an org. The api returned a list of all admin and user sheets along with respective owners as per the api doc. In case of user created sheets to hit any sheet specific endpoint we need to specify Assume-User in the header otherwise we are getting a 404.

    Is there an endpoint to fetch the admin, will using that in the header assume-user return a success response.

    Will really appreciate the help as I am completely blocked with my use cases

    Thanks,
    Narinder

  • Hi @Genevieve P.
    Thank you for the response.
    Have some more doubts regarding the api endpoints for the planned change mentioned above.

    The /user/sheets (Fetch all Org Sheets) as mentioned in the smartsheet api doc returned all sheets that belonged to the org even the user sheets, along with the one who created it/owner. This owner if it is was a non-admin was needed to be used as Assume-User for any subsequent api calls. Getting that field as empty is a blocker as we are not able to hit the specific sheet endpoints(404) without the assume-user.
    Is there an additional api endpoint to fetch the admin/owner ?
    Because currently all my endpoints for user are failing as i am unable to determine the assume-user for them.

    Can you please help with this?

    Thanks,
    Narinder

  • Hi @Narinder Paul

    Thank you for explaining a bit more of your scenario. Instead of listing the sheets your organization has access to, you would need to get the Users first, then assume each user individually.

    1. List Org Users (GET /users)
    2. For each user, List Sheets (GET /sheets) using Assume-User.
    3. For each sheet returned, if "accessLevel" == "OWNER", add sheet and owner to a dictionary noting that the given user owns that sheet.

    Note that System Admins cannot be assumed, so any sheets owned by System Admins won't be identified. When there are no Owners you may need to change this to look for a different access level as well.

    If you have feedback regarding the new plan asset ownership model, please submit your feature request to the Product team by creating an Idea Post in the Smartsheet Product Feedback and Ideas topic here in the Community. This will allow other users to vote on your suggestion as well.

    Thank you!
    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions