Skip to content

API V2 Common flow scenarios

Halsey Burgund edited this page Jun 12, 2017 · 4 revisions

App open and initialize

Obtain Token
POST api/2/users

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

Create new session
POST api/2/sessions
Get project data
GET api/2/projects/:id
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