Get tracks types
This endpoint retrieves the types of tracks available on the music library.
Requirements
Authentication
Scope
Request example
- Console
- JavaScript
- Python
- PHP - CURL
curl --request GET \
--url https://api.bunnystudio.com/tracks/types \
--header "x-access-token: YOUR_TOKEN" \
const url = 'https://api.bunnystudio.com/tracks/types';
const options = {
method: 'GET',
headers: {
'x-access-token': 'YOUR_TOKEN',
}
};
fetch(url, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
import json
api_url = "https://api.bunnystudio.com/tracks/types"
headers = {
'x-access-token': 'YOUR_TOKEN',
}
response = requests.get(api_url, headers=headers)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.bunnystudio.com/tracks/types',
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-access-token': 'YOUR_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response format
id
string
The id of the type of music
The id of the type of music
name
string
The name of the type of music
The name of the type of music
Response example
[
{
"id": "mood",
"name": "mood",
}
...
]