Skip to content
Jason edited this page Mar 1, 2016 · 23 revisions

List and show are public on all resources except audio_segments.
Modifications require API token.

Staging instance

https://exploreapollo-api-staging.herokuapp.com
token: exploreapollo

Resources

Resource Fields Associations
missions title description start_time
people name title photo_url
audio_segments title url met_start met_end channel_id
channels title description transcript_part_ids audio_segment_ids
transcript_items text met_start met_end person_id channel_id
stories title description moment_ids
moments title description met_start met_end channel_ids story_ids
metrics type met_start met_end data channel_id
media url title description caption alt_text mission_id
media_attachment media_id met_start met_end media_attachable_type media_attachable_id

Examples

List Stories

https://hidden-journey-48356.herokuapp.com/api/moments

Create Story

curl -X POST -H "Content-Type: application/json" -H "Authorization: Token token=exploreapollo" -d \
'{"title":"test story","description":"The story", "moment_ids": [1, "alarm-solving"]}' \
https://exploreapollo-api-staging.herokuapp.com/api/stories

Update Story

curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token token=exploreapollo" -d \
'{"title":"Updated story","description":"The story", "moment_ids": ["alarm-solving"]}' \
https://exploreapollo-api-staging.herokuapp.com/api/stories/{story_id}

Metrics

Item of measurement during a unit time. A valid metric type is required to create.

Type Data Fields
WordCount count
'{"type":"WordCount", "met_start":"21123", "met_end":"234532", "data":{"count":123}, "channel_id":"flight"}'
Clone this wiki locally