I have to get all dynamic templates using sendgrid API.
According to Sendgrid docs, I have to pass a query param to the API endpoint, to be like this:
But it seems like I cannot pass that query param since I have to choose the endpoint from the dropdown.
Anyway, I can always create a JS query and request sendgrid API from there, but this way I have to pass the
SENGRID_API_KEY as an Auth Header, which I have already set on my resource config.
So it doesn't seem to be the right way to go.
Any suggestions are welcome
I believe we just updated this spec … but it looks like we are missing the query parameters option for this? I’ll have to check and confirm. Are you able to filter the returned results by generation = dynamic after they have been pulled in?
Actually I cannot filter by generation, because by default (i.e without query params), it fetches the template with
generation = legacy
In the meantime, I created a JS query and tried to fetch from sendgrid API using
XMLHttpRequest but got a CORS error.
Here's my query:
And the error:
Hmmm - Should be able to access this endpoint via a generic REST API query and specify the params you need: