2023-11-05 12:57:11 +05:30

47 lines
992 B
HTTP

### create row
POST http://localhost:9001/api/vehicle
Content-Type: application/json
{
"data": {
"number": "KA03HD6064"
},
"uniqueIdentifier": "KA03HD6064"
}
### get row
GET http://localhost:9001/api/vehicle/1
### query row
POST http://localhost:9001/api/vehicle/query
Content-Type: application/json
{
"sql": "select id, tenant_id, deleted_on, deleted_by, deleted, version, created_at, modified_at, created_by, modified_by, data, tags, comments, unique_identifier, entity_name from data_model where data ->> 'number' = :number",
"params": {
"number": "KA03HD6064"
}
}
### update field
PATCH http://localhost:9001/api/vehicle/1
Content-Type: application/json
{
"key": "ownerName",
"value": "Gowthaman Basuvaraj"
}
### upate a row
PUT http://localhost:9001/api/vehicle/1
Content-Type: application/json
{
"number": "KA03HD6064",
"ownerName": "Gowthaman Basuvaraj",
"address": "Sathyamangalam"
}
### delete a row
DELETE http://localhost:9001/api/vehicle/1