Get AI summaries of any video or article — Sign up free
OnSong Connect API thumbnail

OnSong Connect API

OnSong App·
5 min read

Based on OnSong App's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

OnSong Connect API is a REST-style local service that returns JSON for interacting with an OnSong library.

Briefing

OnSong Connect API lets developers build custom apps that read and manipulate an OnSong library—whether the library is being used on stage or stored elsewhere—through a local, REST-style service that returns JSON. The practical payoff is immediate: once an app authenticates and registers a device, it can list songs, search by query, fetch detailed metadata, and retrieve or export song content (including external files) over the network.

The walkthrough starts by turning an iPad into a Connect server from the iOS app’s Share menu. After enabling “Share your library with others,” the iPad appears in the servers list with an IP address and port. Developers then open API documentation via a browser using the server’s address and the fixed port (spelled out as 5076). From there, the core requirement becomes clear: every request must include an auth token (“off token”) that is at least 16 characters long. The token must be stored by the client application and reused for subsequent calls. Before the token works, the device must be accepted by the iPad—an initial “not currently accepting users” response flips to “accepted” after the iPad grants permission.

With authentication in place, the API behaves like a set of straightforward endpoints. A GET request to a songs endpoint returns an array of song records, including fields such as id, title, artist, favorite status, and key. Query string parameters enable filtering; for example, adding q=love returns a smaller subset of songs matching that term. The same pattern extends to books: a books endpoint lists available books, and songs can be scoped to a specific book using a book parameter (e.g., songs?book=christmas). Fetching one song’s details uses the song’s id appended to the songs URL, returning structured properties like styles, keywords, duration, and chord-related information.

The most operationally useful part is content retrieval. For songs with embedded text content, calling /content returns the actual lyric/chord text. For songs that reference an external file, the API indicates this via a file-related property; in that case, requesting /file returns an attachment (the example shows a PDF). The export workflow is also built in: requesting content in different formats (such as content.pdf, content.html, xml, or plain text) triggers server-side generation of the requested representation. The result is a developer-friendly way to integrate OnSong library data into projection tools, editors, or other stage workflows without reimplementing OnSong’s internal formats.

Overall, the Connect API is presented as a local-network bridge between OnSong’s library and custom software—fast enough for interactive use, structured enough for automation, and flexible enough to handle both embedded content and external attachments through consistent REST endpoints and query parameters.

Cornell Notes

OnSong Connect API provides a REST service that returns JSON for interacting with an OnSong library over a local network. After enabling library sharing on an iPad, developers authenticate using an auth token (minimum 16 characters) and must get the device accepted before requests succeed. Once registered, GET requests can list songs and books, filter songs with query strings (like q=love), and fetch song metadata by id. Content endpoints support retrieving embedded text and downloading external attachments via /file. Export options let clients request content in multiple formats such as PDF, HTML, XML, or plain text using variations of the /content endpoint.

What must be done before an app can make successful Connect API calls?

Each request needs an auth token (at least 16 characters). The client must store and reuse the same token for every request. Before the token is accepted, the iPad may respond that it isn’t accepting users; the device must be explicitly accepted from the iPad side (the walkthrough shows switching to the iPad and tapping accept). After acceptance, the same token becomes “successfully registered,” and subsequent GET requests work.

How does a developer discover the API documentation and endpoints for a local OnSong Connect server?

The iPad runs as a Connect server after enabling “Share your library with others.” The server list shows an IP address and port. Opening a browser to the server address with the fixed port and /api (example: 10.1.10.36:5076/api) displays the API documentation and endpoint instructions.

How can a client list songs and filter them without downloading everything?

A GET request to the songs endpoint returns an array of song objects (including id, title, favorite status, artist, and key). Filtering uses query string parameters; the walkthrough demonstrates searching with q=love (songs?q=love), which returns a smaller set of matching songs.

How does the API handle organizing content by books?

A GET request to the books endpoint lists available books (example: one book named “christmas”). Songs can then be scoped to a book by adding a query string parameter to the songs endpoint (example: songs?book=christmas), returning only songs in that book.

What’s the difference between retrieving song metadata and retrieving song content?

Song metadata is fetched by requesting a specific song via its id appended to the songs URL; the response includes structured properties like styles, keywords, duration, and chord-related details. Song content is retrieved separately using /content. If a song uses an external file, the content may not appear in /content; instead, /file returns the attachment (the example shows a PDF download).

How can a client request the same song content in different formats?

The content endpoint supports export-style format requests. The walkthrough shows requesting content.pdf to generate a PDF, and also mentions other supported formats such as HTML, XML (open song file format), and plain text. The server generates the requested representation, and the client can then download or display it.

Review Questions

  1. Why does the auth token need to be accepted by the iPad before requests succeed, and what happens if the token isn’t yet accepted?
  2. Describe the sequence of endpoints needed to go from listing songs to retrieving a specific song’s exported content in a chosen format.
  3. How would you handle a song that has no embedded content but instead references an external PDF file?

Key Points

  1. 1

    OnSong Connect API is a REST-style local service that returns JSON for interacting with an OnSong library.

  2. 2

    An iPad must be configured as a server by enabling “Share your library with others,” after which it appears with an IP address and port.

  3. 3

    Every API request requires an auth token of at least 16 characters, and the token must be reused across requests.

  4. 4

    The device must be accepted by the iPad; otherwise requests can fail with a “not currently accepting users” response.

  5. 5

    GET requests can list songs and books, and query strings (like q=love or book=christmas) filter results.

  6. 6

    Song metadata is retrieved by song id, while song content is retrieved via /content and may require /file when an external attachment is used.

  7. 7

    Content can be exported on demand by requesting formats such as content.pdf, HTML, XML, or plain text.

Highlights

Authentication isn’t just about sending a token—device acceptance on the iPad side is required before the token registers successfully.
Filtering is handled with simple query strings, demonstrated with songs?q=love and songs?book=christmas.
Content retrieval splits into two paths: /content for embedded text and /file for external attachments like PDFs.
Export formats are requested directly through the content endpoint (e.g., content.pdf), letting clients generate the representation they need.

Topics

  • OnSong Connect API
  • REST Authentication
  • Song Search
  • Content Export
  • Local Networking

Mentioned