Skip to content

Endpoints reference

Jyoti Bhushan edited this page Feb 21, 2021 · 7 revisions

APIs:

Create an album

(call image service, port : 8080 )

POST localhost:8080/album?userid=jyoti

RequestBody: { "name":<abumName>, "description": <desc> }

QueryParam : "userid" : <userId>

Add image inside existing album

(call googleDriveService PORT: 9090)

POST localhost:9090/image/upload/<albumGoogleDriveId>

Path variable : <albumGoogleDriveId>

QueryParam : "userid" : <userId> "file": <attach file>

Get all albums in the database

(call imageService PORT: 8080)

Get all albums for given userId

GET localhost:8080/album?userid=jyoti

QueryParam : "userid" : <userId>

Get all active albums

GET localhost:8080/all

Get all Images for a particular album

(call imageService PORT: 8080)

GET localhost:8080/album/<albumGoogleId>/image

Get an image that user can see (download)

(call googleDriveService PORT: 9090)

GET localhost:9090/image/<imageGoogleId>

Update album <name / description>

(call imageService PORT: 8080)

PUT localhost:8080/album/<albumGoogleId>/image QueryParam : "userid" : <userId>

RequestBody: { "name":<abumName>, "description": <desc> }

Update image

(call imageService PORT: 8080)

PUT localhost:8080/image/<imageGoogleId>/image QueryParam : "userid" : <userId>

RequestBody: { "name":<imageName>, }

Add a Collaborator to Album

(call imageService PORT: 8080)

PUT localhost:8080/album/<albumGoogleId>/collaborator/<collaboratorid>

QueryParam : "userid" : <userId>

Add multiple Collaborators to Album

(call imageService PORT: 8080)

PUT localhost:8080/album/<albumGoogleId>/collaborator

QueryParam : "userid" : <userId>

RequestBody: { "ids":<collaborator id list>, }

Remove a Collaborator from Album

(call imageService PORT: 8080)

DELETE localhost:8080/album/<albumGoogleId>/collaborator/<collaboratorid>

QueryParam : "userid" : <userId>

Remove multiple Collaborators from Album

(call imageService PORT: 8080)

DELETE localhost:8080/album/<albumGoogleId>/collaborator

QueryParam : "userid" : <userId>

RequestBody: { "ids":<collaborator id list>, }

Add a Collaborator to Album

(call imageService PORT: 8080)

PUT localhost:8080/album/<albumGoogleId>/collaborator/<collaboratorid>

QueryParam : "userid" : <userId>

Add multiple Collaborators to Album

(call imageService PORT: 8080)

PUT localhost:8080/album/<albumGoogleId>/collaborator

QueryParam : "userid" : <userId> -> logged in User : used to update modifiedBy field

RequestBody: { "ids":<collaborator id list>, }

Remove a Collaborator from Album

(call imageService PORT: 8080)

DELETE localhost:8080/album/<albumGoogleId>/collaborator/<collaboratorid>

QueryParam : "userid" : <userId> logged in User : used to update modifiedBy field

Remove multiple Collaborators from Album

(call imageService PORT: 8080)

DELETE localhost:8080/album/<albumGoogleId>/collaborator

QueryParam : "userid" : <userId> logged in User : used to update modifiedBy field

RequestBody: { "ids":<collaborator id list>, }

Delete album

(call imageService PORT: 8080)

DELETE localhost:8080/album/<albumGoogleId>

QueryParam : "userid" : <userId> logged in User : used to update modifiedBy field

Delete all albums for logged in user

(call imageService PORT: 8080)

DELETE localhost:8080/album

QueryParam : "userid" : <userId> logged in User : used to update modifiedBy field

Clone this wiki locally