TrackResource Resource

GET /tracks

Request Parameters
name type description
X-Ignore-Distributed header Request all tracks to be returned regardless of distribution status
X-Ignore-Status header Request all tracks to be returned regardless of status
albumIds query
trackIds query
Response Codes
code condition
200 The track for the provided track id was returned.
404 The provided track id does not correspond to an available track.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom)

Example

Request
GET /tracks
Content-Type: application/xml
Accept: application/xml;charset=utf-8
X-Ignore-Distributed: ...
X-Ignore-Status: ...

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

                
...
                
              

POST /tracks

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

Request Body
media type data type description
application/xml MTTrack (XML) the SerialTrack which is to be created.
Response Codes
code condition
200 The track was created.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) the created SerialTrack.

Example

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

                
<track>
  <album>
    <comment>...</comment>
    <created>...</created>
    <distribute>...</distribute>
    <id>...</id>
    <library>
      <code>...</code>
      <country>...</country>
      <id>...</id>
      <name>...</name>
      <owner/>
      <status>...</status>
      <updated>...</updated>
    </library>
    <number>...</number>
    <status>...</status>
    <title>...</title>
    <updated>...</updated>
  </album>
  <alternativeTitle>...</alternativeTitle>
  <agreementRelationships>
    <agreementRelationship>
      <agreement>
        <comment>...</comment>
        <name>...</name>
        <originalPublisher/>
        <originalPublisherShare>...</originalPublisherShare>
        <subPublisherShare>...</subPublisherShare>
        <societyRelationships>
          <societyRelationship/>
        </societyRelationships>
        <id>...</id>
        <updated>...</updated>
      </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>
      <genre>
        <id>...</id>
        <name>...</name>
        <parent/>
        <updated>...</updated>
      </genre>
      <id>...</id>
      <track/>
      <updated>...</updated>
    </genreRelationship>
  </genreRelationships>
  <hierarchyNodeRelationships>
    <hierarchyNodeRelationship>
      <created>...</created>
      <hierarchyNode>
        <created>...</created>
        <id>...</id>
        <name>...</name>
        <parent/>
        <title>...</title>
        <updated>...</updated>
      </hierarchyNode>
      <id>...</id>
      <updated>...</updated>
    </hierarchyNodeRelationship>
  </hierarchyNodeRelationships>
  <id>...</id>
  <keywordRelationships>
    <keywordRelationship>
      <id>...</id>
      <keyword>
        <id>...</id>
        <name>...</name>
        <parent/>
        <updated>...</updated>
      </keyword>
      <track/>
      <updated>...</updated>
    </keywordRelationship>
  </keywordRelationships>
  <number>...</number>
  <parent/>
  <publicDomain>...</publicDomain>
  <shares>
    <share>
      <id>...</id>
      <role>...</role>
      <stakeholder>
        <cae>...</cae>
        <comment>...</comment>
        <id>...</id>
        <name>...</name>
        <type>...</type>
        <updated>...</updated>
      </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>

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

                
...
                
              

GET /tracks/search

Search for tracks.

Request Parameters
name type description
loadEntities query a boolean indicating if entities should be returned along with the response. If set to false only entity ids will be returned. Defaults to false.
maxSuggestionsPerCategory query an int holding the maximum number of suggestions which will be returned for each applicable filters category. Defaults to unlimited.
page query an int holding the page number which is to be returned. Numbering starts on 1. Defaults to 1.
pageSize query an int holding the number of entities which are to be returned for the page. Defaults to 50.
phrase query a String holding a search phrase. Required.
sort query a comma separated String holding the fields which results are to be sorted by. Each field is a combination of the field name and the sort direction, e.g. track_title:asc. Respected fields are track_number, track_title, track_type, track_version, track_alternativetitle, track_year, track_bpm,track_pd track_created,album_number,album_title library_name,library_code. Defaults to no sorting.
trackTitleMustContainPhrase query a boolean indicating if the track title field must contain the provided phrase (if provided). Defaults to false
Response Codes
code condition
200 The track for the provided track id was returned.
500 An error occured.

Example

Request
GET /tracks/search
Content-Type: application/xml

                
...
                
              
Response
HTTP/1.1 200 OK

              

DELETE /tracks/{trackId}

Deletes a track.

Request Parameters
name type description
trackId path a String holding an id which represents the track which is to be deleted.
Response Codes
code condition
204 The track was deleted.
404 The track does not exist.
500 An error occured.

Example

Request
DELETE /tracks/{trackId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

PUT /tracks/{trackId}

Updates a track.

Request Parameters
name type description
trackId path a String holding an id which represents the track which is to be updated.
Request Body
media type data type description
application/xml MTTrack (XML) the SerialTrack which is to be updated.
Response Codes
code condition
200 The track was updated.
400 The resource ID does not match the payload ID.
404 The track does not exist.
409 The track has been updated or deleted by another process.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) the updated SerialTrack.

