OnSong® Connect API

Home

OnSong® Connect is a REST-based API that runs on an OnSong® device through an in-app web server. It provides tools to connect to a device running an OnSong® app and then query its state, search songs and perform most other functions remotely.

Discovery

If you are building an application that uses OnSong® Connect, you can discover devices on the network using multicast DNS, better known as Bonjour on Apple products. Each web service broadcasts its IP address and information. OnSong®Connect will broadcast the device's IP address, using the OnSong port number 5076, or a portless configuration. However, the port is not required and can be changed. This requires additional information to be queried to determine if the device is an OnSong Connect client or server.

Once you've resolved the address of the device you should also receive TXT record data. This can be extracted into a dictionary of values which contain:

  • model - the model of the device which is being used. This displays "iPad", "iPhone", "iPod touch", etc.
  • deviceid - A unique identifier of the device for determining individual devices.
  • version - The version of OnSong running on the device.
  • role - The role of the device. Can be either "client" or "server".

API Reference

  • Authentication provides tools for authenticating against the OnSong® library.
  • Books optionally organizes songs into collections.
  • Chords manages information regarding instruments and chord diagrams.
  • Convert provides tools for converting and retrieving converted content.
  • Folders is optionally used to organize sets for different venues.
  • Hooks allows devices to be notified via standard web-based protocols.
  • Media manages audio, video and image resources in your OnSong® library.
  • Ping is used to determine if the server is enabled.
  • Sets are used to pull songs to be played for specific events.
  • Set Items are used to view and modify items in a set.
  • Settings contain information about how the OnSong® library is configured.
  • Songs are chord charts available in the OnSong® library.
  • State displays the current state of the OnSong® library such as the current set and song.
  • Video Settings are used to control external video preferences.