ShareResource Resource

GET /shares

Returns all shares optionally filtered by one or more available filtering options.

Request Parameters
name type description
albumIds query a String holding one or more SerialAlbum ids (separated by comma) which results are to be filtered by.
shareIds query a String holding one or more SerialShare ids (separated by comma) which results are to be filtered by
trackIds query a String holding one or more SerialTrack ids (separated by comma) which results are to be filtered by
Response Codes
code condition
200 Zero or more shares were returned.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) zero or more SerialShare.

Example

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

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

                
...
                
              

POST /shares

Creates one or more shares between a track and a stakeholder. Regardless of the provided state of the fields id and updated, these fields will be automatically populated upon creation. If any given track is associated only with shares (and not agreementRelationships) then the sum of shares must be less than or equal to 100%. If a track is associated with both shares and agreementRelationships then the sum of agreementRelationships + shares must equal exactly 100%.

Request Body
media type data type description
application/xml list of MTShare (XML) a list holding SerialShare which are to be created.
Response Codes
code condition
200 One or more shares were successfully created.
409 One or more shares conflicts with existing shares
422 One or more relationships failed validation.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) a list holding the SerialShare which has been created.

Example

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

                
<list>
  <share>
    <id>...</id>
    <role>...</role>
    <stakeholder>
      <cae>...</cae>
      <comment>...</comment>
      <id>...</id>
      <name>...</name>
      <type>...</type>
      <updated>...</updated>
    </stakeholder>
    <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>
          <genre/>
          <id>...</id>
          <track/>
          <updated>...</updated>
        </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/>
      </shares>
      <status>...</status>
      <title>...</title>
      <token>...</token>
      <version>...</version>
      <versioned>...</versioned>
      <versionType>...</versionType>
      <year>...</year>
      <updated>...</updated>
    </track>
    <value>...</value>
    <updated>...</updated>
  </share>
</list>

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

                
...
                
              

PUT /shares/{oldShareIds}

Replaces one or more shares between a track and a stakeholder. Simply put, the old shares are deleted and the new shares are created - all within one atomic operation. Regardless of the provided state of the fields id and updated, these fields will be automatically populated upon creation. If any given track is associated only with shares (and not agreementRelationships) then the sum of shares must be less than or equal to 100%. If a track is associated with both shares and agreementRelationships then the sum of agreementRelationships + shares must equal exactly 100%.

Request Parameters
name type description
oldShareIds path a String holding one or more share ids which represents the old shares that are to be replaced.
Request Body
media type data type description
application/xml list of MTShare (XML) a list holding a list of replacement SerialShare.
Response Codes
code condition
200 One or more shares were successfully updated.
409 One or more relationships conflicts with existing relationships
422 One or more relationships failed validation.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) a list holding the replacement SerialShare.

Example

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

                
<list>
  <share>
    <id>...</id>
    <role>...</role>
    <stakeholder>
      <cae>...</cae>
      <comment>...</comment>
      <id>...</id>
      <name>...</name>
      <type>...</type>
      <updated>...</updated>
    </stakeholder>
    <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>
          <genre/>
          <id>...</id>
          <track/>
          <updated>...</updated>
        </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/>
      </shares>
      <status>...</status>
      <title>...</title>
      <token>...</token>
      <version>...</version>
      <versioned>...</versioned>
      <versionType>...</versionType>
      <year>...</year>
      <updated>...</updated>
    </track>
    <value>...</value>
    <updated>...</updated>
  </share>
</list>

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

                
...
                
              

DELETE /shares/{shareIds}

Deletes one or more shares between a track and a stakeholders. If any given track is associated only with shares (and not agreementRelationships) then the sum of shares must be less than or equal to 100%. If a track is associated with both shares and agreementRelationships then the sum of agreementRelationships + shares must equal exactly 100%.

Request Parameters
name type description
shareIds path a String holding one or more share ids (separated by comma) which represents the shares that are to be deleted. Required
Response Codes
code condition
204 One or more shares were successfully deleted.
409 One or more shares conflicts with existing shares
500 An error occured.
Response Body
media type data type description
application/xml list of MTShare (XML)

Example

Request
DELETE /shares/{shareIds}
Content-Type: application/xml
Accept: application/xml

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

                
<list>
  <share>
    <id>...</id>
    <role>...</role>
    <stakeholder>
      <cae>...</cae>
      <comment>...</comment>
      <id>...</id>
      <name>...</name>
      <type>...</type>
      <updated>...</updated>
    </stakeholder>
    <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>
          <genre/>
          <id>...</id>
          <track/>
          <updated>...</updated>
        </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/>
      </shares>
      <status>...</status>
      <title>...</title>
      <token>...</token>
      <version>...</version>
      <versioned>...</versioned>
      <versionType>...</versionType>
      <year>...</year>
      <updated>...</updated>
    </track>
    <value>...</value>
    <updated>...</updated>
  </share>
</list>