API Error (Client side)

I am trying to use API Action and/or API Data Source components in a project and have hit a bit of a snag. I have added an API Action (and also tried API Data Source) in combination with a Bootstrap table. The table adds ok, I can define the API Schema using static values and it all appears ok (returning the correct data in the response window while defining the schema) until I load the page.

The API starts but then errors, returning a ‘Failed to execute’ message. No data is returned to the the table. I am using parameters stored in Storage Manager instead of the static values and have output them to the page to check that the values have been set correctly.

Please help.

1 Like

Hi Ben,

Do you have a live test page that we can see the error?

Or maybe send us the exact error and some screenshots so we can see where it happens?
Try the devtools console to see what errors popup there

Hi @George
Thanks for coming back to me. I have an API endpoint that is configured to accept - and is working elsewhere - with both GET and POST requests. When the API action method is set to GET in the client side API Action it works fine but when set to POST it fails (as though no variables received).

I have set it to GET and the page is working ok but it indicates that there may be something not right in assigning POST variables in the API action.

The error message I was referring to was the message produced through a Dynamic Event alert displaying the last error message:
image
Which returned ‘Failed to execute’

My page is in a password protected area of my website. If you need access to troubleshoot, let me know so I can privately share some credentials.

Thanks
Ben

Hi @George
Looking at the info in Dev Tools it looks like the POST data is sent under OPTIONS and vice-versa.
image