Varnish Administration Console

User

{
    "_id": {
        "$oid": "5818d77011e0d3945240dc0f"
    },
    "created": {
        "$date": "2016-11-01T17:57:04.889Z"
    },
    "email": "as@c.vom",
    "password": "a5b89bc41e1b190233c394c5025cb439",
    "role": "User",
    "salt": "291ddf43-3a3d-480a-b7ee-80c889daa6a3",
    "timestamp": {
        "$date": "2017-10-05T13:51:05.244Z"
    },
    "username": "czxxzc",
    "write": false
}

GET

{
            "_id": {
                "$oid": "56d5a2eea826b87718faaf3c"
            },
            "created": {
                "$date": "2016-03-01T14:10:54.968Z"
            },
            "email": "ding@dong.com",
            "password": "2e707452f2d5602bb755bb60374c5d29",
            "role": "User",
            "salt": "afe7fc41-a42c-4a9e-b651-c25204f3013a",
            "timestamp": {
                "$date": "2017-10-05T12:17:35.726Z"
            },
            "username": "ding",
            "write": false
        },
        {
            "_id": {
                "$oid": "59887b21436c59feb262bdf5"
            },
            "created": {
                "$date": "2017-08-07T14:37:21.901Z"
            },
            "email": "pop@gmail.com",
            "password": "9e118c85a5dbc154b33719184cf74c0b",
            "role": "ReadOnly",
            "salt": "6552228f-5c91-4054-ae20-bb8df640cccf",
            "timestamp": {
                "$date": "2017-10-05T10:03:03.081Z"
            },
            "username": "popo",
            "write": false
        },
        {
            "_id": {
                "$oid": "5818d77011e0d3945240dc0f"
            },
            "created": {
                "$date": "2016-11-01T17:57:04.889Z"
            },
            "email": "as@c.vom",
            "password": "a5b89bc41e1b190233c394c5025cb439",
            "role": "User",
            "salt": "291ddf43-3a3d-480a-b7ee-80c889daa6a3",
            "timestamp": {
                "$date": "2017-10-05T13:51:05.244Z"
            },
            "username": "czxxzc",
            "write": false
        }
    ]
}


GET

Example with api/v1/user/1/2

{page_number}=1 {items_per_page}=2

{
    "list": [
        {
            "_id": {
                "$oid": "5818d77011e0d3945240dc0f"
            },
            "created": {
                "$date": "2016-11-01T17:57:04.889Z"
            },
            "email": "as@c.vom",
            "password": "a5b89bc41e1b190233c394c5025cb439",
            "role": "User",
            "salt": "291ddf43-3a3d-480a-b7ee-80c889daa6a3",
            "timestamp": {
                "$date": "2017-10-05T13:51:05.244Z"
            },
            "username": "czxxzc",
            "write": false
        },
        {
            "_id": {
                "$oid": "56d5a2eea826b87718faaf3c"
            },
            "created": {
                "$date": "2016-03-01T14:10:54.968Z"
            },
            "email": "ding@dong.com",
            "password": "2e707452f2d5602bb755bb60374c5d29",
            "role": "User",
            "salt": "afe7fc41-a42c-4a9e-b651-c25204f3013a",
            "timestamp": {
                "$date": "2017-10-05T12:17:35.726Z"
            },
            "username": "ding",
            "write": false
        }
    ]
}


GET

{
    "_id": {
        "$oid": "5818d77011e0d3945240dc0f"
    },
    "created": {
        "$date": "2016-11-01T17:57:04.889Z"
    },
    "email": "as@c.vom",
    "password": "a5b89bc41e1b190233c394c5025cb439",
    "role": "User",
    "salt": "291ddf43-3a3d-480a-b7ee-80c889daa6a3",
    "timestamp": {
        "$date": "2017-10-05T13:51:05.244Z"
    },
    "username": "czxxzc",
    "write": false
}


POST

{
    "username" : "test",
    "password" : "test",
    "name" : "Test user",
    "role" : "Admin"
}

At the time of writing this document there are three roles defined for VAC users which are Admin, User and ReadOnly. You can read more about user roles here

{
    "_id": {
        "$oid": "59e73a07fbea8558092aee1b"
    },
    "created": {
        "$date": "2017-10-18T11:24:55.127Z"
    },
    "name": "test user",
    "password": "0e2fa37d3f870db74896baaab538fc58",
    "role": "Admin",
    "salt": "0b13bbd6-241d-47d6-ae63-e318f4065467",
    "timestamp": {
        "$date": "2017-10-18T11:24:55.128Z"
    },
    "username": "test",
    "write": false
}


PUT/PATCH

example of a payload changing the password and the user role

{
    "password" : "new",
    "role" : "User"
}

At the time of writing this document there are three roles defined for VAC users which are Admin, User and ReadOnly. You can read more about user roles here

{
    "_id": {
        "$oid": "59e73a07fbea8558092aee1b"
    },
    "created": {
        "$date": "2017-10-18T11:24:55.127Z"
    },
    "name": "test user",
    "password": "ee941f2aab43b0c1f5a622402de13a9f",
    "role": "User",
    "salt": "9ba2d4a1-ea33-4518-a49c-f9f71b96d445",
    "timestamp": {
        "$date": "2017-10-18T11:27:04.778Z"
    },
    "username": "test",
    "write": false
}


DELETE

{
    "id": "59e73a07fbea8558092aee1b",
    "message": "User removed successfully.",
    "username": "test"
}


PUT

{
    "message": "ok"
}


PUT

{
    "ids":
        [
        "59e4ad6577c8096ca5e77850",
        "59d622eabf085f6187eb9d5a"
        ]
}

{
    "message": "ok"
}


PUT

{
    "ids":
        [
        "59e4ad6577c8096ca5e77850",
        "59d622eabf085f6187eb9d5a"
        ]
}

{
    "message": "ok"
}


GET

{
    "email": "test@test.com",
    "groups": [
        "alfredo"
    ],
    "id": "59d622eabf085f6187eb9d5a",
    "role": "User",
    "username": "test",
}

When user has the role Admin, assume access to all groups


You can read more about user roles here