Delete Verb Parameter Issues

Options

I have the following endpoint

DELETE /resourcefiles/{resourcefiles_id}

In WeWeb I'm using the following

DELETE https://----.xano.io/----/resourcefiles/10,9,8

When I try this out I get the following

Xano appears to be doing some type checking against the parameter and failing right away even before entering the loop.

I know that I can change this to POST and get further along, but why can I use DELETE this way to delete the records?

This kind of seems like a bug to me.

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    This is kind of a nonstandard way of using a DELETE endpoint, which is why it's giving you a little guff. But it can still work!

    My suggestion: Change the input type from integer[] to a string. Then make an array out of it by creating a variable (ids) with a starting value of the input, then add a filter of split with an argument of ",". Now instead of "1,2,3" you will have ["1", "2", "3"]. Then you can for-each over ids because its an array, and the rest is up to your delete record call!

    We discuss this kind of work making Xano dance in our State Change Pro daily office hours calls. If this problem persists, please join us for one next week! Here's a guest pass to join one with my compliments: https://tickets.statechange.ai/ticket/bd39a0fb-a103-466a-880b-0e625c39fdd6

  • pete letkeman
    Options

    thankyou