What is Rest API?
A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data.
...
A RESTful API breaks down a transaction to create a series of small modules. Each module addresses a particular underlying part of the transaction. This modularity provides developers with a lot of flexibility.
How to set up Burti Rest API?
It is necessary to create script in server folder {{run-burti-web-api-requests.sh}} that will contain requests to the server, using the {{curl}} command-line tool:{code}
Code Block |
---|
curl "http://localhost:1402/Web_JSON_Composer.hal" -d @sample.get.data.txt > response.get1.json
curl "http://localhost:1402/Web_JSON_Composer.hal" -d @sample.get.data2.txt > response.get2.json
curl "http://localhost:1402/Web_JSON_UpdatingComposer.hal" -d @sample.post.data.txt > response.post.json |
curl "http://localhost:1402/Web_JSON_Composer.hal" -d @sample.get.data.txt > response.get1.json
curl "http://localhost:1402/Web_JSON_Composer.hal" -d @sample.get.data2.txt > response.get2.json
curl "http://localhost:1402/Web_JSON_UpdatingComposer.hal" -d @sample.post.data.txt > response.post.json
{code}
...