2023-11-10 14:05:58 +05:30

63 lines
1.3 KiB
HTTP

### create row
POST http://localhost:9001/api/vehicle
Content-Type: application/json
Authorization: set-auth-token
{
"data": {
"number": "KA01MU0556"
},
"uniqueIdentifier": "KA01MU0556"
}
### create row, with autogenerated identifier
POST http://localhost:9001/api/log
Content-Type: application/json
Authorization: set-auth-token
{
"data": {
"user": "gowthaman",
"action": "logout"
}
}
### get row
GET http://localhost:9001/api/vehicle/KA03HD6064
### query row
POST http://localhost:9001/api/vehicle/query
Content-Type: application/json
Authorization: set-auth-token
{
"sql": "select sys_pk, 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/KA03HD6064
Content-Type: application/json
Authorization: set-auth-token
{
"key": "ownerName",
"value": "Gowthaman Basuvaraj"
}
### upate a row
PUT http://localhost:9001/api/vehicle/KA03HD6064
Content-Type: application/json
Authorization: set-auth-token
{
"number": "KA03HD6064",
"ownerName": "Gowthaman Basuvaraj",
"address": "Sathyamangalam"
}
### delete a row
DELETE http://localhost:9001/api/vehicle/KA03HD6064