tencent cloud

APIs

DescribeEdrMalwareFile

下载
聚焦模式
字号
最后更新时间: 2026-11-10 20:05:16

1. API Description

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

Locate malicious file alarms by EDR alarm ID and return the download URL of the malicious sample. Only alarms with alert_sub_type=1 (malicious file) can be downloaded. Other sub-types are handled as resource not found. Public cloud returns a COS presigned URL (valid for 1 hour). Non-public cloud returns a base64 DataURL and FileName when the export switch is on. In cross-account scenarios, TargetAppId specifies the account that owns the alarm, and ownership verification is performed (fail-close, InvalidParameter is returned if no permission).

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: DescribeEdrMalwareFile.
Version Yes String Common Params. The value used for this API: 2022-11-21.
Region No String Common Params. This parameter is not required.
AlertId Yes String

Unique ID of the EDR alert. Required. Up to 34 characters

MemberId.N No Array of String

Group account member id

TargetAppId No Integer

AppId of the account associated with the alarm (in cross-account scenarios, the member AppId is passed through by the frontend); if 0 or omitted, the login account AppId is used

3. Output Parameters

Parameter Name Type Description
FileUrl String

Sample download link. For public cloud, it is a COS presigned URL (expires in 1 hour); for non-public cloud with the export switch on, it is data:application/octet-stream;base64,<base64 of the zip>

FileName String

Export file name, such as <name>.zip; only returned in the non-public cloud base64 branch, and this field is not returned in other scenarios

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 Get the EDR malicious file sample download URL (base64 DataURL)

When it is not a public cloud and the export switch is on, return the base64 DataURL and file name.

Input Example

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

{
    "AlertId": "edr-alert-8f3c1a2b"
}

Output Example

{
    "Response": {
        "FileUrl": "data:application/octet-stream;base64,UEsDBBQ...",
        "FileName": "evil.bin.zip",
        "RequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
}

Download a malicious sample in a single account scenario (without passing TargetAppId).

Input Example

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

{
    "AlertId": "edr-alert-8f3c1a2b"
}

Output Example

{
    "Response": {
        "FileUrl": "https://xxx.cos.ap-guangzhou.myqcloud.com/samples/6f1e9c...?q-sign-time=...",
        "RequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
}

Download malicious samples of member account alerts under the group account

Input Example

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

{
    "TargetAppId": 1250000001,
    "AlertId": "edr-alert-8f3c1a2b"
}

Output Example

{
    "Response": {
        "FileUrl": "https://xxx.cos.ap-guangzhou.myqcloud.com/samples/6f1e9c...?q-sign-time=...",
        "RequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    }
}

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 Parameter error.
ResourceNotFound The resource does not exist.

帮助和支持

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

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

文档反馈