Closed FledgeXu closed 6 months ago
The purpose of this issue is to track the discussions about the design of backend apis.
POST /user Create a new user.
DELETE /user Delete a user.
GET /user/collection GET all collections of a users.
GET /user/collection/id:int GET a collection by its id.
DELETE /user/collection/id:int Delete a collection by its id.
PUT /user/collection/id:int Update a collection's info by its id.
GET /user/collection/id:int/file Get all files' info of a collection.
POST /user/collection/id:int/file Upload file(s).
PUT /user/collection/id:int/file/id:int Update the metadate of a file.
DELETE /user/collection/id:int/file/id:int Deletate the file.
GET /user/collection/id:int/metadata GET the metadata of a collection
PUT /user/collection/id:int/metadata Update the the metadata.
GET /user/collection/id:int/archive GET all archives info.
POST /user/collection/id:int/archive Create a archive.
Rest convention is to use plural form so /user would be /users
/user
/users
Rest is OK ; albeit the changes in the DB (#15) that should probably reflect here (no concept of metadata but an Archive request instead)
The purpose of this issue is to track the discussions about the design of backend apis.
Users
Collections:
Files:
Metadata:
Archive: