GET ​/api​/v3​/track​/:id

Retrieve a track by id.

Request

Example Request

{
  "auth_token": "ef43987dc3dfca56255915d3b109714ecd4516ac54f527"
}

Example Parameters

  • auth_token: The auth_token of the currently authenticated user.
    • Required: no
    • Type: string
    • Example: ef43987dc3dfca56255915d3b109714ecd4516ac54f527

Response

Example Response

{
  "track": {
    "id": 3,
    "album_id": 12,
    "artist_id": 2,
    "title": "Shine on you Crazy Diamond",
    "duration": "03:18",
    "single": true,
    "you_follow": true,
    "up_votes_count": 1,
    "your_vote": null
  }
}

Response Parameters

  • track: The track object.

    • Required: yes
    • id: The track id
      • Required: yes
      • Type: integer
      • Example: 3
    • album_id: The id of the album. Can be used to lookup in top-level albums key.
      • Required: yes
      • Type: integer
      • Example: 12
    • artist_id: The id of the artist. Can be used to lookup in a top-level bands key.
      • Required: yes
      • Type: integer
      • Example: 2
    • title: The title of the track.
      • Required: yes
      • Type: string
      • Example: Shine on you Crazy Diamond
    • duration: The duration of the track. In minutes:seconds format.
      • Required: yes
      • Type: string
      • Example: 03:18
    • single: Indicates if the track is one of the band's singles.
      • Required: yes
      • Type: boolean
      • Example: true
    • you_follow: Indicates if the track is followed/favorited by the current account.
      • Required: yes
      • Type: boolean
      • Example: true
    • upvotescount: The number of up votes for this track.
      • Required: yes
      • Type: number
      • Example: 1
    • your_vote: A Vote object is returned if the requesting user has voted for this track. This key is always present. It will return null if there is not a current user or the current user has not voted.

      • Required: yes
      • Type:
        • object
        • null
      • id: The unique identifier for the vote.
        • Required: yes
        • Type: Integer
        • Example: 1
      • owner_id: The owner ID for the user casting the vote.
        • Required: yes
        • Type: Integer
        • Example: 1
      • owner_type: The polymorphic owner type. Can be Account or GuestAccount.
        • Required: yes
        • Type: String
        • Example: Account
      • track_id: The track ID to vote for.
        • Required: yes
        • Type: Integer
        • Example: 1
      • up: If this is an up vote. Default is true. False indicates a down vote.
        • Required: yes
        • Type: boolean
        • Example: true

Response Codes

Successful Response Codes

  • 200: The request was successful.

Failure Response Codes

  • 404: Indicates the track could not be found.