Server REST APIs
Author: Sora Suegami
A server of the Sommelier Drive provides the following REST APIs.
REST APIs
- GET /user
Returns a record in the User table where a value of the UserID column is userId.
Request:
1 2 3 | |
Response:
1 2 3 4 5 6 | |
- POST /user
Takes as input public keys and file path encryptions of the PKE and PKSE schemes, inserts them in the User table and Path table, and returns a new userId.
Request:
1 2 3 4 5 6 | |
Response: Int
- GET /file-path
Returns a record in the Path table where a value of the PathID column is pathId.
Request:
1 2 3 | |
Response:
1 2 3 4 5 6 7 | |
- GET /file-path/children
Returns a list of records in the Path table where a value of the PermissionHash column is equal to the permissionHash.
Request:
1 2 3 | |
Response:
1 2 3 4 5 6 7 8 9 10 | |
- GET /file-path/search
Takes as input a userId and a trapdoor td and returns records in the Path table where a value of the UserID column is userId and a ciphertext ct of the KeywordCT column satisfies test_cipher(ct,td)==1.
Request:
1 2 3 4 | |
Response:
1 2 3 4 5 6 7 8 9 10 | |
- POST /file-path
Takes as input readUserId, premissionHash, dataCT, and keywordCT, inserts them into the Path table, and returns a new pathId.
Request:
1 2 3 4 5 6 | |
Response: Int
- GET /shared-key
Returns a record in the Shared Key table where a value of the PathID column is pathId.
Request:
1 2 3 | |
Response:
1 2 3 4 5 | |
- POST /shared-key
Takes as input pathId and ct, inserts them into the Shared key table, and returns a new sharedKeyId.
Request:
1 2 3 4 | |
Response: Int
- GET /contents
Returns a record in the Contents table where a value of the SharedKeyHash column is equal to the sharedKeyHash.
Request:
1 2 3 | |
Response:
1 2 3 4 5 6 7 | |
- POST /contents
Takes as input sharedKeyHash and ct, inserts them into the Contents table, and returns a new contentsId.
Request:
1 2 3 4 | |
Response: Int
- PUT /contents
Takes as input sharedKeyHash and ct, modifies a value of the ContentsCT column in the record where a value of the SharedKeyHash column is equal to the sharedKeyHash.
Request:
1 2 3 4 | |
Response: Int