Skip to content

Video Manipulation

Steve Nolen edited this page May 1, 2015 · 2 revisions

All of the media objects (i.e. image, audio, video, document) have the same access rules, but the data returned will vary from API to API.

Operation Participant Author Analyst Supervisor
Read Their Own Private or Shared Media Objects anytime N/A N/A N/A
Read Someone Else's Shared Media Objects never anytime if the campaign is shared anytime
Read Someone Else's Private Media Objects never never never anytime

DEPRECATION NOTICE: Please instead use the media/read api.

What does it do?

Allows users to read video data that are part of the survey response. This can be made with a HTTP GET or POST call.

URI

video/read

Input Parameters

Supports Token-Based Authentication ...

  • (r) auth_token = A valid authentication token from user/auth_token. May also be set using the Set-Cookie header.

... or User-Password Authentication

  • (r) user = A username of the user attempting to login
  • (r) password = A hashed password for the above user.

Additional Parameters

  • (r) client = A short description of the software client performing the upload.
  • (r) video_id = The uuid of the video being requested.

Example POST

POST /app/video/read HTTP/1.1
 Host: dev.ohmage.org
 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
 Content-Length: byte-length-of-content
 Content-Type: application/x-www-form-urlencoded

  auth_token=0ec4dac0-5293-11e1-a8e1-c82a142568c4
  &client=curl
  &video_id=1c99b4cc-5293-11e1-a501-c82a142568c4

cURL Example

curl -v "http://localhost:8080/app/audio/read?client=curl&video_id=bea5a419-8a23-4f8a-a501-07b5dc863a69&auth_token=22283b32-f2af-442b-808e-17a830cca00c" > kitty.mpg

Output Format

Success

The requested video file is returned in the HTTP stream.

Failure

See the error page for a description of error codes and their associated descriptions.

↑ Back to Top