API to retrieve data requires a POST not a GET

Hi all

I’ve created an API endpoint and a function so we can use PowerBI to get data from Liberty Create. It’s working well, however…

It’s using search action to retrieve the data, with no requests set so it just returns all records.

I and colleagues find it odd that a search function requires a POST rather than a GET (as its not updating or adding records, just viewing them)

Can anyone explain this?

Is there a better way to do what i’m doing?

Hi Kevin,

Pre 2020-.2, Create supported both GET and POST with Generic APIs (but it was a well kept secret), try it with POSTMAN or similar to check it out. With 2020.2, the full range of verbs is supported (again just wiith Generic APIs - and you can select then in the build studio so have different responses for different functions).

My personal preference with non Create-to-Create APIs is to use Generic ones so you don’t have the “payload” envelope - but the down side is setting up the packets in JSON or XML yourself - and probably having to use templates.

However if you do use Create APIs, then a POST is required - as the function comes over as part of the payload.

Ah, that’s good to know, shame i’d have to create the payload as its pretty complex, but good to know the reason.