Get Sheet (ID) by Name using Smartsheet API
I was wondering if there is a way to get the sheet Id of a specific sheet using the name of the sheet. Get sheet accepts the sheet id to get the sheet info, but I would like to get the sheet using the name. In Bridge, you have the option to get sheet by id or name, so I was wondering if there is a way to get it apart from using Bridge.
Answers
-
Hi @jokano1
I would use
List Sheets
to get a list of all the sheets I have access to (see here), which will bring back the sheet Name and ID. Then loop through to match the Name and get the Sheet ID for your next call.Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
It would be nice to give an example code? the link example is very limited.
-
https://api.smartsheet.com/2.0/sheets
will get you a list of all the sheets that your account has access to. 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
your link shows this….
what is it?
{
"errorCode": 1004,
"message": "You are not authorized to perform this action.",
"refId": "3f8q5g"
} -
That is not a link to a website, it's an example of the API URL that you can use, for example in Postman, to generate a list of sheets. 🙂 I've updated it so there's no hidden hyperlink which may have caused the confusion.
Here's a link to the API Documentation with more information:Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
yeah I saw the link. Can you supply a piece of code that get the sheet id from the sheet name? That's the whole point I am asking for a sample code rather than a link.
e.g. How to set a sheet name the PaginationParameters ?
Thank you.
-
I'm not a developer so I won't be the best person to help write any code; I would suggest posting in a developer forum such as StackOverflow if you would like help creating API calls.
I will say, thinking about this again, you can likely use Search Everything instead, with your key phrase as the query and then the scope being "sheetNames" if that's easier:
https://smartsheet.redoc.ly/tag/search#operation/list-search
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thanks. Do you have a developer in Smartsheet community to support users? just curious.
-
The Community is primarily a member-to-member space to ask questions, share best practices, and chat about Smartsheet with other users (versus Smartsheet staff - although we do pop in to help).
It's very likely that there are other members who are developers that may be able to give you the support you're looking for! Although I would note that the StackOverflow community linked above may be a better space for that, as it's built specifically for developers.
If you're looking for someone to create solutions on your behalf, you could post in the Community Job Board area as there are a number of consultants here in the forum that may be a good fit. You could also contact Smartsheet's Consulting Team, here if that helps!
As a side note, did the Search Everything work better for your purposes?
Cheers,
GenevieveNeed more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Got it. Thanks.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives