Jmeter实践——新的项目介绍(二十)

项目名称:一粒云

项目接口介绍:

1.登录接口(功能详述:完成用户的登录)

请求方式:post

接口地址:http://120.79.174.8/apps/pub/user/sign

请求头相关信息:变量名cv ,说明:一粒云版本号,默认值:3.6.0 必填

请求参数相关信息:用户名userName 必填,密码password 必填

返回结果信息示范:

 {"status":"ok","data":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEwMiwidGltZSI6MTU5NTk0NDc1MSwia2V5IjoidG1kNGFoamk5OXUyIiwiaWF0IjoxNTk1OTQ0NzUxfQ.4CgA2O7GJYNka2HtWJnLOn-llrr5PWgLIyyDeMAilKU"}}

2.文件上传接口(功能详述:完成文件的上传)

请求方式:post

接口地址:http://120.79.174.8/upload/stream

请求头相关信息:变量名ct ,说明:对应的token信息,从登录的响应结果里面获取到 必填

请求参数相关信息:param  文件相关参数信息:{"parentId":"","fileCategory":"personal","fileSize":34,"fileName":"lemon.csv","uoType":1} filesize:文件的大小  fileName:上传文件的到网盘显示的文件名 必填

返回结果信息示范:

 {"status":"ok","data":{"createTime":"2019-11-28 21:25:07","fileAction":"edit","thumb":null,"fileVersion":1595946420283,"parentIds":"-","createrId":102,"filePath":"\/","createrName":"亚萌","fileSize":196,"folder":false,"updateTime":"2020-07-28 22:27:00","parentId":null,"trashId":null,"fileId":40127,"fileName":"test_case.csv","layer":0,"updateUserName":"亚萌"}}

3.文件下载接口(功能详述:完成文件的下载)

请求方式:get

接口地址:http://120.79.174.8/apps/file/down

请求头相关信息:变量名ct ,说明:对应的token信息,从登录的响应结果里面获取到 必填

请求参数相关信息:fc 固定默认值:personal 必填 ;fi 下载的目标文件的id(数据库里面会有对应的id,也可以通过文件列表接口查看)必填

返回结果信息示范:

 {"status":"ok","data":{"fileName":"test_case.csv","fileSize":196,"fileUri":"group1/M00/01/B2/rBKWoF8mJEKAMWkYAAAAxIZb3qc078.csv?token=65e448e687186c2d13b200caba85da1c&ts=1596335210","fileMd5":"03a656de99074bd01f6bfa2931ed3390","fileVersion":1596335171012}}

4.文件列表获取(功能详述:完成文件的相关信息的列表获取)

请求方式:get

接口地址:http://120.79.174.8/apps/files?fc=personal&pt=1&offset=0&limit=200

请求头相关信息:变量名ct ,说明:对应的token信息,从登录的响应结果里面获取到 必填

返回结果信息示范:

 {"status":"ok","data":{"count":509,"files":[{"fileId":46045,"parentId":null,"trashId":null,"parentIds":"-","layer":0,"filePath":"/","fileName":"$(fileName)","fileSize":204,"thumb":null,"folder":false,"fileVersion":1590484425120,"fileAction":"edit","createrId":102,"createrName":"亚萌","createTime":"2020-05-26 17:13:04","updateUserName":"亚萌","updateTime":"2020-05-26 17:13:45","fsFileName":"group1/M00/01/9D/rBKWoF7M3cmAOYMXAAAAzLmZICo553.csv"},{"fileId":46028,"parentId":null,"trashId":null,"parentIds":"-","layer":0,"filePath":"/","fileName":"output__20200521173811.csv","fileSize":2255,"thumb":null,"folder":false,"fileVersion":1590071053596,"fileAction":"edit","createrId":102,"createrName":"亚萌","createTime":"2020-05-21 21:54:23","updateUserName":"亚萌","updateTime":"2020-05-21 22:24:13","fsFileName":"group1/M00/01/9A/rBKWoF7Gjw2AKaT1AAAIz4fQVmY356.csv"}],"parents":[]}}

posted @ 2020-07-28 18:44  飞鸟与新月  阅读(509)  评论(2编辑  收藏  举报