V1.Metadata.MusicService.Composition:Parts

Jump to: navigation, search

Composition/Parts

Returns the names of the parts or movements of a classical music composition, each of which is recorded as a single track.

Syntax

composition/parts? compositionid=compositionid
amgclassicalid=amgclassicalid
&apikey=apikey&sig=sig [&format=format] [&offset=offset] [&count=count] [&country=country] [&language=language]

Request Example 1

Request the parts of the composition Also sprach Zarathustra.

Request Example 2

Request just the first five parts of the composition.

Request Example 3

Request the second part of the composition.

Request Parameters

Sort none.gif  Click to re-sort

Parameter Required Description
apikey Yes Access code that authorizes your request for data from Rovi.
sig Yes A calculated authorization code. To perform the calculation, execute the MD5 function on the concatenation of the following three 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.

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.

amgclassicalid Conditional All Media Guide (AMG) ID for a classical music composition, consisting of a ten-character string that starts with C and is followed by nine digits with leading spaces. For example: C    43235.

When using an AMG Classical ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols, like this: C++++43235. AMG is a legacy database of entertainment information.

Condition: The request must contain just one of these parameters:

  • compositionid
  • amgclassicalid
compositionid Conditional Rovi Music ID for a classical music composition, consisting of the prefix MC followed by a ten-digit number. For example: MC0002369165. Your application can grab composition IDs from responses to the following requests:

Condition: The request must contain just one of these parameters:

  • compositionid
  • amgclassicalid
count No Number of items to be returned. The default is zero, which returns all items after the offset.

Use count and offset to paginate the response.

country No Country of the language of the response. The current release of the API supports only US.
format No Format of the returned data: json or xml. The default is JSON.
language No Language of the response data. This request supports only en (English).
offset No Number of items at the start of the returned list to skip. The default is zero.

Use count and offset to paginate the response.

Response

Response Header

ResponseTypeDescription
buildStringThe software release level of the API.
codeIntegerHTTP status code. See the status field for the text part of the code.
durationIntegerServer processing time in milliseconds. The difference between startTime and endTime.
endTimeStringWhen the server sent the response (UTC time).
messagesMessage [ ]Elements of a multiple HTTP response status message.
parametersparametersList of the parameters included in the request.
parentIdsparentIdsAll of the IDs for the requested object that are recognized by the API.
serverNameStringName of the server that processed the request.
startTimeStringWhen the server received the request (UTC time).
statusStringText part of the HTTP status code that is shown in the code field.
viewviewSummary of items returned in a list of items.

Response for Composition/Parts

ResponseTypeDescription
parts String [ ] The parts or movements of the classical music composition specified in the request.

JSON Response Example

Here's the response to Request Example 2. It is formatted with extra spaces and carriage returns to make it easy to read.
{
  "status":"ok",
  "code":200,
  "messages":null,
  "build":"1.5.1.9",
  "parameters":{
    "apiKey":"apikey",
    "id":"MC0002369165",
    "offset":0,
    "count":5
  },
  "view":{
    "offset":0,
    "count":5,
    "total":9
  },
  "serverName":"tul1cssw3",
  "startTime":"2011-04-27T23:31:21.0874891Z",
  "endTime":"2011-04-27T23:31:21.0874891Z",
  "duration":0,
  "parentIds":{
    "amgClassicalId":"C   43235",
    "compositionId":"MC0002369165"
  },
  "parts":[
    "Einleitung (Introduction)",
    "Von den Hinterweltlern (Of the Backworldsmen)",
    "Von der großen Sehnsucht (Of the Great Longing)",
    "Von den Freuden und Leidenschaften (Of Joys and Passions)",
    "Das Grablied (The Song of the Grave)"
  ]
}

XML Response Example

Here's an XML response to Request Example 2.
<CompositionPartsDetail 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.5.1.9</build>
  <parameters>
    <apiKey>apikey</apiKey>
    <id>MC0002369165</id>
    <offset>0</offset>
    <count>5</count>
    <format>xml</format>
  </parameters>
  <view>
    <offset>0</offset>
    <count>5</count>
    <total>9</total>
  </view>
  <serverName>tul1cssw4</serverName>
  <startTime>2011-04-27T23:31:37.1015342Z</startTime>
  <endTime>2011-04-27T23:31:37.1171593Z</endTime>
  <duration>15</duration>
  <parentIds>
    <amgClassicalId>C 43235</amgClassicalId>
    <compositionId>MC0002369165</compositionId>
  </parentIds>
  <parts xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <a:string>Einleitung (Introduction)</a:string>
    <a:string>Von den Hinterweltlern (Of the Backworldsmen)</a:string>
    <a:string>Von der großen Sehnsucht (Of the Great Longing)</a:string>
    <a:string>Von den Freuden und Leidenschaften (Of Joys and Passions)</a:string>
    <a:string>Das Grablied (The Song of the Grave)</a:string>
  </parts>
</CompositionPartsDetail>


See Also

↑ Top

Personal tools