Application programming interface (API)

In order to use the API, you must first have an API access key. Request one here.

All requests to the API must include the oima_api_key variable in the request. The value must be a valid API key. Example: http://www.oima-amio.ca/api/artist?oima_api_key=example_api_key

This allows for programmatic access to portions of the OIMA database. All results are returned in formatted XML. A maximum of 10 results are returned per request - this is not adjustable by the request. The result includes the field total_rows which shows the number of results for the query performed. Paging can be performed by adding include page=value in the request URL. Example: api/artist?oima_api_key=example_api_key&page=2. The page number is 0-based (page 0 is the first page, results 1-10).

Field denotations:

 * Fields can be passed as a GET variable to filter by containing text; for example: 

artist_name=sample

will match artists named

Sample Artist and Lord of Samples

 ** Fields can be passed as a GET variable to select by exact match; for example:

artist_id=123

will return the artist with artist_id of 123 only.

 *** Fields can be passed as a GET variable to select by multiple exact match; for example:

album_genre=classical,reggae

will match all albums that contain the values classical or reggae (not case sensitive) in their genre field.

 

Artist Information

Request URL: /api/artist

Fields: 

  • artist_name *
  • artist_id **
  • artist_image
  • artist_location
  • artist_website

Album Information

Request URL: /api/album

Fields:

  • album_name **
  • album_id *
  • album_image
  • artist_release_file
  • album_description
  • album_genre ***
  • album_licence
  • album_year *
  • artist_id *

Track Information

Request URL: /api/track

Fields:

  • track_id *
  • track_name **
  • track_number
  • track_file
  • album_id *
  • artist_id *

Currator Information

Request URL: /api/curator

Fields:

  • curator_name
  • curator_image
  • curator_id