tencent cloud

Feedback

CreateSnapshotTask

Last updated: 2024-11-26 18:56:16

    1. API Description

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

    This API is used to create a whiteboard snapshot task. If a callback URL is provided, the whiteboard snapshot result is sent to the callback URL after the task is complete.

    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: CreateSnapshotTask.
    Version Yes String Common Params. The value used for this API: 2019-09-19.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-singapore.
    Whiteboard Yes SnapshotWhiteboard Whiteboard parameters.
    SdkAppId Yes Integer SdkAppId of the whiteboard application.
    RoomId Yes Integer Whiteboard room ID.
    CallbackURL No String Callback URL to which the whiteboard snapshot result is to be sent.
    COS No SnapshotCOS COS bucket in which the generated whiteboard snapshot file is to be stored. If you leave this parameter empty, the generated file will be stored in the public bucket and retained for only three days.
    SnapshotMode No String Whiteboard snapshot mode. Default value: AllMarks. Valid values:

    AllMarks: Full mode. In this mode, a snapshot image is generated based on each whiteboard snapshot mark that is added by calling the addSnapshotMark API on the client.

    LatestMarksOnly: Single-page deduplication mode. In this mode, a snapshot image is generated based only on the latest whiteboard snapshot mark that is added by calling the addSnapshotMark API on the client if the API is called multiple times for the same whiteboard snapshot.

    Note: The LatestMarksOnly mode takes effect only when the addSnapshotMark API is called by using Tencent Interactive Whiteboard SDK v2.6.8 or later. Otherwise, even if this parameter is set to LatestMarksOnly, the default AllMarks mode is used.

    3. Output Parameters

    Parameter Name Type Description
    TaskID String ID of the whiteboard snapshot task. This parameter is returned only if a task is created successfully.
    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 Creating a whiteboard snapshot task

    Input Example

    POST / HTTP/1.1
    Host: tiw.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateSnapshotTask
    <Common request parameters>
    
    {
        "COS": {
            "TargetDir": "snapshot/",
            "Region": "ap-guangzhou",
            "Bucket": "test-123070000",
            "Domain": "xxx.file.com",
            "Uin": 130001358
        },
        "Whiteboard": {
            "Width": 1280,
            "InitParams": "{\"ratio\":\"16:9\"}",
            "Height": 720
        },
        "RoomId": 12345,
        "SdkAppId": 1400123480,
        "CallbackURL": "http://xx/callback"
    }
    

    Output Example

    {
        "Response": {
            "TaskID": "d1806f20-25b8-4c30-8176-c0832bf84e02",
            "RequestId": "fe36df20-25b8-4c30-8176-cff28afacb25"
        }
    }
    

    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
    InternalError Internal error.
    InvalidParameter A parameter error occurred.
    RequestLimitExceeded Too many requests.
    ResourceUnavailable The resource is unavailable.
    ResourceUnavailable.NotRegistered TIW is not enabled.
    ResourceUnavailable.ServiceExpired The account is in arrears or the TIW service has expired.
    UnauthorizedOperation Unauthorized operation.
    UnauthorizedOperation.SdkAppId The SdkAppId does not exist or does not match the current Tencent Cloud account.