Closed MarkGaox closed 2 years ago
https://apisentris.com/getting-started
This service can help us to directly manage our data in a database.
We build support for MySQL.
We use platform DreamFactory to generate the restful api of mysql. After getting the authetication, api path and https, we add corresponding configuration to configuration.json file.
If you want to try, please try the following body in postman:
{ "TaskList": ["Product:mysql:table:Operations:GET_ALL", "Product:mysql:table:Operations:GET id:8", "Product:mysql:table:Operations:DELETE id:8", "Product:mysql:table:Operations:GET_ALL"] }
It will successfully connect and show the following results:
[ "{\"resource\":[{\"id\":5,\"name\":\"jiarui\"},{\"id\":6,\"name\":\"xiaxuan\"},{\"id\":8,\"name\":\"junyu\"},{\"id\":9,\"name\":\"jiarui\"},{\"id\":10,\"name\":\"xiaxuan\"},{\"id\":11,\"name\":\"haowei\"},{\"id\":12,\"name\":\"junyu\"}]}", "{\"id\":8,\"name\":\"junyu\"}", "{\"id\":8}", "{\"resource\":[{\"id\":5,\"name\":\"jiarui\"},{\"id\":6,\"name\":\"xiaxuan\"},{\"id\":9,\"name\":\"jiarui\"},{\"id\":10,\"name\":\"xiaxuan\"},{\"id\":11,\"name\":\"haowei\"},{\"id\":12,\"name\":\"junyu\"}]}" ]
Also, if you prefer curl instead of postman, please see the following code line:
curl -X GET "https://dune.apps.dreamfactory.com/api/v2/jrdune/_table/test_table" -H "accept: application/json" -H "X-DreamFactory-API-Key: 36fda24fe5588fa4285ac6c6c2fdfbdb6b6bc9834699774c9bf777f706d05a88" -H "X-DreamFactory-Session-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI4MGMyZjNiM2I0YTZjODIwMDgwMmFmYzZmODNlNzY1MyIsImlzcyI6Imh0dHBzOi8vZHVuZS5hcHBzLmRyZWFtZmFjdG9yeS5jb20vYXBpL3YyL3N5c3RlbS9hZG1pbi9zZXNzaW9uIiwiaWF0IjoxNjM4MjQ4NzkwLCJleHAiOjE2MzgzMzUxOTAsIm5iZiI6MTYzODI0ODc5MCwianRpIjoiVHBmdEZobzBsV1FVNzFLZSIsInVzZXJfaWQiOjEsImZvcmV2ZXIiOmZhbHNlfQ.qwm8ss75mMeW2fOe_vFQTmYawg_Iicynh_g-XkVFTVk"
FY
I
Another test after adding POST
{
"TaskList": ["Product:mysql:table:Operations:POST resource:[{name:jiarui2},{name:junyu2}]", "Product:mysql:table:Operations:GET_ALL", "Product:mysql:table:Operations:GET id:23", "Product:mysql:table:Operations:DELETE id:23", "Product:mysql:table:Operations:GET_ALL" ]
}
[ "{\"resource\":[{\"id\":25},{\"id\":26}]}", "{\"resource\":[{\"id\":5,\"name\":\"jiarui\"},{\"id\":6,\"name\":\"xiaxuan\"},{\"id\":9,\"name\":\"jiarui\"},{\"id\":10,\"name\":\"xiaxuan\"},{\"id\":11,\"name\":\"haowei\"},{\"id\":12,\"name\":\"junyu\"},{\"id\":13,\"name\":\"jiarui\"},{\"id\":14,\"name\":\"xiaxuan\"},{\"id\":15,\"name\":\"haowei\"},{\"id\":16,\"name\":\"junyu\"},{\"id\":17,\"name\":\"junyu2\"},{\"id\":18,\"name\":\"junyu2\"},{\"id\":19,\"name\":\"junyu2\"},{\"id\":20,\"name\":\"junyu2\"},{\"id\":21,\"name\":\"junyu2\"},{\"id\":22,\"name\":\"junyu2\"},{\"id\":23,\"name\":\"junyu2\"},{\"id\":24,\"name\":\"junyu2\"},{\"id\":25,\"name\":\"junyu2\"},{\"id\":26,\"name\":\"junyu2\"}]}", "{\"id\":23,\"name\":\"junyu2\"}", "{\"id\":23}", "{\"resource\":[{\"id\":5,\"name\":\"jiarui\"},{\"id\":6,\"name\":\"xiaxuan\"},{\"id\":9,\"name\":\"jiarui\"},{\"id\":10,\"name\":\"xiaxuan\"},{\"id\":11,\"name\":\"haowei\"},{\"id\":12,\"name\":\"junyu\"},{\"id\":13,\"name\":\"jiarui\"},{\"id\":14,\"name\":\"xiaxuan\"},{\"id\":15,\"name\":\"haowei\"},{\"id\":16,\"name\":\"junyu\"},{\"id\":17,\"name\":\"junyu2\"},{\"id\":18,\"name\":\"junyu2\"},{\"id\":19,\"name\":\"junyu2\"},{\"id\":20,\"name\":\"junyu2\"},{\"id\":21,\"name\":\"junyu2\"},{\"id\":22,\"name\":\"junyu2\"},{\"id\":24,\"name\":\"junyu2\"},{\"id\":25,\"name\":\"junyu2\"},{\"id\":26,\"name\":\"junyu2\"}]}" ]
Azure SQL?