bbc/ifr-runningorder-api

Name: ifr-runningorder-api

Owner: BBC

Description: An API to expose a studio running order

Created: 2017-11-28 16:17:50.0

Updated: 2017-11-28 20:40:20.0

Pushed: 2017-12-05 16:46:44.0

Homepage: null

Size: 22

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Internet Fit Radio

Running Order API

An API that interfaces with the running order database, the API of studio events, and other production systems such as Proteus.

This service should run on its own, and pass all unit tests. Run it by executing

npm start
Database

The running order is stored in a mongoDB database. We are using the bitnami docker image

After getting the image, start it with the following command

docker run -d -e MONGODB_DATABASE=rotool -e MONGODB_USERNAME=rotool -e MONGODB_PASSWORD=rotool -e MONGODB_ROOT_PASSWORD=admin123 --name ifr_mongo -p 27017:27017 bitnami/mongodb:latest
Data model

The underlying data model is based on R&D's proposed Object Based Media Schema

Config files

In the conf directory, there are two config files (JSON) which can pass details on to the microservice. global.json is designed to be where any configuration that should be the same for all instance of this service should live - user.json is where any instance specific configuration should go. User config should override global config. We use the nconf module within the service to handle all of this.

Logging

Logging is handled by bunyan, as well as the bunyan logstash plugin, (if the logstash key is defined within the configuration).

The logger uses the module name (from package.json) and version.

Tests

We're using mocha, chai and sinon to perform unit testing. All tests should run by running npm test.

REST API
Get a running order for a single pid
# Parameters


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.