文档中心 日志服务 API文档 快速查询 GetQuickSearch

GetQuickSearch

最近更新时间:2021-12-16 19:54:22

请求语法

POST /GetQuickSearch HTTP/1.1
Authorization: <AuthorizationString>
x-klog-api-version: 0.1.0
Host:klog.api.ksyun.com
x-klog-signature-method: hmac-sha1
Date: <GMT Date>
Content-Type: application/json
Content-MD5: <Content-MD5>
Content-Length: <ContentLength>
Connection: Keep-Alive
{
  "ProjectName": <ProjectName>,
  "LogPoolName": <LogPoolName>,
  "QuickSearchlName" : <QuickSearchName>
}

请求参数

该接口无特有请求头。获取更多信息,请参见公共请求头
参数详情具体如下表。

参数名称 类型 是否必须 描述
ProjectName String 工程名称
LogPoolName String 日志池名称
QuickSearchName String 快速查询名称

响应参数

参数名称 类型 描述
ProjectName String 工程名称
QuickSearchName String 快速查询名称
Description String 备注
CreateTime String 创建时间
LogPoolName String 日志池名称
TimeRange String 查询数据的时间范围
Query String 查询语句

错误码

除公共错误码外,还可能返回如下特有错误码:

Http状态码 errorCode errorMessage
400 ProjectNotExsit project {projectName} does not exist
400 LogPoolNotExsit logPool{logPooltName} does not exist

示例

请求示例

POST /GetQuickSearch HTTP/1.1
Authorization: KLOG <yourAccessKeyId>:<yourSignature>
x-klog-api-version: 0.6.0
Host:klog.api.ksyun.com
x-klog-signature-method: hmac-sha1
Date: Sun, 27 May 2018 07:43:26 GMT
Content-Type: application/json
Content-MD5: A7967D81EFF5E3CD447FB6D8DF294E20
Content-Length: 80
Connection: Keep-Alive
{
  "ProjectName": “my-test-project”,
  "LogPoolName" : "my-test-LogPool",
  "QuickSearchlName" : "my-test-search"
}

响应示例

HTTP/1.1 200Server: nginx
Content-Length: 0
Connection: close
Access-Control-Allow-Origin: *
Date: Sun, 27 May 2018 07:43:27 GMT
x-klog-requestid: 5B0A619F205DC3F30EDA9322
{
  "ProjectName": my-test-project,
  "LogPoolName" : my-test-logpool,
  "QuickSearchName" : "my-test-search",
  "Description":"This is my quickSearch" ,
  "CreateTime":"Mon, 3 Jan 2010 08:33:47 GMT",
  "TimeRange":"last 15 minutes",
  "Query": "select * where key1=\"value\" limit 10"
}
上一篇:ListQuickSearchs
下一篇:DeleteQuickSearchs
以上内容是否对您有帮助?
有帮助
没帮助