Skip to main content
Solved

List all options of single select from api

  • January 13, 2020
  • 2 replies
  • 64 views

Forum|alt.badge.img+10

Hi,
I would to retrieve an array of all single select options from the api. but i dont know if its stored anywhere…
Is it possible?

Best answer by Yoav_Malichi

Yes!
This is possible.
Visit the Meta API documentation.
Through this (see image below) GET request you can iterate over the tables (a list), check for your specific name (table name), and once you hit the desired name, iterate over the fields, until you reach the field name / id you desire. If the field type is either singleSelect or multipleSelects then you’ll have an additional options key, and inside it you’ll have choices key, which includes a list of the options to choose from. Inside every choice object, the name key is what you’re asking for.

An Image from the API documentation to illustrate the kind of payload you expect to receive (no singleSelect / multiSelect examples there, these are from my own experience)

Enjoy :slightly_smiling_face:

2 replies

  • New Participant
  • 2 replies
  • February 2, 2021

Did this ever get resolved? I am also curious how to accomplish this.


Forum|alt.badge.img+3
  • New Participant
  • 2 replies
  • Answer
  • September 22, 2022

Yes!
This is possible.
Visit the Meta API documentation.
Through this (see image below) GET request you can iterate over the tables (a list), check for your specific name (table name), and once you hit the desired name, iterate over the fields, until you reach the field name / id you desire. If the field type is either singleSelect or multipleSelects then you’ll have an additional options key, and inside it you’ll have choices key, which includes a list of the options to choose from. Inside every choice object, the name key is what you’re asking for.

An Image from the API documentation to illustrate the kind of payload you expect to receive (no singleSelect / multiSelect examples there, these are from my own experience)

Enjoy :slightly_smiling_face: