List of Tags

GET /v1/entities/tag

Retrieves a list of tags.

Request Parameters

Location Parameter Type Required/ Optional Description
query category.id string optional Filter. Will match to records whose category contains the given string id
query category.name string optional Filter. Will match to records whose category contains the given string name
query cursor string optional The cursor ID of the first record to return. Example: minimal
query id string optional Filter. Will match to records whose id contains the given string
query labels.id string optional Filter. Will match to records that possess a label whose id contains the given string
query labels.name string optional Filter. Will match to records that possess a label whose name contains the given string
query limit number optional The number of records to return. May be a value between 1 and 100 inclusive. If a value is not specified, the default is 10
query name string optional Filter. Will match to records whose name contains the given string
query offset number optional The numeric offset of the first record to return. May be a value between 1 and 100,000 inclusive.

For a description of how to use these query parameters, see Pagination.

Example Request

GET /v1/entities/tag?offset=0&limit=2 HTTP/1.1
Host: api.ampermusic.com
Content-Type: application/vnd.api+json
Authorization: Basic abcxyz

Response Data

Data Item Type Description
data array
data[].attributes object
data[].attributes.category object
data[].attributes.category.id string The string id of the category
data[].attributes.category.name string The string name of the category
data[].attributes.labels[].id string The string id of the label
data[].attributes.labels[].name string The string name of the label
data[].attributes.labels array
data[].attributes.name string The string name of the tag
data[].id string The string ID of the tag
data[].links object
data[].links.self string The URL of the tag
data[].type string The type of data (entity_tag in this case)
links object
links.first string The URL of the first (or possibly only) page of results. It is always available
links.next string The URL of the next page of results when using offset/limit mode. It is omitted if there are no additional pages and is available on the first page, and on any subsequent page, accessed with offset/limit mode
links.next_cursor string The URL of the next page of results when using cursor/limit mode. It is omitted if there are no additional pages and is available on the first page, and on any subsequent page, accessed with cursor/limit mode
links.prev string The URL of the previous page of results when using offset/limit mode. It is omitted if there is no previous page and is not available in cursor/limit mode
links.self string The URL of this list of tags

Example Response

Header

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

Body

{
    "data": [
        {
            "attributes": {
                "category": {
                    "id": "mood",
                    "name": "Mood"
                },
                "labels": [
                    {
                        "id": "non_musical",
                        "name": "Non Musical"
                    }
                ],
                "name": "Happy"
            },
            "id": "happy",
            "links": {
                "self": "https://api.ampermusic.com/v1/entities/tag/happy"
            },
            "type": "entity_tag"
        },
        {
            "attributes": {
                "category": {
                    "id": "mood",
                    "name": "Mood"
                },
                "labels": [
                    {
                        "id": "non_musical",
                        "name": "Non Musical"
                    }
                ],
                "name": "Sad"
            },
            "id": "sad",
            "links": {
                "self": "https://api.ampermusic.com/v1/entities/tag/sad"
            },
            "type": "entity_tag"
        }
    ],
    "links": {
        "first": "https://api.ampermusic.com/v1/entities/tag?limit=2",
        "next": "https://api.ampermusic.com/v1/entities/tag?limit=2&offset=2",
        "next_cursor": "https://api.ampermusic.com/v1/entities/tag?cursor=exciting&limit=2",
        "prev": "https://api.ampermusic.com/v1/entities/tag?limit=2",
        "self": "https://api.ampermusic.com/v1/entities/tag?limit=2"
    }
}