On my client side, I have an array of entry IDs that match with entries in Craft
const myIds = ['230', '249', '256']
I am trying to send that array over to an Element API endpoint and use it in the id
criteria to only grab entries with the specified IDs.
I am constructing my GET request and add myIds
to the request parameters, then send it to the endpoint.
How would I access that array in parameters within element-api.php
? I found a response for Craft 2 that looks like it's similar to what I want:
(Passing multiple parameters to the Element API) which uses the getQuery()
or getRequiredQuery()
functions, but I'm not sure those still exist in Craft 3?