-
Notifications
You must be signed in to change notification settings - Fork 0
RootIO Web API
The RootIO Web API is the primary means of communication between the cloud server and the phone client.
HTTP is the default means of communication, but fallbacks to SMS may be provided for low-bandwidth situations where some latency is acceptable. All requests should follow standard HTTP verbs (GET, PUT, PATCH, DELETE), and all responses are standard HTTP error codes with JSON messages. Do not include trailing slashes in your URLs, because flask-restless doesn't like it.
CRUD routes are provided by Flask-Restless, which uses JSON syntax to provide pagination and search.
Dates are ISO formatted, times without timezone are assumed to be UTC.
All calls allow filtering with the updated_since parameter to limit results to objects that have been updated after the specified datetime.
Calls must be identified either with a 10-digit station API key, or basic HTTP authentication provided by Flask. The API key is preferred for station to server communication. The API should implement SSL, although this is currently TBD.
/api/person/1
An object with all the fields for a person associated with a station or program. Not necessarily a user of Rootio system.
Fields: title, first name, middle name, last name, email, phone, languages, gender
/api/station/1
- Fields:
about, broadcast_ip, client_update_frequency, cloud_phone, frequency, languages, location, name, network, transmitter_phone
/api/station/1/blocks
- Type: Array
- Fields:
start_time, end_time, name, recurrence
/api/station/1/schedule
A schedule array for the station in the indicated timespan. Limit with ?start, ?end, or ?all=1
- Type: Array
- Fields:
start, end, program_id, created_at, updated_at
/api/station/1/scheduled_programs
Array of all ScheduledPrograms on the station.
- Type: Array
- Fields:
start, end, onairprogram