LDSTechForumProjects

LDS Music Content API

This Content API Documentation is for Version 9 of the CDN Content

LDS Music Content API

Note: This API has been revamped and now delivers the content via a pre-prepared sqlite database. If you are interested in using this API, please contact the Project Administrators of the LDS Music Content project on LDSTech, this page will be eventually be updated to match the new API

LDS Music Content project on LDSTech

This document is meant to describe and document the way that content is served to the LDS Music for iOS application, so that implementations of LDS Music on other platforms can utilize the same API and thus the available content in LDS Music will be the same no matter what platform you use.

To get started I should mention that we run two different versions of the App, a Staging app meant for beta testing purposes and the Production app that gets released to the App store. Besides the staging app having more recent features than the Production version, it also has access to content that is being developed/tested or that is waiting for legal approval to be released to the Production version of the application.

The data is served from two different base URL’s, one for Staging and another for Production:

Staging Base URL:

http://broadcast3.lds.org/crowdsource/Mobile/LDSMusic/Staging/

Production Base URL:

http://broadcast3.lds.org/crowdsource/Mobile/LDSMusic/Prod/

From now on I will reference URL paths that are relative to these Base URLs. But they will be hyperlinked to the Staging Base URL so you can click and see what the data looks like.

What has changed since version 3?

We have made quite a few changes since version 3 of the Content API.

First of all, we no longer reference counterpart files as "versions" with the URL structure of our CDN server. Instead we reference them via an absolute URL along with modified date and size information. This allows us to link to content directly as the Church's content team produces it, rather than needing to move it to our mobile servers first. Counterparts include Album Artwork, Thumbnail images, MP3s, and PDFs.

Also, we have changed the way Author/Composer indices work, so that we can easily scale it to support translators, adaptors, etc.

We have added a uri for each item, which will be very useful when linking to Gospel Library.

The "translationID" field of an item has been renamed to "relatedID".

There may also be other minor changes, if so, forgive me for forgetting them, and please add them here!

Step One

The first thing the app does to determine what content is available is to query the Metadata index at:

Metadata/9/Index.json

The 9 in this URL represents the version of the Metadata index format. If we needed to change the format to some non-backwards-compatible format, we would increment that version number so that older code can still reference the older format.

The metadata index tell you which languages are available, which "Collections" are available in that language, and the version number of that "Collection" that is on the server. Collection is the term/object we use to represent a Hymn Book, Childrens Songbook, etc.

The Metadata index serves as a quick and easy way to determine if the app's local database has an outdated version of a collection, and if any new collections are available. Based on that information the app should be able to efficiently request the data for only the collections it needs to update, rather than blindly asking for all of the data.

Here is an example of the Index.json file content:

 {
 "languages": [
   {
     "collections": [
       {
         "id": "Hymns-EN", 
         "version": "55"
       }, 
       {
         "id": "Childrens-EN", 
         "version": "59"
       }, 
       {
         "id": "ChildrensAdditional-EN", 
         "version": "36"
       }, 
       {
         "id": "MagLiahona-EN", 
         "version": "2"
       }, 
       {
         "id": "MagEnsign-EN", 
         "version": "4"
       }, 
       {
         "id": "SongOfTheHeart-EN", 
         "version": "2"
       }, 
       {
         "id": "YWCampSongs-EN", 
         "version": "5"
       }
     ], 
     "languageCode": "en"
   }, 
   {
     "collections": [
       {
         "id": "Hymns-FR", 
         "version": "48"
       }, 
       {
         "id": "Childrens-FR", 
         "version": "37"
       }, 
       {
         "id": "YWCampSongs-FR", 
         "version": "2"
       }
     ], 
     "languageCode": "fr"
   }, 
   {
     "collections": [
       {
         "id": "Hymns-TON", 
         "version": "12"
       }, 
       {
         "id": "Childrens-TON", 
         "version": "13"
       }, 
       {
         "id": "YWCampSongs-TON", 
         "version": "3"
       }
     ], 
     "languageCode": "ton"
   }
 ]
 }

Step Two

Next the application requests the collections it wants via the following URL structure:

Collections/<collection_id>/<version>/Collection.json

For example:

Collections/Hymns-EN/55/Collection.json

The Collection.json file contains all of the textual based data for a collection. In other words you will find all of the data for a Collection in this file EXCEPT for the audio MP3's and the sheet music PDF's.

Note: A quick side note is that we are planning to move away from PDF's for sheet music and instead render the sheet music on the device using MusicXML markup, there is no exact date set for when we will do this, but we certainly won't be able to scale the number of languages we support sheet music for without MusicXML support. Currently the ability to release those languages is held up due to licensing, but that process is already in the works.


See the following link for details of the Collection Object data.

LDS Music Content API - Collection Object

Step Three

Now request any related counterparts that you wish to present to the user.

The URLs for related counterparts (PDF, MP3, etc) are associated with each item object.

Each item in the collection should have the same URL for the "mobilePDF" counterpart and simply index different pages in the PDF file.


For reference, we have a large following of content wranglers and transcribers working to get the content and correct it as needed. They all input that information via this site http://tech.lds.org/mobile/mcms. Then we move the information from that site along to the CDN servers that deliver the content to the app, new data on the transcription site is moved to the Beta iOS app on a Daily Basis.

This page was last modified on 19 November 2014, at 13:11.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.