New Life Songs API V1

The New Life Songs database exposes a REST API. This allows programatic access to and modification of the data. Version 1 of the API defines several endpoints, all of which are built off of http://newlifesongs.jdbernard.com/api/v1 as a base URL.

Some of the service's endpoints require the client to authenticate itself to the server. See the section on authentication for details concerning authentication.

The endpoints that the API defines are:

If you run across any problems or have questions, feel free to send me an email at jdbernard@gmail.com

/songs

Song object

A song object is defined with the following fields:
id
An identifier unique to this song record among all song records. Type: integer
name
The name of the song. Type: string
artists
A list of the artists known to have written or performed this song. Type: list of strings

Example

{
  "id":8,
  "name":"Here I Am To Worship",
  "artists":[
    "Tim Hughes",
    "Chris Tomlin",
    "Michael W. Smith"
  ]
}

Method Summary

HTTP Action Path Description Public?
GET /songs Retrieve all songs. yes
POST /songs Create a new song record. no
GET /songs/<songId> Retrieve a single record. yes
PUT /songs/<songId> Update a song record. no
DELETE /songs/<songId> Delete a song record. no
GET /songs/forService/<serviceId> Retrieve all songs performed in a given service. yes
GET /songs/byArtist/<artist> Retrieve all songs performed by a given artist. yes

/services

Service object

A Service object is defined with the following fields:
id
An identifier unique to this service record among all service records. Type: integer
date
The date of the service. Type: Date
serviceType
Service type. Type: string Valid values:
ValueDescription
SUN_AM Sunday morning service.
SUN_PM Sunday evening service
WED Wednesday, midweek Bible study.

Example

{
  "id": 1,
  "date": 1235887200000,
  "serviceType": "SUN_PM"
}

Method Summary

HTTP Action Path Description Public?
GET /services Retrieve all services. yes
POST /services Create a new service record. no
GET /services/<serviceId> Retrieve a single service record. yes
PUT /services/<serviceId> Update a service record. no
DELETE /services/<serviceId> Delete a service record. no
GET /services/withSong/<serviceId> Retrieve all services in which the given song was performed. yes
GET /services/byDate/after/<date> Retrieve all services after the given date. yes
GET /services/byDate/before/<date> Retrieve all services before the given date. yes
GET /services/byDate/between/<date1>/<date2> Retrieve all services between the two given dates. yes

/users

Authentication