Get a specific requests

A verified researcher is able to create a new request. Doing this will create a request containing revisions with one revision pre-filled.

{info} Only a researcher can create requests


Method Uri Auth Role
GET /v1/requests/{UUID} Bearer JWT-Token researcher

Headers

The API requires a header Accept to be submitted with the request:

{
    "Accept": "application/json",
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..." 
}

Success Responses

Condition : User must be a researcher.

Code : 200 Okay

Content example : Response will reflect back the created requests.

{
    "id": "be00dfbb-b644-4ab7-80e3-5fc76bb39d2a",
    "request": {
        "id": "0dd6cc2f-a454-4f88-9bfd-597d23505197",
        "title": "Average Ages Alcoholic Addiction - Maastricht",
        "author": {
            "firstName": "Jeroen",
            "lastName": "Boumans"
        },
        "coauthors": [
            "Jeroen de Vries",
            "Wim Schrooten"
        ],
        "has_informed_coauthors": 0,
        "has_agreed_terms": 0,
        "is_student": 0,
        "student_details": null,
        "hypotheses": null,
        "background": null,
        "design": null,
        "analyses": null,
        "timeline": null,
        "comments": [
            ...
        ],
        "request_id": "be00dfbb-b644-4ab7-80e3-5fc76bb39d2a",
        "created_at": "2020-07-23T16:07:10.000000Z",
        "updated_at": "2020-07-23T16:09:58.000000Z"
    },
    "revisions": [
        {
            "id": "0dd6cc2f-a454-4f88-9bfd-597d23505197",
            "title": "Average Ages Alcoholic Addiction - Maastricht",
            "author": {
                "firstName": "Jeroen",
                "lastName": "Boumans"
            },
            "coauthors": [
                "Jeroen de Vries",
                "Wim Schrooten"
            ],
            "comments": [
                ...
            ],
            ...
            "created_at": "2020-07-23T16:07:10.000000Z",
            "updated_at": "2020-07-23T16:09:58.000000Z"
        }
    ],
    "comments": [
        ...
    ],
    "created_at": "2020-07-23T16:07:10.000000Z",
    "updated_at": "2020-07-23T16:07:10.000000Z"
}

Error Responses

Condition : If the current user does not have the role researcher attached.

Code : 403 Unauthorized

Content example :

{
  "message": "User does not have the right roles."
}