Researchers, reviewers and approvers are able to list requests but are filtered by specific conditions:
| Role | Conditions | Values |
|---|---|---|
researcher |
request.user_id |
researcher.id |
reviewer |
request.status, request.reviews.user_id |
awaiting_review, reviewer.id |
approver |
request.status |
awaiting_approval |
| Method | Uri | Auth | Role |
|---|---|---|---|
GET |
/v1/requests |
Bearer JWT-Token |
researcher |
The API requires a header Accept to be submitted with the request:
{
"Accept": "application/json",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..."
}
Condition : User must be a researcher, reviewer or approver.
Code : 200 Okay
Content example : Response will reflect back the created requests.
[
{
"id": "01e1d8ae-6826-4d63-abd8-4b965177f7c4",
"request": {
"id": "50b17bb5-9270-4bfd-8f44-8206960c1bcb",
"title": "Hello Sunshine Exposure generation",
...
},
...
},
{
"id": "0b414aa7-bc51-4a97-beff-247c4216fde4",
"request": {
"id": "0f4366e2-5682-4aa7-a6da-dd4c8003fb17",
"title": null,
...
},
...
},
{
"id": "59b7fe56-6333-4170-8e0a-f70b2440fe37",
"request": {
"id": "bd19e332-b2a3-4271-a6cf-1be707be1903",
"title": null,
...
},
...
}
]
Condition : If the current user does not have the role researcher, reviewer or approver attached.
Code : 403 Unauthorized
Content example :
{
"message": "User does not have the right roles."
}