Get a track by id
curl --request GET \
--url http://localhost:6063/tracks/{id}import requests
url = "http://localhost:6063/tracks/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:6063/tracks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6063",
CURLOPT_URL => "http://localhost:6063/tracks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:6063/tracks/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:6063/tracks/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6063/tracks/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"album": "Birds In The Trap Sing McKnight",
"album_art": "89cb92505e4bbe0560bbcda6280a202a.jpg",
"album_artist": "Travis Scott",
"album_id": "cm5zvhb22009lwg6dnvablpbc",
"artist": "Travis Scott",
"artist_id": "cm5zvhb21008ewg6dvgqsa9rx",
"bitrate": 320,
"composer": "Mike Dean, Matthew Samuels, Tyler Williams, Jacques Webster, Abel \"The Weeknd\" Tesfaye",
"created_at": 1737064715,
"disc_number": 1,
"filesize": 8680548,
"frequency": 44100,
"genre_id": "",
"id": "cm5zvhcnd02olwg6dxlapwu92",
"is_remote": false,
"length": 216991,
"md5": "961b2782d0910101aa5d6c90b49f077e",
"path": "/home/tsiry/Music/Travis Scott/[E] Birds In The Trap Sing McKnight [64819399] [2016]/14 - Travis Scott - wonderful(Explicit).m4a",
"title": "wonderful",
"track_number": 14,
"updated_at": 1737064715,
"year": 2016,
"year_string": "2016-09-03"
}Tracks
Get a track by id
GET
/
tracks
/
{id}
Get a track by id
curl --request GET \
--url http://localhost:6063/tracks/{id}import requests
url = "http://localhost:6063/tracks/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:6063/tracks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "6063",
CURLOPT_URL => "http://localhost:6063/tracks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:6063/tracks/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:6063/tracks/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:6063/tracks/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"album": "Birds In The Trap Sing McKnight",
"album_art": "89cb92505e4bbe0560bbcda6280a202a.jpg",
"album_artist": "Travis Scott",
"album_id": "cm5zvhb22009lwg6dnvablpbc",
"artist": "Travis Scott",
"artist_id": "cm5zvhb21008ewg6dvgqsa9rx",
"bitrate": 320,
"composer": "Mike Dean, Matthew Samuels, Tyler Williams, Jacques Webster, Abel \"The Weeknd\" Tesfaye",
"created_at": 1737064715,
"disc_number": 1,
"filesize": 8680548,
"frequency": 44100,
"genre_id": "",
"id": "cm5zvhcnd02olwg6dxlapwu92",
"is_remote": false,
"length": 216991,
"md5": "961b2782d0910101aa5d6c90b49f077e",
"path": "/home/tsiry/Music/Travis Scott/[E] Birds In The Trap Sing McKnight [64819399] [2016]/14 - Travis Scott - wonderful(Explicit).m4a",
"title": "wonderful",
"track_number": 14,
"updated_at": 1737064715,
"year": 2016,
"year_string": "2016-09-03"
}Path Parameters
Response
Track
Duration in milliseconds
⌘I