Parameters

```json { "_id": { "$oid": "56e2bdd603481350e3e629c5" }, "changeset": { "list": [ { "name": "cli_timeout", "value": "10" }, { "name": "cli_buffer", "value": "8k" }, { "name": "auto_restart", "value": "false" }, { "name": "workspace_backend", "value": "1024" } ] }, "created": { "$date": "2016-03-11T12:45:10.388Z" }, "groups": [ "59d623cabf085f6187eb9d5f", "59f99e5ee4b0577372d4b363" ], "groupNames": [ "alfredo", "toni" ], "isprivate": false, "name": "test_public", "timestamp": { "$date": "2017-10-16T12:46:19.571Z" } } ```
GET

{
    "_id": {
        "$oid": "59940d98db6c67a687da322a"
    },
    "changeset": {
        "list": [
            {
                "name": "cli_timeout",
                "value": "10"
            },
            {
                "name": "cli_buffer",
                "value": "8k"
            },
            {
                "name": "auto_restart",
                "value": "false"
            }
        ]
    },
    "created": {
        "$date": "2017-08-16T09:17:12.479Z"
    },
    "groupName": "all",
    "isprivate": false,
    "name": "aaa",
    "timestamp": {
        "$date": "2017-08-16T09:49:10.555Z"
    }
}

GET

**The response below is reduced for clarity**
{
    "list": [
        {
            "_id": {
                "$oid": "57be10f241e43d366b7c211f"
            },
            "created": {
                "$date": "2016-08-24T21:26:10.580Z"
            },
            "groupName": "all",
            "isprivate": false,
            "name": "eeee",
            "timestamp": {
                "$date": "2016-08-24T21:26:10.580Z"
            }
        },
        {
            "_id": {
                "$oid": "57e3d8a003487e5dfb9e1984"
            },
            "created": {
                "$date": "2016-09-22T13:12:00.441Z"
            },
            "groupName": "outro",
            "isprivate": false,
            "name": "d",
            "timestamp": {
                "$date": "2017-10-04T11:23:20.262Z"
            }
        },
        ...
        {
            "_id": {
                "$oid": "59940d98db6c67a687da322a"
            },
            "changeset": {
                "list": [
                    {
                        "name": "cli_timeout",
                        "value": "10"
                    },
                    {
                        "name": "cli_buffer",
                        "value": "8k"
                    },
                    {
                        "name": "auto_restart",
                        "value": "false"
                    }
                ]
            },
            "created": {
                "$date": "2017-08-16T09:17:12.479Z"
            },
            "groupName": "all",
            "isprivate": false,
            "name": "aaa",
            "timestamp": {
                "$date": "2017-08-16T09:49:10.555Z"
            }
        },
        ...
        }
    ]
}

GET

Example with `/api/v1/param/1/2`

{page_number}=1 {items_per_page}=2

{
    "list": [
        {
            "_id": {
                "$oid": "56e2bdd603481350e3e629c5"
            },
            "changeset": {
                "list": [
                    {
                        "name": "cli_timeout",
                        "value": "10"
                    },
                    {
                        "name": "cli_buffer",
                        "value": "8k"
                    },
                    {
                        "name": "auto_restart",
                        "value": "false"
                    },
                    {
                        "name": "workspace_backend",
                        "value": "1024"
                    }
                ]
            },
            "created": {
                "$date": "2016-03-11T12:45:10.388Z"
            },
            "group": {
                "$id": {
                    "$oid": "59d623cabf085f6187eb9d5f"
                },
                "$ref": "vcc_group"
            },
            "groupName": "alfredo",
            "isprivate": false,
            "name": "test_public",
            "timestamp": {
                "$date": "2017-10-16T12:46:19.571Z"
            }
        },
        {
            "_id": {
                "$oid": "57e3d8a003487e5dfb9e1984"
            },
            "created": {
                "$date": "2016-09-22T13:12:00.441Z"
            },
            "groupName": "outro",
            "isprivate": false,
            "name": "d",
            "timestamp": {
                "$date": "2017-10-04T11:23:20.262Z"
            }
        }
    ]
}

Update single param

PUT/PATCH

Note that foreign key relations are ignored. Explicit API calls are put in place to support these relationships. Therefore updating a single param changeset will not push out the changes to the caches immediately. Though the VAC scheduler will ensure that the updated parameter will be pushed out to the assigned group if configured to do so as part of the consistency check.
{
"changeset": {
    "list": [
        {
            "name": "thread_pools",
            "value": "3"
        },
        {
            "name": "thread_pool_max",
            "value": "600"
        }
    ]
},
"name": "config 0"
}
{
    "_id": {
        "$oid": "56e2bdd603481350e3e629c5"
    },
    "changeset": {
        "list": [
            {
                "name": "thread_pools",
                "value": "3"
            },
            {
                "name": "thread_pool_max",
                "value": "600"
            }
        ]
    },
    "created": {
        "$date": "2016-03-11T12:45:10.388Z"
    },
    "group": {
        "$id": {
            "$oid": "59d623cabf085f6187eb9d5f"
        },
        "$ref": "vcc_group"
    },
    "groupName": "all",
    "isprivate": false,
    "name": "config 0",
    "timestamp": {
        "$date": "2017-10-17T12:13:14.433Z"
    }
}

DELETE

Successfully deleted ( HTTP `200`)
{
    "message": "Entity with id=59940d98db6c67a687da322a removed successfully."
}
In case it is assigned to a group ( HTTP `400`)
{
    "_id": {
        "$oid": "59940d98db6c67a687da322a"
    },
    "changeset": {
        "list": [
            {
                "name": "cli_timeout",
                "value": "10"
            },
            {
                "name": "cli_buffer",
                "value": "8k"
            },
            {
                "name": "auto_restart",
                "value": "false"
            }
        ]
    },
    "created": {
        "$date": "2017-08-16T09:17:12.479Z"
    },
    "groupName": "all",
    "isprivate": false,
    "name": "aaa",
    "timestamp": {
        "$date": "2017-08-16T09:49:10.555Z"
    }
}

POST

{
"changeset": {
    "list": [
        {
            "name": "thread_pools",
            "value": "3"
        },
        {
            "name": "thread_pool_max",
            "value": "600"
        }
    ]
},
"name": "config 0"
}
{
    "_id": {
        "$oid": "59e5f7e477c8096ca5e77d0f"
    },
    "changeset": {
        "list": [
            {
                "name": "thread_pools",
                "value": "2"
            },
            {
                "name": "thread_pool_max",
                "value": "700"
            }
        ]
    },
    "created": {
        "$date": "2017-10-17T12:30:28.988Z"
    },
    "groupName": "all",
    "isprivate": false,
    "name": "config 0",
    "timestamp": {
        "$date": "2017-10-17T12:30:28.988Z"
    }
}


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203