Pass ID from a database query to api as an array

I have several id’s coming back from a database query in server connect. I need to pass the id’s to an api as an array. I can do a repeat, but it is not very efficient. I’ve been trying set value and all sorts of things, and searching the community with no luck. Any direction would be helpful and appreciated.

Community Page
Last updated: