ccMixter - Sample Pool API 2.0 [BETA]
Reloaded Event
Mixter+
skip
Not logged in
Find content
Collaborative Community
The Mixversation
Picks
Remixes
Samples
A Cappellas
People
Extras
Sample Pool API 2.0 [BETA]
The Sample Pool API allows two media hosting servers to keep track of when one uses samples from
another. It is a RESTful API meaning URL goes in and XML comes out. The returning
XML is in the form of a feed (RSS or Atom) with enclosures for downloading media.
Passive Sample Pools
To be a 'passive' sample pool means that you make sources available for sampling,
but you don't care to keep track of how those samples are being used. In that case
you only need to implement two URLs:
ccHost installations (like ccMixter.org) will keep a detailed sample history of your material with links back to your site (
Example
.)
URL
Query string
Returns
key
value
/info
The general info for a pool. Just return a channel info without any items.
(Example:
/search
query
search terms
RSS or Atom feed of matching results. The 'guid' (or 'id') element in these are
used for further inquiries like '/file' and '/ubeensampled'. Default type of search is 'any' if none
is specified. (Example:
type
One of:
any
Match any terms
all
Match all terms
phrase
Match exact phrase
limit
Limits the number of items returned (e.g.
limit=20
offset
Return items starting at a given zero-based offset (e.g.
offset=40
format
One of:
rss
Return a RSS 2.0 feed (default)
atom
Return an ATOM 1.0 feed
count
Return a count of times
*Proposed for version 2.0
Tracking Sample Pools
If you do want to keep track of who is remixing material on your site, then you need to implement two more:
URL
Query string
Returns
key
value
/file
guid
file_guid
An RSS feed with a single item in it as identified by 'guid'
(Example:
/ubeensampled
guid
source_guid
Returns nothing (or an 'OK' xml status if you like) -- This is strictly a notification
to let you know that something on your site has been remixed. The ccHost implementation
will call back to the pool site to get information about the remix so it can display
this information in the 'Sampled from this have been used in' user interface.
'guid' refers to an upload on your server
'remixguid' refers to the remote remix
'poolsite' base API URL of the remote pool.
Use the form
poolsite
/file?guid=
remixguid
to find out more about the remix.
remixguid
remix_guid
poolsite
url to calling pool
Example
Assume that example1.com has source media for an artist called 'Brad Sucks' that a user at example2.com has downloaded,
remixed and wants to upload to example2.com. Assume that base API url for both is at /api/pool.
example2.com calls to example1.com to query for the exact information:
example1.com responds with an RSS feed with all sources matching the phrase 'brad sucks'.
The user at example2.com selects the matching source and example2.com extracts the guid for
that source, combines it with the new guid for the user's upload and notifies example1.com of
that the remix has occured (URL has been broken across lines for readability):
?guid=http://example1.com/files/49565
&remixid=http://example2.com/files/43923
&pootsite=http://example2.com/api/pool
The actual guids are extracted from the RSS feed results from '/search' so it
does not matter what format they are. In this case both servers use URLs but that
is totally up to each implementation.
Sample Feed
When exchanging media information a standard, validing RSS or ATOM is expected (the
same thing you're already putting out for podcasts in the case of music sites). Creative
Commons license information should be included:
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
http://cchost.org
http://cchost.org/files/aerosolspray/3374
length="952466"
type="audio/x-ms-wma">
The ATOM version is still being tested but this is the current format that should work:
href="http://cchost.org/files/aerosolspray/3374" type="text/html">
href="http://cchost.org/people/aerosolspray/aerosolspray_-_Generation_Defects.wma"
length="952466"
type="audio/x-ms-wma">
href="http://creativecommons.org/licenses/by-nc/2.5/"
type="text/html">
Visitors
Find Music
Forums
About
Looking for...?
Artists
Search our archives for
music for your video,
podcast or school project
at
dig.ccMixter
New Remixes
Garden Gates
The Girl Who ...
Leave Iran al...
Territorial M...
Backpocket Bl...
More new remixes
New Uploads
Equable Groov...
Garden Gates
Slow Ride Blu...
2026 04 21 mo...
The Girl Who ...
More new uploads
Editors' Picks
Last Letter H...
Conversation ...
925
The Captain I...
Service Chang...
More picks...
Highest Rated
Malre Bell...
Last Lette...
The map is...
Territoria...
Blue Walle...
Backpocket...
Recent Reviewers
Radioontheshe...
texasradiofis...
Speck
Javolenus
Martijn de Bo...
Apoxode
RebeccaWisbey
More reviews...
Support ccMixter
This text and images on this site are licensed under a
Creative Commons Attribution-Noncommercial 4.0 International License
This site uses
ccHost
, licensed under
CC-GNU-GPL
, which is a product of the
ccTools
project and uses
GetID3
. This site is sponsored by
ArtisTech Media
. By using this site, you agree to our
and
Please note our
site credits
. Contact:
site administrator