Descriptor/MusicGenres
Returns the music genres, subgenres, and styles recognized by Rovi Music.
Syntax
descriptor/musicgenres?apikey=apikey&sig=sig [&include=include] [&format=format] [&country=country] [&language=language]
Request Example 1
- Request the list of music genres.
Request Example 2
- Request the list of music genres with subgenres.
Request Example 3
- Request the list of music genres with both subgenres and styles in an XML response.
Request Parameters
Click to re-sort
Parameter | Required | Description |
apikey | Yes | Access code that authorizes your request for data from Rovi. |
sig | Yes | A calculated, 32-hex-digit authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three ASCII strings:
- Your API key.
- The secret key you received with your API key.
- The Unix time. Unix time is a timestamp supported in most development environments, and is generally defined as the number of seconds since January 1, 1970 00:00:00 GMT.
Express the alpha hex digits as lower case.
Perform the calculation at the time of each request to be sure it's within a five-minute window of the server time. If you're testing the call in a browser, use our online signature generator to perform the calculation. |
country | No | Country the language parameter applies to. The current release of the API supports only US. |
format | No | Format of the returned data: json or xml. The default is JSON. |
include | No | Additional information you want to be included about each genre. The possible values are:
| Includes the subgenres and music styles of the returned genres. |
| Includes the subgenres of the returned genres. |
For example, to include subgenres in the response, add include=subgenres. |
language | No | Language of the response data. This request supports only en (English). |
Response
Response | Type | Description |
build | string | The software release level of the API. |
code | integer | HTTP status code. See the status field for the text part of the code. |
duration | integer | Server processing time in milliseconds. The difference between startTime and endTime. |
endTime | string | When the server sent the response (UTC time). |
messages | Message [ ] | Elements of a multiple HTTP response status message. |
parameters | parameters | The parameters that were included in the request. |
serverName | string | Name of the server that processed the request. |
startTime | string | When the server received the request (UTC time). |
status | string | Text part of the HTTP status code, which is shown in the code field. |
view | view | Summary of items returned in a list of items. |
Response for Descriptor/MusicGenres
Response | Type | Description |
genres | Genre [ ] | Genres and, if requested, the subgenres and styles. |
Response Example 1
- Here's the first two genres from Request Example 1. The response has been edited to reduce the length and formatted to make it easy to read.
- Requested with http://api.rovicorp.com/data/v1.1/descriptor/musicgenres?apikey=apikey&sig=sig.
{
"status":"ok",
"code":200,
"messages":null,
"build":"1.5.1.9",
"parameters":{
"apiKey":"apikey",
"id":null
},
"view":{
"total":21
},
"serverName":"tul1cssw2",
"startTime":"2011-04-28T23:18:09.9533342Z",
"endTime":"2011-04-28T23:18:09.9689593Z",
"duration":15,
"genres":[
{
"id":"MA0000012170",
"name":"Avant-Garde",
"type":"Music Genre"
},
{
"id":"MA0000002467",
"name":"Blues",
"type":"Music Genre"
}
]
}
Response Example 2
- Here's the first genre and first two subgenres from Request Example 2. The response has been edited to reduce the length and formatted to make it easy to read.
- Requested with http://api.rovicorp.com/data/v1.1/descriptor/musicgenres?apikey=apikey&sig=sig&
include=subgenres.
{
"status":"ok",
"code":200,
"messages":null,
"build":"1.7.2.5",
"parameters":{
"apiKey":"4p1k3y",
"id":null,
"include":"subgenres"
},
"view":{
"total":21
},
"serverName":"tul1cssw4",
"startTime":"2011-10-07T02:03:32.1015551Z",
"endTime":"2011-10-07T02:03:32.1015551Z",
"duration":0,
"genres":[
{
"id":"MA0000012170",
"name":"Avant-Garde",
"type":"Music Genre",
"subgenres":[
{
"id":"MA0000012238",
"name":"Computer Music",
"type":"Music SubGenre"
},
{
"id":"MA0000011891",
"name":"Conceptual Art",
"type":"Music SubGenre"
}
]
}
]
}
XML Response Example
- Here's part of a response to Request Example 3, which asks for the list of music genres, subgenres, and styles in an XML response. The response has been edited to reduce the length.
- Requested with http://api.rovicorp.com/data/v1.1/descriptor/musicgenres?apikey=apikey&sig=sig&
include=all&format=xml.
<MusicGenres xmlns="com.rovicorp.metadataservice" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<status>ok</status>
<code>200</code>
<messages i:nil="true"/>
<build>1.7.2.5</build>
<parameters>
<apiKey>4p1k3y</apiKey>
<id i:nil="true"/>
<include>all</include>
<format>xml</format>
</parameters>
<view>
<total>21</total>
</view>
<serverName>tul1cssw4</serverName>
<startTime>2011-10-07T02:24:06.0624077Z</startTime>
<endTime>2011-10-07T02:24:06.0624077Z</endTime>
<duration>0</duration>
<genres>
<Genre>
<id>MA0000002532</id>
<name>Country</name>
<type>Music Genre</type>
<subgenres>
<subgenre>
<id>MA0000004415</id>
<name>Americana</name>
<type>Music SubGenre</type>
</subgenre>
<subgenre>
<id>MA0000002443</id>
<name>Bakersfield Sound</name>
<type>Music SubGenre</type>
</subgenre>
<subgenre>
<id>MA0000002466</id>
<name>Bluegrass</name>
<type>Music SubGenre</type>
<styles>
<style>
<id>MA0000011818</id>
<name>Contemporary Bluegrass</name>
<type>Music Style</type>
</style>
<style>
<id>MA0000012360</id>
<name>Progressive Bluegrass</name>
<type>Music Style</type>
</style>
<style>
<id>MA0000011963</id>
<name>Traditional Bluegrass</name>
<type>Music Style</type>
</style>
</styles>
</subgenre>
<subgenre>
<id>MA0000012138</id>
<name>Close Harmony</name>
<type>Music SubGenre</type>
</subgenre>
</subgenres>
</Genre>
</genres>
</MusicGenres>
See Also
-
↑ Top