TrackGenreRelationshipResource Resource

GET /trackgenrerelationships

Returns all relationships between tracks and genres optionally filtered by one or more available filtering options.

Request Parameters
name type description
trackGenreRelationshipIds query a String holding one or more ids (separated by comma) for which corresponding relationships are to be returned.
trackIds query a String a String holding one or more track ids (separated by comma) for which corresponding relationships are to be returned.
Response Codes
code condition
200 One or more relationships were successfully returned.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) zero or more SerialTrackGenreRelationship.

Example

Request
GET /trackgenrerelationships
Content-Type: */*
Accept: application/xml;charset=utf-8

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...
                
              

POST /trackgenrerelationships

Creates a relationships between a track and a genre. Regardless of the provided state of the fields id and updated, these fields will be automatically populated upon creation.

Request Body
media type data type description
application/xml MTTrackGenreRelationship (XML) a list holding SerialTrackGenreRelationship which are to be created.
Response Codes
code condition
200 The relationship was successfully created.
409 The relationship conflicts with existing relationships
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) a list holding the SerialTrackGenreRelationship which has been created.

Example

Request
POST /trackgenrerelationships
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
<trackGenreRelationship>
  <genre>
    <id>...</id>
    <name>...</name>
    <parent/>
    <updated>...</updated>
  </genre>
  <id>...</id>
  <track>
    <album>
      <comment>...</comment>
      <created>...</created>
      <distribute>...</distribute>
      <id>...</id>
      <library/>
      <number>...</number>
      <status>...</status>
      <title>...</title>
      <updated>...</updated>
    </album>
    <alternativeTitle>...</alternativeTitle>
    <agreementRelationships>
      <agreementRelationship>
        <agreement/>
        <id>...</id>
        <track/>
        <value>...</value>
        <updated>...</updated>
      </agreementRelationship>
    </agreementRelationships>
    <audioFiles>
      <audioFile>
        <bitRate>...</bitRate>
        <duration>...</duration>
        <id>...</id>
        <quality>...</quality>
        <sampleRate>...</sampleRate>
        <size>...</size>
        <track/>
        <type>...</type>
        <updated>...</updated>
      </audioFile>
    </audioFiles>
    <bpm>...</bpm>
    <created>...</created>
    <description>...</description>
    <genreRelationships>
      <genreRelationship/>
    </genreRelationships>
    <hierarchyNodeRelationships>
      <hierarchyNodeRelationship>
        <created>...</created>
        <hierarchyNode/>
        <id>...</id>
        <updated>...</updated>
      </hierarchyNodeRelationship>
    </hierarchyNodeRelationships>
    <id>...</id>
    <keywordRelationships>
      <keywordRelationship>
        <id>...</id>
        <keyword/>
        <track/>
        <updated>...</updated>
      </keywordRelationship>
    </keywordRelationships>
    <number>...</number>
    <parent/>
    <publicDomain>...</publicDomain>
    <shares>
      <share>
        <id>...</id>
        <role>...</role>
        <stakeholder/>
        <track/>
        <value>...</value>
        <updated>...</updated>
      </share>
    </shares>
    <status>...</status>
    <title>...</title>
    <token>...</token>
    <version>...</version>
    <versioned>...</versioned>
    <versionType>...</versionType>
    <year>...</year>
    <updated>...</updated>
  </track>
  <updated>...</updated>
</trackGenreRelationship>

                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...
                
              

DELETE /trackgenrerelationships/{trackGenreRelationshipIds}

Deletes a relationship between a track and a genre.

Request Parameters
name type description
trackGenreRelationshipIds path a String holding one or more relationship ids which represents the relationships that are to deleted. Required
Response Codes
code condition
204 The relationship was successfully deleted.
500 An error occured.
Response Body
media type data type description
application/xml list of MTTrackGenreRelationship (XML)

Example

Request
DELETE /trackgenrerelationships/{trackGenreRelationshipIds}
Content-Type: application/xml
Accept: application/xml

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/xml

                
<list>
  <trackGenreRelationship>
    <genre>
      <id>...</id>
      <name>...</name>
      <parent/>
      <updated>...</updated>
    </genre>
    <id>...</id>
    <track>
      <album>
        <comment>...</comment>
        <created>...</created>
        <distribute>...</distribute>
        <id>...</id>
        <library/>
        <number>...</number>
        <status>...</status>
        <title>...</title>
        <updated>...</updated>
      </album>
      <alternativeTitle>...</alternativeTitle>
      <agreementRelationships>
        <agreementRelationship>
          <agreement/>
          <id>...</id>
          <track/>
          <value>...</value>
          <updated>...</updated>
        </agreementRelationship>
      </agreementRelationships>
      <audioFiles>
        <audioFile>
          <bitRate>...</bitRate>
          <duration>...</duration>
          <id>...</id>
          <quality>...</quality>
          <sampleRate>...</sampleRate>
          <size>...</size>
          <track/>
          <type>...</type>
          <updated>...</updated>
        </audioFile>
      </audioFiles>
      <bpm>...</bpm>
      <created>...</created>
      <description>...</description>
      <genreRelationships>
        <genreRelationship/>
      </genreRelationships>
      <hierarchyNodeRelationships>
        <hierarchyNodeRelationship>
          <created>...</created>
          <hierarchyNode/>
          <id>...</id>
          <updated>...</updated>
        </hierarchyNodeRelationship>
      </hierarchyNodeRelationships>
      <id>...</id>
      <keywordRelationships>
        <keywordRelationship>
          <id>...</id>
          <keyword/>
          <track/>
          <updated>...</updated>
        </keywordRelationship>
      </keywordRelationships>
      <number>...</number>
      <parent/>
      <publicDomain>...</publicDomain>
      <shares>
        <share>
          <id>...</id>
          <role>...</role>
          <stakeholder/>
          <track/>
          <value>...</value>
          <updated>...</updated>
        </share>
      </shares>
      <status>...</status>
      <title>...</title>
      <token>...</token>
      <version>...</version>
      <versioned>...</versioned>
      <versionType>...</versionType>
      <year>...</year>
      <updated>...</updated>
    </track>
    <updated>...</updated>
  </trackGenreRelationship>
</list>

                
              

PUT /trackgenrerelationships/{trackGenreRelationshipId}

Updates a relationships between a track and an genre. Regardless of the provided state of the fields id and updated, these fields will be automatically populated upon creation.

Request Parameters
name type description
trackGenreRelationshipId path a String holding a relationship id which represents the relationship that is to be updated.
Request Body
media type data type description
application/xml list of MTTrackGenreRelationship (XML) a SerialTrackGenreRelationship holding the new data for the relationship.
Response Codes
code condition
200 The relationship was successfully updated.
409 The relationship conflicts with existing relationships
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) a list holding the updated SerialTrackGenreRelationship.

Example

Request
PUT /trackgenrerelationships/{trackGenreRelationshipId}
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
<list>
  <trackGenreRelationship>
    <genre>
      <id>...</id>
      <name>...</name>
      <parent/>
      <updated>...</updated>
    </genre>
    <id>...</id>
    <track>
      <album>
        <comment>...</comment>
        <created>...</created>
        <distribute>...</distribute>
        <id>...</id>
        <library/>
        <number>...</number>
        <status>...</status>
        <title>...</title>
        <updated>...</updated>
      </album>
      <alternativeTitle>...</alternativeTitle>
      <agreementRelationships>
        <agreementRelationship>
          <agreement/>
          <id>...</id>
          <track/>
          <value>...</value>
          <updated>...</updated>
        </agreementRelationship>
      </agreementRelationships>
      <audioFiles>
        <audioFile>
          <bitRate>...</bitRate>
          <duration>...</duration>
          <id>...</id>
          <quality>...</quality>
          <sampleRate>...</sampleRate>
          <size>...</size>
          <track/>
          <type>...</type>
          <updated>...</updated>
        </audioFile>
      </audioFiles>
      <bpm>...</bpm>
      <created>...</created>
      <description>...</description>
      <genreRelationships>
        <genreRelationship/>
      </genreRelationships>
      <hierarchyNodeRelationships>
        <hierarchyNodeRelationship>
          <created>...</created>
          <hierarchyNode/>
          <id>...</id>
          <updated>...</updated>
        </hierarchyNodeRelationship>
      </hierarchyNodeRelationships>
      <id>...</id>
      <keywordRelationships>
        <keywordRelationship>
          <id>...</id>
          <keyword/>
          <track/>
          <updated>...</updated>
        </keywordRelationship>
      </keywordRelationships>
      <number>...</number>
      <parent/>
      <publicDomain>...</publicDomain>
      <shares>
        <share>
          <id>...</id>
          <role>...</role>
          <stakeholder/>
          <track/>
          <value>...</value>
          <updated>...</updated>
        </share>
      </shares>
      <status>...</status>
      <title>...</title>
      <token>...</token>
      <version>...</version>
      <versioned>...</versioned>
      <versionType>...</versionType>
      <year>...</year>
      <updated>...</updated>
    </track>
    <updated>...</updated>
  </trackGenreRelationship>
</list>

                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...