{
    "testName": "DataPipeLine Sample",
    "url": [
        "http://localhost:8080"
    ],
    "globals": [
        "loginResponse",
        "data"
    ],
    "tests": [
        {
            "endpoint": "1",
            "name": "Login - Valid",
            "request": {
                "method": "POST",
                "url": "/login",
                "payload": {
                    "username": "alice",
                    "password": "password"
                },
                "responseCode": 200,
                "saveResponse": "loginResponse"
            },
            "response": {
                "body": {
                    "token": null
                }
            }
        },
        {
            "endpoint": "1",
            "name": "Fetch data",
            "request": {
                "method": "GET",
                "url": "/data",
                "headers": {
                    "token": "{{loginResponse.token}}"
                },
                "responseCode": 200
            },
            "response": {
                "body": [
                    null
                ]
            }
        },
        {
            "endpoint": "1",
            "name": "Delete data",
            "request": {
                "method": "DELETE",
                "url": "/data/{{dataPipe.read('sampleTest01.json').data._id}}",
                "headers": {
                    "token": "{{loginResponse.token}}"
                },
                "responseCode": 200
            },
            "response": {
                "body": {
                    "_id": null
                }
            }
        },
        {
            "endpoint": "1",
            "name": "Fetch data with ID after DELETE",
            "request": {
                "method": "GET",
                "url": "/data/{{dataPipe.read('sampleTest01.json').data._id}}",
                "headers": {
                    "token": "{{loginResponse.token}}"
                },
                "responseCode": 404
            }
        }
    ]
}