How to query database via REST API?

Back again, for a niche query…
I’m using the rest api to.connect to a db. I want to pull specific data from the db and must query the db in the api URL, using a parameter.
Whilst I can do that (after much searching and testing), I’m struggling to make the query variable dynamic.
I’m currently using A+B+C for the API call, where B is the dynamic value. But the result is a string that starts with " and the API call can’t be initialised.
I have a suspicion I need to make thise dynamic data an object, or a parameter of an object instead. Anyone got a way to do.tht or, alternatively, solve the original problem?

Hi @young_newt, I’m not really following what this means. You mean you’re querying a URL like this

"<https://example.com/data?key=>" + dynamicValue + "&sort=1"

But you’re getting an empty string?

Thanks for the reply Yang.
It’s a URL like that, yes.
The query I want to perform requires an array.
However, I’ve created three meta params, which I concatonate to use for the API URL.

So
A is
https://example.com/data?key=[{“colour”:”
B is
$dynamicValue
C is
",“size”:“medium”}]

A+B+C is used as the API call URL, but I cannot get it to work. Whereas if I use no dynamic value and write the API call query out fully as text, it works.

Wondering if I’m doing something wrong?

Can you look in the network tab and see what is actual URL being used?

You legend.
From that suggestion alone, I’ve resolved the issue. The parameters were not complete and the URL was slightly off.