Data/music-api/v1.1/performance/composition

Jump to: navigation, search

Performance/Composition

Returns information about a composition played in a classical music performance.

Syntax

performance/composition? performanceid=performanceid
amgclassicalid=amgclassicalid
&apikey=apikey&sig=sig [&format=format] [&country=country] [&language=language]

Request Example 1

Request information about the composition played in a performance.

Request Example 2

Request the information in an XML response.

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, 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.

amgclassicalid Conditional All Media Guide (AMG) ID for a performance, consisting of a string that starts with F and is followed by 9 digits with leading spaces. For example, F  2229909. AMG is a legacy database of entertainment information.

When using an AMG classical ID in a request, replace any spaces in the ID with plus (+) or percent20 (%20) symbols, like this: F++2229909.

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

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

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

  • performanceid
  • amgclassicalid
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.
language No Language of the response data. This request supports only en (English).

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.
parametersparametersThe parameters that were 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, which is shown in the code field.

Response for Performance/Composition

ResponseTypeDescription
amgClassicalId string All Media Guide (AMG) ID for the composition, consisting of a string that starts with C and is followed by 9 digits with leading spaces. AMG is a legacy database of entertainment information.
composers CompositionComposer [ ] Composers of the music in the performance.
id string Rovi Music composition ID for the composition, consisting of a string that starts with MC and is followed by 10 digits.
title string Title of the composition.

JSON Response Example

Here's the response to Request Example 1, which asks for information about the composition played in a performance. The response is formatted with extra spaces and carriage returns to make it easy to read.
Requested with http://api.rovicorp.com/data/v1.1/performance/composition?apikey=apikey&sig=sig&
performanceid=MQ0000708761
.
{
  "status":"ok",
  "code":200,
  "messages":null,
  "build":"1.5.1.9",
  "parameters":{
    "apiKey":"apikey",
    "id":"MQ0000708761"
  },
  "serverName":"tul1cssw1",
  "startTime":"2011-04-28T00:07:17.3617398Z",
  "endTime":"2011-04-28T00:07:17.3617398Z",
  "duration":0,
  "parentIds":{
    "amgClassicalId":"F  1251391",
    "performanceId":"MQ0000708761"
  },
  "composition":{
    "id":"MC0002366840",
    "amgClassicalId":"C   34961",
    "title":"Symphony No. 9 in D minor (\"Choral\"), Op. 125",
    "composers":[
      {
        "id":"MN0000536126",
        "name":"Ludwig van Beethoven"
      }
    ]
  }
}

XML Response Example

Here's the response to Request Example 2, which asks for information in XML format about the composition played in a performance.
Requested with http://api.rovicorp.com/data/v1.1/performance/composition?apikey=apikey&sig=sig&
performanceid=MQ0000708761&format=xml
.
<PerformanceComposition 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>MQ0000708761</id>
    <format>xml</format>
  </parameters>
  <serverName>tul1cssw1</serverName>
  <startTime>2011-04-28T00:07:29.2680660Z</startTime>
  <endTime>2011-04-28T00:07:29.2680660Z</endTime>
  <duration>0</duration>
  <parentIds>
    <amgClassicalId>F 1251391</amgClassicalId>
    <performanceId>MQ0000708761</performanceId>
  </parentIds>
  <composition>
    <id>MC0002366840</id>
    <amgClassicalId>C 34961</amgClassicalId>
    <title>Symphony No. 9 in D minor (&quot;Choral&quot;), Op. 125</title>
    <composers>
      <CompositionComposer>
        <id>MN0000536126</id>
        <name>Ludwig van Beethoven</name>
      </CompositionComposer>
    </composers>
  </composition>
</PerformanceComposition>


See Also

↑ Top

Personal tools