Skip to content

API V2 Common flow scenarios

Halsey Burgund edited this page Feb 12, 2015 · 4 revisions

##App open and initialize

#####Obtain Token

POST api/2/user

Should be done ONCE per application install. Tokens do not expire.

#####Get project data

GET api/2/projects/:id

#####Create new session

POST api/2/sessions

#####Get tags for project

GET api/2/projects/:id/tags?session_id=1

session_id parameter is used for localization currently as each session is assigned a localization and tags require localization. It is optional, defaulting to 'en'.

##Listen

#####Request new audio stream

POST api/2/stream

Required parameter:

session_id

Optional parameters

latitude
longitude
tags
audio_stream_bitrate

#####Modify audio stream for tag filter updates

PATCH api/2/stream

Required parameter

tags

#####Modify audio stream for location updates

PATCH api/2/stream

Required parameters

latitude
longitude

###Speak

#####Create new envelope

POST api/2/envelopes/

Required parameter

session_id

#####Upload new asset

POST api/2/envelopes/:id/assets/

Required parameters:

envelope_id
binary file

Optional parameters:

latitude
longitude
tags
mediatype
submitted
Clone this wiki locally