tencent cloud

Feedback

UploadContent

Last updated: 2024-06-21 15:12:02

1. API Description

Domain name for API request: wedata.tencentcloudapi.com.

Save Task Information

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: UploadContent.
Version Yes String Common Params. The value used for this API: 2021-08-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ScriptRequestInfo Yes ScriptRequestInfo Script Upload Information
RequestFromSource No String Request Source, WEB frontend; CLIENT client
ProjectId No String Project ID

3. Output Parameters

Parameter Name Type Description
ScriptInfo ScriptInfoResponse Script Information Response
Note: This field may return null, indicating that no valid value can be obtained.
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 UploadContent Example

Development Space - Save Task Information

Input Example

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

{
    "ScriptRequestInfo": {
        "FilePath": "/datastudio/personal/shell1234.sh",
        "ProjectId": "1485413914375667333",
        "Operation": "create",
        "ExtraInfo": "{\"taskId\":\"ap-shanghai|wedata-agent-sh-1257305432|/datastudio/personal/shell1234.sh\"}",
        "BucketName": "wedata-agent-sh-1257305432",
        "Region": "ap-shanghai",
        "FileExtensionType": "sh"
    },
    "RequestFromSource": "WEB"
}

Output Example

{
    "Response": {
        "RequestId": "b24bf87c-c391-42cc-a41e-077f946bdff1",
        "ScriptInfo": {
            "Bucket": "wedata-agent-sh-1257305432",
            "CreateTime": "2024-04-10 10:38:15",
            "ExtraInfo": "{\"taskId\":\"ap-shanghai|wedata-agent-sh-1257305432|/datastudio/personal/shell1234.sh\"}",
            "FileExtensionType": "sh",
            "FileName": "shell1234.sh",
            "LocalPath": "/datastudio/personal/shell1234.sh",
            "LocalTempPath": null,
            "Md5Value": null,
            "Owner": "100028649733",
            "OwnerName": "demo",
            "PathDepth": null,
            "ProjectId": "100028649733",
            "Region": "ap-shanghai",
            "RemotePath": "/datastudio/personal/100028649733/shell1234.sh",
            "ResourceId": "3342446a-d046-4a97-9fe6-3c5dd9866ba4",
            "Size": null,
            "Type": "personal",
            "UpdateTime": "2024-04-10 10:38:15",
            "ZipPath": null
        }
    }
}

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
AuthFailure.SignatureExpire Not logged in or login has expired.
FailedOperation Operation Failure.
FailedOperation.NoLock Query data development resource lock status - Current user does not hold the lock
InternalError An internal error occurs.
InvalidParameter Parameter error.
InvalidParameter.DataEngineInstanceNotExists Data Engine Instance does not exist.
MissingParameter Missing Parameter Error.