Tag Label GET Resources

List of Tag Labels

GET /tag-labels
Parameter Type Default Required Description
limit int 10 Sets how many tags are returned at once.
offset int 0 Offset from the first tag.
query string Return only tags which contain the query parameter as a substring. The result is ordered by relevance (unless a sort parameter overrides this behaviour).
query_type string infix One of prefix|infix|postfix. Determines if tags must start with (prefix), contain (infix), or end with (postfix) the substring specified in the query parameter.
sort string encounter.desc Specify the criteria the result is sorted by. The allowed sort criteria are label, encounter. The format is CRITERION.DIRECTION,CRITERION.DIRECTION.

This parameter overrules the result ordering of the query parameter.

Returns a paginated list of tags, sorted by encounter if query is not specified, sorted alphabetically otherwise.

Response

{
    "total": 1221,
    "_links": {
        "self": {
            "href": "/api/v1/tags?limit=10&offset=0"
        },
        "next": {
            "href": "/api/v1/tags?limit=10&offset=1"
        },
        "last": {
            "href": "/api/v1/tags?limit=10&offset=122"
        }
    },
    "items": [
        {
            "tag": "Sherlock",
            "encounter": 736,
            "question_count": 654,
            "excluded_from_suggestions": false,
            "created": "2011-12-12T15:35:25.000Z"
        },
        {
            "tag": "Baker Street",
            "encounter": 331,
            "question_count": 231,
            "excluded_from_suggestions": true,
            "created": "2011-12-13T17:57:34.000Z"
        },
        ...
    ]
}

Tag by label

GET /tag-labels/:TAGLABEL

Returns a single tag.

Use percent encoding for special characters in the :TAGLABEL segment of the endpoint URL.

Response

{
    "tag": "Sherlock",
    "encounter": 736,
    "question_count": 654,
    "excluded_from_suggestions": false,
    "created": "2011-12-12T15:35:25.000Z"
}