tencent cloud

APIs

AddRecordPlan

下载
聚焦模式
字号
最后更新时间: 2026-10-26 11:48:49

1. API Description

Domain name for API request: iss.intl.tencentcloudapi.com.

This API is used to create a real-time cloud migration plan.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: AddRecordPlan.
Version Yes String Common Params. The value used for this API: 2023-05-17.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
PlanName Yes String Real-time cloud migration plan name. It supports Chinese, English, digits, _, and -, with a length not exceeding 32 characters. The plan name must be globally unique and cannot be empty or repeated.
TemplateId Yes String Real-time cloud template ID
LifeCycle Yes LifeCycleData Lifecycle
Describe No String Cloud plan description. Supports only Chinese, English, digits, _, and -. Length not exceeding 128 characters.
StreamType No String Stream type. default: The stream type is not specified, and the default push type of the device is used. main: Main stream. sub: Substream. Other values are customized based on the device capacity. If not specified, the default type is used. The length cannot exceed 32 bytes.
Channels.N No Array of ChannelInfo Channel information of the device to which video recording is added. You can add no more than 5000 channels only once, including the number of channels under the organizational unit directory.
OrganizationId.N No Array of String Add all device channels under the organization. Json array, can be empty. The total number of channels cannot exceed 5,000 (including the number of Channel fields).
RepairMode No Integer Video recording supplement mode (0: disabled, 1: enabled). If this field is not specified, it is not enabled by default.

3. Output Parameters

Parameter Name Type Description
Data RecordPlanOptData Returned result
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Success

Input Example

POST / HTTP/1.1
Host: iss.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AddRecordPlan
<Common request parameters>

{
    "PlanName": "name",
    "TemplateId": "48676e89a8c**********baa36220fa4",
    "Describe": "All-day video recording",
    "RepairMode": 1,
    "StreamType": "main",
    "Channels": [
        {
            "DeviceId": "48676e89a8c**********baa36220fa4",
            "ChannelId": "9ee325e9984**********a805c19b4e1"
        }
    ],
    "OrganizationId": [
        "10"
    ],
    "LifeCycle": {
        "Transition": 1,
        "Expiration": 60
    }
}

Output Example

{
    "Response": {
        "Data": {
            "PlanId": "88ac5ea6c1f**********24671d0f94f",
            "PlanName": "name",
            "TemplateId": "48676e89a8c**********baa36220fa4",
            "Describe": "All-day video recording",
            "RepairMode": 1,
            "StreamType": "main",
            "LifeCycle": {
                "Transition": 1,
                "Expiration": 60
            }
        },
        "RequestId": "fba7981b-d6a4-4177-b11d-e53a6110e4cd"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed
InvalidParameter.InvalidBodyFormat Invalid message body format
InvalidParameter.InvalidChannels Invalid channel parameters
InvalidParameter.InvalidOrganizationParam Invalid organization parameter
InvalidParameterValue.EmptyChannelId Channel ID cannot be empty.
InvalidParameterValue.EmptyDeviceId Device ID cannot be empty.
InvalidParameterValue.EmptyName Name cannot be empty
InvalidParameterValue.EmptyOrganizationId Organization ID cannot be empty.
InvalidParameterValue.EmptyTemplateId Associated template cannot be empty.
InvalidParameterValue.IllegalChannelId Channel ID contains illegal characters
InvalidParameterValue.IllegalDescribe Description contains non-compliant characters (only Chinese, English, digits, _, and - are supported)
InvalidParameterValue.IllegalDeviceId Device ID contains illegal characters
InvalidParameterValue.IllegalName Name contains non-compliant characters (only Chinese, English, digits, _, and - are supported)
InvalidParameterValue.IllegalOrganizationId Organization ID contains illegal characters
InvalidParameterValue.IllegalStreamType Stream type contains invalid characters (only English, digits, _, and - are supported)
InvalidParameterValue.InvalidChannelId Invalid channel ID
InvalidParameterValue.InvalidChannelIdOrDeviceId Contains an invalid channel ID or device ID
InvalidParameterValue.InvalidDeviceId Invalid device ID
InvalidParameterValue.InvalidRepairMode Invalid video recording supplement parameter
InvalidParameterValue.InvalidTemplateId Invalid template ID
InvalidParameterValue.LimitRepairTransition Enable video recording supplementary hot storage for at least 3 days.
InvalidParameterValue.OrganizationCountExceedsRange The number of organizations cannot be greater than 1,000.
InvalidParameterValue.PlanChannelsExceedsRange Add up to 5,000 channels at a time
InvalidParameterValue.TooLongDescribe Description field too long
InvalidParameterValue.TooLongName Name is too long
InvalidParameterValue.TooLongStreamType Stream type too long.
ResourceInUse.PlanNameRepeat Plan name must be unique
ResourceNotFound.OrganizationIdNotExist Organization ID does not exist.
ResourceNotFound.TemplateNotExist The template does not exist.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