Connection List API
Description
Rest API to get a list of connections for a specific participant.
Get all Connections API.
- Endpoint: GET
/v1/connections/?pageSize=10&page=0&participantId=Dp4ko8FieZztP6iSdR69pM
Libraries
- pg
- prisma
Expected Input
/v1/connections/?pageSize=10&page=0&participantId=Dp4ko8FieZztP6iSdR69pM
Expected Output
- should return a list of connections depending on input parameters.
{
"statusCode": 200,
"message": "Connections fetch successfully",
"data": [
{
"id": 1,
"connectionDate": "2022-03-08T15:25:43.999Z",
"connectionURL": "",
"did": "EuCY8bQnRMPrf3MwZo3d1G",
"status": "invited",
"connectionId": "265160e1-12f6-4b76-8bff-2d239c83b4de",
"theirDid": "",
"theirLabel": ""
},
{
"id": 2,
"connectionDate": "2022-03-08T15:26:11.312Z",
"connectionURL": "",
"did": "3E12AjxFsaWQnPUifuUgkm",
"status": "requested",
"connectionId": "0ae4c51c-bd6b-4e50-8512-3b39e27222ff",
"theirDid": "9seYMDYZ2XV74B2TU8qxo6",
"theirLabel": "invitee"
}
]
}
Steps to test
- participants id should be provided to get the list of connections against participants
- If we do not provide participants' id response status will be a bad request(400)
- if we do not provide page size default it should take 10.
Dependencies
- Need to finalise connection schema and request and response parameters with @suneet.aw and @team
Blocker
- NA