Closed TanmoySG closed 1 year ago
The following endpoints "might" be used for interaction with WDB.
POST /api/databases
BODY { name, config }
GET /api/databases/{database-name}
DELETE /api/databases/{database-name}
POST /api/databases/{database-name}/collections
BODY { name, config }
GET /api/databases/{database-name}/collections/{collection-name}
DELETE /api/databases/{database-name}/collections/{collection-name}
The following endpoints "might" be used for interaction with WDB.
Note : Passing the filters is not yet finalized - how it'll be passed.
POST/PUT /api/databases/{db-name}/collections/{collection-name}/data
BODY { data }
GET /api/databases/{db-name}/collections/{collection-name}/data?key=<key>&value=<value>
DELETE /api/databases/{db-name}/collections/{collection-name}/data?filters={key: <key>, value: <value>}
PATCH /api/databases/{db-name}/collections/{collection-name}/data?filters={key: <key>, value: <value>}
BODY { data, only fields to update }
API Response structure for any action.
{
"action" : "what was performed",
"status" : "success/failure",
"errors" : {
"code" : "",
"stack" : [ ]
},
"data" : { }
}
While building the server components we need to decide how the endpoints are to created.