Join the Webstudio community

Updated 4 weeks ago

Callback for api resources?

Is there a way to manipulate the response from an api resource on the WS serverside before it is made avaiable in body->settings and injected into the page.
I'm using an endpoint that does not support sorting: https://api.utdanning.no/onet/onet_by_yrke and i would be great if i could do the sorting on the response before the data is sent to to the DOM in ws.
I could do the fetch with a script in an embed, but then i would have to insert the data into the dom myself? Or is there a way of doing this that is easier?
B
b
O
3 comments
This requires some backend wrapper like worker. There is no way to do sorting out of the box for now.
Thanks for the quick response (unsorted) πŸ™‚
Yeah, its kindof the job of the API/backend to do data manipulation like sorting etc
Add a reply
Sign up and join the conversation on Discord