根据条件获得JMeter采样器的采样日志。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
PageNumber | integer | 是 | 请求第N页采样日志信息。 | 1 |
PageSize | integer | 是 | 请求N条采样日志记录。 | 10 |
BeginTime | long | 是 | 开始时间,单位毫秒。 | 1637157073000 |
EndTime | long | 是 | 结束时间,单位毫秒。 | 1637157076000 |
ReportId | string | 是 | 报告ID。 | 7R4RE352 |
AgentId | long | 否 | 压测引擎编号,该字段暂未启用。 | 14238000 |
SamplerId | integer | 否 | 第N个采样器,从0开始。 | 0 |
Success | boolean | 否 | 采样结果是否成功。 | true |
Thread | string | 否 | 线程名。支持模糊搜索,按空格分词。 | main |
Keyword | string | 否 | 关键字,可以通过对场景名(SceneName)进行模糊搜索或者对场景ID(SceneId)进行精确搜索。 | test |
MinRT | integer | 否 | 最小响应时间,单位为ms。 | 0 |
MaxRT | integer | 否 | 最大响应时间,单位为ms。 | 1000 |
ResponseCode | string | 否 | 响应码。 | 200 |
返回参数
示例
正常返回示例
JSON
格式
{
"TotalCount": 100,
"RequestId": "A8E16480-15C1-555A-922F-B736A005E52D",
"Message": "空",
"PageSize": 10,
"PageNumber": 1,
"HttpStatusCode": 200,
"SampleResults": [
"{ \"assertionResults\":[], \"endTimeTS\":1650280351514, \"dataEncoding\":\"utf-8\", \"latency\":11, \"samplerData\":\"GET http://www.baidu.com/\\n\\nGET data:\\n\\n\\n[no cookies]\\n\", \"httpMethod\":\"GET\", \"subResults\":[], \"idleTime\":0, \"cookies\":\"\", \"responseCode\":\"200\", \"responseDataAsString\":\"<!DOCTYPE html>\\r\\n<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class=\\\"bg s_ipt_wr\\\"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus></span><span class=\\\"bg s_btn_wr\\\"><input type=submit id=su value=百度一下 class=\\\"bg s_btn\\\"></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=http://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write('<a href=\\\"http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === \\\"\\\" ? \\\"?\\\" : \\\"&\\\")+ \\\"bdorz_come=1\\\")+ '\\\" name=\\\"tj_login\\\" class=\\\"lb\\\">登录</a>');</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style=\\\"display: block;\\\">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>©2017 Baidu <a href=http://www.baidu.com/duty/>使用百度前必读</a> <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a> 京ICP证030173号 <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>\\r\\n\", \"startTimeTS\":1650280351503, \"requestByteCount\":136, \"instanceId\":0, \"samplerId\":0, \"connectTime\":0, \"sceneId\":276685, \"startTime\":\"2022-04-18T19:12Z\", \"planId\":1736797, \"requestData\":\"\", \"contentType\":\"text/html\", \"responseDataTruncated\":false, \"dataType\":\"text\", \"samplerLabel\":\"baidu\", \"mediaType\":\"text/html\", \"requestDataTruncated\":false, \"responseByteCount\":2497, \"threadName\":\"线程组 1-1\", \"url\":\"http://www.baidu.com/\", \"requestHeaders\":\"Connection: keep-alive\\nx-pts-test: 1\\nHost: www.baidu.com\\nUser-Agent: Apache-HttpClient/4.5.6 (Java/11.0.7.7-AJDK)\\n\", \"responseHeaders\":\"HTTP/1.1 200 OK\\nContent-Length: 2381\\nContent-Type: text/html\\nServer: bfe\\nDate: Mon, 18 Apr 2022 11:12:31 GMT\\n\", \"success\":true, \"headersSize\":116, \"bodySize\":2381, \"endTime\":\"2022-04-18T19:12Z\", \"responseMessage\":\"OK\", \"taskId\":17367970000, \"elapsedTime\":11 }"
],
"Code": "200",
"Success": true
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | ReportNotExist | The report does not exist. | 报告不存在 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||
---|---|---|---|---|---|---|---|---|
2021-11-23 | OpenAPI 错误码发生变更 | |||||||
| ||||||||
2021-11-19 | 新增 OpenAPI |