close
The Wayback Machine - https://web.archive.org/web/20140803062027/https://developer.beatsmusic.com/docs/read/activities/Collection

Collection

The collection of all activities in Beats


Endpoint URL

/api/activities


HTTP Method

GET


Authentication

Client ID required. See how to authenticate public resources here.


Parameters

n/a


Response Elements

Response

Description

code

Beats API response span. If successful, span is 'OK'. Otherwise it will be an error span.

info

Container for paging information

offset

Integer offset into results, 0 based. Always matches supplied argument value.

count

Number of results returned for this request.

total

Total number of elements available for this resource

data

List of known activities

type

The entity tpe of the API object

id

The entity tpe of the API object

name

Name of the activity

total_editorial_playlists

Count of playlists associated with this activity

created_at

Epoch timestamp the given object was created at.

 


Example Request

curl -X GET "https://partner.api.beatsmusic.com/v1/api/activities" \
    -d "client_id=[CLIENT_ID]"

Example Response

{
    "code": "OK",
    "info": {
        "count": 3,
        "total": 3,
        "offset": 0
    },
    "data": [
        {
            "type": "activity",
            "id": "ac1",
            "name": "Running",
            "total_editorial_playlists": 2,
            "created_at": 1371112664
        },
        {
            "type": "activity",
            "id": "ac2",
            "name": "Relaxing",
            "total_editorial_playlists": 9,
            "created_at": 1371112664
        },
        {
            "type": "activity",
            "id": "ac3",
            "name": "Waking Up",
            "total_editorial_playlists": 11,
            "created_at": 1371112664
        }
    ]
}

Docs Navigation