Instance Video Settings
Function
This API is used to configure video settings.
Before calling this API, ensure that the tenant has purchased an instance.
This API is used to set the bit rate and output frame rate corresponding to each definition of an instance.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
koophone:cloudphoneResource:setVideo
Write
cloudphoneResource *
-
-
-
URI
PUT /v1/instances/video-setting
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
x-request-id |
Yes |
String |
Unique ID of a request. |
|
X-Auth-Token |
Yes |
String |
Tenant-level token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance_ids |
Yes |
Array of strings |
Instance list. A single instance can contain a maximum of 32 characters, and the list can contain a maximum of 100 columns. |
|
instance_settings |
Yes |
Array of InstanceSetting objects |
Video setting content. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
network_type |
Yes |
String |
Network type, including MOBILE_NETWORK, WIFI, and WIRED. The three parameters are mandatory. There are six combinations based on the two mandatory parameters of encoding_type. For details, see the request example. |
|
encoding_type |
Yes |
String |
Encoding type, including H264 and H265. Both parameters are mandatory. There are six combinations based on the three mandatory parameters of network_type. For details, see the request example. |
|
video_spec_groups |
Yes |
Array of VideoSpecGroup objects |
Video specification group. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.0000: The tenant does not exist. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KPAPI.2209: No device can be assigned. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error description. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.0000: The tenant does not exist. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KPAPI.2209: No device can be assigned. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error description. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
0: successful. KOOPHONE.API.0000: The tenant does not exist. KOOPHONE.API.1000: The request parameter is incorrect. KOOPHONE.API.1001: Insufficient instance permissions. KPAPI.2209: No device can be assigned. KOOPHONE.API.9999: Internal service error. |
|
error_msg |
String |
Error description. |
Example Requests
/v1/instances/video-setting
{
"instance_ids" : [ "iRJEVP96" ],
"instance_settings" : [ {
"network_type" : "MOBILE_NETWORK",
"encoding_type" : "H264",
"video_spec_groups" : [ {
"definition_540P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_720P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_1080P" : {
"code_rate" : 8000,
"fps" : 30
}
} ]
}, {
"network_type" : "MOBILE_NETWORK",
"encoding_type" : "H265",
"video_spec_groups" : [ {
"definition_540P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_720P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_1080P" : {
"code_rate" : 8000,
"fps" : 30
}
} ]
}, {
"network_type" : "WIFI",
"encoding_type" : "H264",
"video_spec_groups" : [ {
"definition_540P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_720P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_1080P" : {
"code_rate" : 8000,
"fps" : 30
}
} ]
}, {
"network_type" : "WIFI",
"encoding_type" : "H265",
"video_spec_groups" : [ {
"definition_540P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_720P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_1080P" : {
"code_rate" : 8000,
"fps" : 30
}
} ]
}, {
"network_type" : "WIRED",
"encoding_type" : "H264",
"video_spec_groups" : [ {
"definition_540P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_720P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_1080P" : {
"code_rate" : 8000,
"fps" : 30
}
} ]
}, {
"network_type" : "WIRED",
"encoding_type" : "H265",
"video_spec_groups" : [ {
"definition_540P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_720P" : {
"code_rate" : 6000,
"fps" : 30
},
"definition_1080P" : {
"code_rate" : 8000,
"fps" : 30
}
} ]
} ]
}
Example Responses
Status code: 200
Normal response.
{
"error_code" : "0",
"error_msg" : "ok"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Normal response. |
|
400 |
Bad Request |
|
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot