- Print
- PDF
Video Player Enhancement overview
- Print
- PDF
Overview
Video Player Enhancement is an integrated service that provides an easy way to generate player code.
With Video Player Enhancement, you can easily create a player code and paste it where you want to build a video service.
In addition, since playback statistics are automatically collected, they can be easily viewed without the need to build a separate system.
Common settings
Video Player Enhancement API URL
https://vpe.apigw.ntruss.com/api/v1
API Header
Item | Requirement status | Description |
---|---|---|
Content-Type | Y | Specifies the request body content type as application/json (POST) |
x-ncp-apigw-timestamp | Y | This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 (UTC). If the time difference compared to the API Gateway server is more than 5 minutes, then the request is considered invalid. |
x-ncp-iam-access-key | Y | This is the access key ID issued by the portal or Sub Account. |
x-ncp-apigw-signature-v2 | Y | Signature of the body in the previous example encrypted with SecretKey mapped to Access Key Id HmacSHA256 is used as the HMAC encryption algorithm. |
x-ncp-region_code | N | Region code (KR) |
Video Player Enhancement API request Configuration
Header
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2:{API Gateway Signature}
x-ncp-region_code:KR
Content-Type:application/json
Body
Json Object
URL
https://vpe.apigw.ntruss.com/api/v1/{action}
Video Player Enhancement API request
curl -i -s -X POST \
-H "Content-Type:application/json" \
-H "x-ncp-apigw-timestamp:1521787414578" \
-H "x-ncp-iam-access-key:6uxz1nKkcYwUjWRG5Q1V7NsW0i5jErlu2NjBXXgy" \
-H "x-ncp-apigw-signature-v2:iJFK773KH0WwQ79PasqJ+ZGixtpDQ/abS57WGQdld2M=" \
-H "x-ncp-region_code:KR" \
"https://vpe.apigw.ntruss.com/api/v1/player"\
- d "{
"name": "api-guide",
"domains":
[
{"type" :"web", "domain":"http://*.naverncp.com"}
]
}"
Video Player Enhancement Content-Type
Content-type of all data delivered through Video Player Enhancement API HTTP Request and Response Body uses application/json
.
Success
For how to handle the response to the call, see the response information in the Player API Guide.
{
"code": "200",
"message": "OK",
"result": "{}"
}
Failure
Errors returned from failed calls include common service error codes and service-specific error codes. For service-specific errors, see the errors in the API guide of each service.
Common error codes are provided in JSON format by default. Messages and descriptions for each common error code are as follows:
HTTP status code | Errors | Error message | Description |
---|---|---|---|
200 | 200 | Unauthorized | Service not requested |
400 | 100 | when page_no is too large, the error msg is page_no exceeds the size limit. when page_size is too large, the error msg is page_size exceeds the size limit. | Bad Request Exception |
401 | 200 | Authentication Failed | Authentication failed |
401 | 210 | Permission Denied | No permission |
404 | 300 | Not Found Exception | No permission |
429 | 400 | Quota Exceeded | Quota exceeded |
429 | 410 | Throttle Limited | Rate exceeded |
429 | 420 | Rate Limited | Rate exceeded |
413 | 430 | Request Entity Too Large | Request entity size limit exceeded |
503 | 500 | Endpoint Error | Endpoint connection error |
504 | 510 | Endpoint Timeout | Endpoint connection timeout |
500 | 900 | Unexpected Error | Error not handled as an exception |
The following is an example of a common error code:
- If request parameters is
Content-type: application/json
{ "error":{ "errorCode":"210", "message":"Permission Denied" } }