Example

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

                
<track>
  <album>
    <comment>...</comment>
    <created>...</created>
    <distribute>...</distribute>
    <id>...</id>
    <library>
      <code>...</code>
      <country>...</country>
      <id>...</id>
      <name>...</name>
      <owner/>
      <status>...</status>
      <updated>...</updated>
    </library>
    <number>...</number>
    <status>...</status>
    <title>...</title>
    <updated>...</updated>
  </album>
  <alternativeTitle>...</alternativeTitle>
  <agreementRelationships>
    <agreementRelationship>
      <agreement>
        <comment>...</comment>
        <name>...</name>
        <originalPublisher/>
        <originalPublisherShare>...</originalPublisherShare>
        <subPublisherShare>...</subPublisherShare>
        <societyRelationships>
          <societyRelationship/>
        </societyRelationships>
        <id>...</id>
        <updated>...</updated>
      </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>
      <genre>
        <id>...</id>
        <name>...</name>
        <parent/>
        <updated>...</updated>
      </genre>
      <id>...</id>
      <track/>
      <updated>...</updated>
    </genreRelationship>
  </genreRelationships>
  <hierarchyNodeRelationships>
    <hierarchyNodeRelationship>
      <created>...</created>
      <hierarchyNode>
        <created>...</created>
        <id>...</id>
        <name>...</name>
        <parent/>
        <title>...</title>
        <updated>...</updated>
      </hierarchyNode>
      <id>...</id>
      <updated>...</updated>
    </hierarchyNodeRelationship>
  </hierarchyNodeRelationships>
  <id>...</id>
  <keywordRelationships>
    <keywordRelationship>
      <id>...</id>
      <keyword>
        <id>...</id>
        <name>...</name>
        <parent/>
        <updated>...</updated>
      </keyword>
      <track/>
      <updated>...</updated>
    </keywordRelationship>
  </keywordRelationships>
  <number>...</number>
  <parent/>
  <publicDomain>...</publicDomain>
  <shares>
    <share>
      <id>...</id>
      <role>...</role>
      <stakeholder>
        <cae>...</cae>
        <comment>...</comment>
        <id>...</id>
        <name>...</name>
        <type>...</type>
        <updated>...</updated>
      </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>

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

                
...
                
              

GET /tracks/{trackId}/download

Returns an audio stream for download.

Request Parameters
name type description
X-Company-Name header The company name which is to be written to the owner field in the file metadata.
X-Composer-Prefix header A suffix which is to be written to the composer field in the file metadata.
X-External-User-ID header An integer representing an external user ID
X-Filename-Format header The name of a filename formatter. See filenameFormat for available formats.
trackId path a String holding the id for which the audio stream is to be returned.
fileType query a SerialAudioFileType representing the file type which is to be downloaded.

Example

Request
GET /tracks/{trackId}/download
Content-Type: */*
X-Company-Name: ...
X-Composer-Prefix: ...
X-External-User-ID: ...
X-Filename-Format: ...

                
...
                
              
Response
HTTP/1.1 200 OK

              

GET /tracks/{trackId}/stream

Returns an audio stream for playback. This method will only return audio streams for audio files of playback quality / low quality.

Request Parameters
name type description
Content-Range header This method will return only parts of the audio stream as requested by any provided 'Content-Range' header.
If-None-Match header This method will return a 304 if the value for 'If-None-Match' equals the value that would be returned for the 'Etag' response header.
X-External-User-ID header An integer representing an external user ID
trackId path a String holding the id for the track for which the audio stream is to be returned.

Example

Request
GET /tracks/{trackId}/stream
Content-Type: */*
Content-Range: ...
If-None-Match: ...
X-External-User-ID: ...

                
...
                
              
Response
HTTP/1.1 200 OK

              

PUT /tracks/{trackId}/streamed

Register playback of an audio stream. This method will register playback of an playback quality / low quality audio stream.

Request Parameters
name type description
X-External-User-ID header An integer representing an external user ID
trackId path a String holding the id for the track for which the playback of an audio stream is to be registered

Example

Request
PUT /tracks/{trackId}/streamed
Content-Type: */*
X-External-User-ID: ...

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /tracks/{trackId}/waveform

Returns a waveform for a track.

Request Parameters
name type description
If-None-Match header This method will return a 304 if the value for 'If-None-Match' equals the value that would be returned for the 'Etag' response header.
trackId path a String holding the id for the track for which the waveform is to be returned.

Example

Request
GET /tracks/{trackId}/waveform
Content-Type: */*
If-None-Match: ...

                
...
                
              
Response
HTTP/1.1 200 OK