在指定Project下创建一个日志下载任务。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
请求语法
POST /downloadjobs HTTP/1.1
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
body |
object |
是 |
日志下载任务配置 |
|
name |
string |
是 |
日志下载任务名称 |
download-123 |
description |
string |
否 |
日志下载任务描述 |
Log download task |
configuration |
object |
是 |
下载配置 |
|
logstore |
string |
是 |
源 logstore |
test-logstore |
fromTime |
integer |
是 |
起点时间戳(精确到秒) |
1722406260 |
toTime |
integer |
是 |
结束时间戳(精确到秒) |
1722409860 |
query |
string |
是 |
查询语句 |
* | select * |
powerSql |
boolean |
否 |
是否启用 powerSql。枚举值:true,false |
true |
allowInComplete |
boolean |
是 |
允许下载不精确结果。枚举值:true,false |
false |
sink |
object |
是 |
导出配置 |
|
type |
string |
是 |
固定为 AliyunOSS |
AliyunOSS |
contentType |
string |
是 |
下载文件格式。枚举值:csv,json |
csv |
compressionType |
string |
是 |
压缩格式。枚举值:zstd, lz4, gzip, none |
none |
roleArn |
string |
否 |
下载使用 roleArn |
acs:ram::0123456789:role/aliyunlogdefaultrole |
bucket |
string |
否 |
对象存储桶 |
oss-test-bucket |
prefix |
string |
否 |
下载到用户 oss bucket 的路径前缀 |
download/ |
displayName |
string |
是 |
显示名称 |
download-123456789 |
返回参数
名称 |
类型 |
描述 |
示例值 |
headers |
object |
||
Server |
string |
||
Content-Type |
string |
||
Content-Length |
string |
||
Connection |
string |
||
x-log-requestid |
string |
示例
正常返回示例
JSON
格式
{}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。