Upload with pre-signed Url
Overview
The following table contains important information about the POST
method in regards to the upload process.
POST Method | |
---|---|
Method | POST |
URL or Endpoint | /api/projects/ |
Headers | Authorization |
Parameters | projectId |
Body | fileName, mimeType, contentLength |
The description of the URL parameter is as follows:
projectId URL Parameter | |
---|---|
URL Parameter Name | projectId |
Mandatory | Yes |
Type | string |
Description | Project specifier property. Format: pxxxxxxx |
Request Body
{
"fileName": "video.mp4",
"mimeType": "video/mp4",
"contentLength": 200
}
Information about the fields that appear when you request the body of the video are displayed in the table below.
Field Name | Mandatory | Type | Description |
---|---|---|---|
fileName | Yes | string | Name of the file. |
mimeType | Yes | string | Type of the file. |
contentLength | No | integer | Length of the file (in bytes). |
Response
{
"success": true,
"statusCode": 200,
"result": {
"url": "https://vpplayer.tech/presigned-url?AWSAccessKeyId=some-secure-key",
"requestKey": "some-request-key"
},
"resultInfo": null,
"errors": [],
"messages": [],
}
Information about the fields that appear when you request the body of the video are displayed in the table below.
Field Name | Type | Description |
---|---|---|
success | bool | If the response is successful it will return true. Otherwise will return false |
statusCode | integer | Returns the HTTP Status Code |
result | array[Object] | Returns the response object |
result.url | string | Returns the presigned url when you can upload a video |
result.requestKey | string | Returns the unique RequestKey |
resultInfo | string | Returns extra information about the result |
errors | array[string] | Indicates if there were problems with the request |
messages | array[string] | Returns the response message from the encode endpoints |
info
If the action is successful, the service responds with an HTTP 200 or 201 status code.
Errors
For information about the errors that are common to all actions, see common errors:
- HTTP Status Code 400: Bad Request
- HTTP Status Code 401: Unauthorized
- HTTP Status Code 403: Forbidden
- HTTP Status Code 404: Result Not Found
- HTTP Status Code 500: Internal Server Error
- HTTP Status Code 503: Service Unavailable