98 lines
2.0 KiB
HTTP

### create row
POST http://localhost:9001/api/vehicle
Content-Type: application/json
Authorization: {{auth-token}}
{
"data": {
"number": "KA01HD6667",
"owner": "gowthaman"
},
"uniqueIdentifier": ""
}
### create row
POST http://localhost:9001/api/vendor
Content-Type: application/json
Authorization: {{auth-token}}
{
"data": {
"name": "arsalan",
"rating": 5
}
}
### create row, with autogenerated identifier
POST http://localhost:9001/api/log
Content-Type: application/json
Authorization: {{auth-token}}
{
"data": {
"user": "gowthaman",
"action": "logout"
}
}
### create row, with autogenerated identifier
POST http://localhost:9001/api/purchaseOrder
Content-Type: application/json
Authorization: {{auth-token}}
{
"vendor" : "arslan",
"products": ["chairs", "tables"]
}
### get row
GET http://localhost:9001/api/log/log-0000000001
Authorization: Bearer {{auth-token}}
### get row
GET http://localhost:9001/api/vehicle/KA01HD6667
Authorization: Bearer {{auth-token}}
### 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/KA01HD6667
Content-Type: application/json
Authorization: {{auth-token}}
{
"key": "ownerName",
"value": "Gowthaman Basuvaraj"
}
### upate a row
PUT http://localhost:9001/api/vehicle/KA01HD6667
Content-Type: application/json
Authorization: {{auth-token}}
{
"number": "KA03HD6064",
"ownerName": "Gowthaman Basuvaraj",
"address": "Sathyamangalam"
}
### delete a row
DELETE http://localhost:9001/api/vehicle/KA01HD6667
Authorization: {{auth-token}}
### get po for id
GET http://localhost:9001/api/vendor/po/12345
Authorization: {{auth-token}}