Create video with signed url upload

The platform supports uploading of video clips directly to your library with Amazon S3 signed URLs. You will need to make two requests to the platform when using the upload type. First one to get a signed URL that is used to upload the video to S3 and the second request to inform the platform that the upload is complete and the video is ready for encoding.

Step 1

Start by sending a POST for a Signed URL on following endpoint:

https://api.flowplayer.com/ovp/web/video/v2/signed-upload-url

with body

Request example (Json)
{
    "api_key": "ab3665df-ee18-4743-b99c-7643d1370169",
    "name": "My new video",
    "site_id": "ab3665df-ee18-4743-b99c-7643d1370169",
    "user_id": "ab3665df-ee18-4743-b99c-7643d1370169"
}

In the response you will get

Response example (Json)
{
  "video_id": "6b7856db-9390-49f4-b36d-86d370c7e13d",
  "signed_video_url": "https://my-s3-bucket.s3-accelerate.amazonaws.com/v-6b7856db-9390-49f4-b36d-86d370c7e13d_original.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180125T142249Z&X-Amz-SignedHeaders=host&X-Amz-Expires=238237&X-Amz-Credential=ABCDEFG&X-Amz-Signature=ABCDEFG"
}

Step 2

Next step is to use the signed url for uploading the video file to S3. Example below shows how to upload using Curl.

curl -X PUT "https://my-s3-bucket.s3-accelerate.amazonaws.com/v-6b7856db-9390-49f4-b36d-86d370c7e13d_original.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20180125T142249Z&X-Amz-SignedHeaders=host&X-Amz-Expires=238237&X-Amz-Credential=ABCDEFG&X-Amz-Signature=ABCDEFG" --upload-file /path/my_local_file.mp4

Step 3

When the video have be uploaded to S3 you need to report to the platform that upload is complete. This is done by sending a POST to:

https://api.flowplayer.com/ovp/web/video/v2/signed-upload-complete

with body:

Request example (Json)
{
    "api_key": "ab3665df-ee18-4743-b99c-7643d1370169",
    "id": "my_video_id"
}
Response example (Json)
{
    "success": true,
    "message": "encoding started"
}
Results