I'm using the GET /sheets call to list all of a user's Smartsheets but am having an issue. The response object contains most of the user's sheets, but doesn't contain any sheets where the user's accessLevel is OWNER.
Here is the call I'm making:
GET https://api.smartsheet.com/2.0/sheets/
With a header
Key: Authorization
Value: Bearer <access token here>
Is there a setting or API parameter I'm missing?
I looked through the Smartsheet API docs and FAQ for answers but couldn't find anything related so apologies if this is already answered somewhere.
As described in the API docs, the List Sheets operation should return all of the sheets that the user (access token owner) has access to -- including any sheets that the user owns (accessLevel = OWNER
) or has otherwise been granted access to. I've never seen it not work this way. A couple of thoughts / troubleshooting suggestions:
Is it possible that the user to whom the Bearer
token belongs does not actually own any sheets (i.e., that they have access to sheets because they've been "shared" to sheets, but aren't actually the owner of the sheets)?
If you have access to an API access token that belongs to user who has Admin rights in Smartsheet (within the same Org as the User for whom you're trying to identify "owned" sheets), you could execute a List Org Sheets request and examine its response (which will contain all sheets owned by members of the organization to which the Admin belongs) for any sheet objects where owner or ownerId corresponds to the user for whom you're trying to identify "owned" sheets. The number of sheets "owned by" userX in the Get Org Sheets response (using the Admin token) should match the number of sheets where accessLevel = OWNER
in the Get Sheets response (using UserX's token).
Update (re paging):
Also note that the Get Sheets operation is one of several Smartsheet API operations that support paging of results. If you're not seeing the sheets you expect to see in the API response, it's possible that results are being paged and it just so happens that the objects you're looking for are not contained within the initial page of results (default page size = 100). To see if this is the case, you could try including the includeAll=true
querystring parameter on the API request URL (which tells Smartsheet to not page the results -- i.e., all results should be included within the response).