1009: Enumerate tracks

1009: Enumerate tracks

Retrieves an enumeration of all the tracks an account is connected to.

Endpoint ID:

1009

Method:

GET

URL:

/entity/id/{entity-id}/tracks/all/{track-state}

/entity/ext-key/{ext-key}/{ext-type}/tracks/all/{track-state}

/entity/id/{entity-id}/tracks/{track-type}/{track-state}

/entity/ext-key/{ext-key}/{ext-type}/tracks/{track-type}/{track-state}

 

entity-id

Rubiq entity ID that uniquely identifies an account to enumerate tracks for

 

ext-key

External key that uniquely identifies an account to enumerate tracks for

 

ext-type

Type of external key

 

track-type

Type of tracks to enumerate. The term “all” can be used instead, which will enumerate all tracks for the specified account

 

track-state

Optional argument that specifies which connection states to enumerate. Possible values are “connected” and “disconnected”. If omitted, tracks with both states are returned

Request body:

None

Response body:

JSON data with information about tracks.

Example 1 – Account is connected to one track with ID 1234 and has earlier been connected to a track with ID 9876:
{ "tracks": [ { "trackID": 1234, "name": "Some track", "connection": true }, { "trackID": 9876, "name": "Another track", "connection": false } ] }
Example 2 – Account is not connected to any tracks:
{ "tracks":[] }

Status codes:

200

Account found with success

 

404

Account was not found

The following sub codes may be returned:

404.1

User not found

404.2

External user could not be found