Tag

List tags

Get a list of tags.

GET /api/v1/tags/

URL Parameters

Name Description
resource string (optional) Return tags only for a specific resource type Choices: configs, packages, results
sort string (optional) See Sorting

Response 200 OK

{
    "timestamp": "2016-04-18T10:58:04.226599797-04:00",
    "data": [
        {
            "name": "6RD",
            "count": 1
        },
        {
            "name": "BSSID",
            "count": 7
        },
        {
            "name": "Basic wireless",
            "count": 8
        }
    ]
}

Get a tag

Get a tag.

GET /api/v1/tags/{name}

Response 200 OK

{
    "timestamp": "2016-04-18T11:02:39.97787472-04:00",
    "data": {
        "name": "three",
        "configs": [
            {
                "id": "1017",
                "name": "new config",
                "tags": [
                    "one",
                    "three",
                    "two"
                ]
            },
            {
                "id": "1020",
                "name": "new config2",
                "tags": [
                    "foo",
                    "bar",
                    "three",
                    "baz"
                ]
            }
        ],
        "packages": [
            {
                "id": "1050",
                "name": "new package",
                "tags": [
                    "one",
                    "three",
                    "two"
                ]
            }
        ],
        "results": [
            {
                "id": "20160321101637",
                "name": "20160321101637",
                "tags": [
                    "one",
                    "two",
                    "three"
                ]
            }
        ]
    }
}

Response 404 Not Found

{
    "error": "no such tag"
}

Edit a tag

Edit a tag.

PATCH /api/v1/tags/{name}

Examples

Rename tag foo to bar.

PATCH /api/v1/tags/foo
{
    "name": "bar"
}

Response 200 OK

{
    "timestamp": "2016-04-18T11:02:39.97787472-04:00",
    "data": {
        "name": "bar",
        "configs": [
            {
                "id": "1017",
                "name": "new config",
                "tags": [
                    "one",
                    "three",
                    "two"
                ]
            },
            {
                "id": "1020",
                "name": "new config2",
                "tags": [
                    "foo",
                    "bar",
                    "baz"
                ]
            }
        ],
        "packages": [
            {
                "id": "1050",
                "name": "new package",
                "tags": [
                    "one",
                    "three",
                    "two"
                ]
            }
        ],
        "results": [
            {
                "id": "20160321101637",
                "name": "20160321101637",
                "tags": [
                    "one",
                    "two",
                    "three"
                ]
            }
        ]
    }
}

Response 404 Not Found

{
    "error": "no such tag"
}

Delete a tag

Delete a tag.

DELETE /api/v1/tags/{name}

Response 204 No Content