Skip to main content
← Data, API & Backend
Data, API & Backend April 23, 2024 · 6 replies

Connect Xano API endpoint with array parameter

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Hi to Bravo community,

I have trouble to connect array parameter from Xano API endpoint. I’m not sure how to query array parameters (so any situation where are more then one value as input/output).

Can you help me please how to do it?

Thanks a lot

Robert

6 replies

Marielle Ibias Bravo team April 24, 2024

Hey @Robert Macků 👋, what do you aim to do? What’s the use case please ?

Robert April 24, 2024

Hi Marielle, I have more use cases, one of them is:

Query tests

I want to list questions when user click on Make daily test button. I have database of questions and another database with Tests. These databases are connected, in Test database is field Questions, which is array with question_ids (user_question_uuid)… I use Xano API endpoint to list these questions of one single test to the user. So I need to show all questions at once, but I don’t know how query parameters and list all values with all user_question_uuids.

Thanks a lot 🙂

Robert

Robert April 29, 2024

Hi @Marielle Ibias, can you help me pls? 🙏 I am pretty desperate.

Marielle Ibias Bravo team April 29, 2024

Hey Robert, it sounds that you’re trying to set up a nested list:
list test > list questions > question detail(if applies).

Querying an array by using a variable isn’t possible. The nested list logic should be handled in Xano generally. It can be done by using join to a test id with each question id.

We have this guide about nested lists where we use Xano:
https://docs.bravostudio.app/connect-api/browse-by-backend/xano/xano-build-nested-lists

Hope it helps!

Pawel May 10, 2024

@Marielle Ibias what we want to do here is to just pass an array as a parameter via API call for example this is a request body

{
id: 1,
array: [1,2,3]
}

Marielle Ibias Bravo team May 13, 2024

@Pawel Magdanski unfortunately, passing an array in a variable within the request body is currently not possible. You may query these data differently.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord