# 查询数据集列表
通过该接口查询当前机构下的数据集列表,按照时间倒序排序给出。
# 请求地址和请求方式
HTTP请求地址 | 请求方式 |
---|---|
{service}/api/v1/datasets | GET |
# 请求参数
序号 | 参数 | 类型 | 是否必填 | 长度限制 | 描述 | 示例值 |
---|---|---|---|---|---|---|
1 | type | int | 否 | 1 | 数据集类型: 0:图片;1:语音;2:文本;3:视频;6:点云; 当不填写时,默认查询所有类型下的数据集 | 0 |
2 | limit | int | 否 | 3 | 用来控制分页的参数;默认20,最大100;必须为正整数,不能输入0。 Limit 为单次返回的最多条目数量,Offset 为偏移量。当相应结果是列表形式时,如果数量超过了 Limit 所限定的值,那么只返回 Limit 个值。 举例来说,参数 Offset=0&Limit=20 返回第 0到 19 项,Offset=20&Limit=20 返回第 20 到 39 项,Offset=40&Limit=20 返回第 40 到 59 项;以此类推。 | 100 |
3 | offset | int | 否 | 5 | offset为偏移量,和limit结合使用。不填写时,默认为0。 | 0 |
# 请求示例
{
{service}/api/v1/datasets?SecretId=AKIDz8krbsJ5yKBZQpn74WFkmLPx3eh2&Signature=fdae105fbdd459f3ada5b728dc345cfb6e54cb3c5c8e12824c31ba6850892ed5&Timestamp=1618235242820&type=0
}
# 返回结果(调用正确)
{
"code":0,
"message":"调用成功",
"datasetCount":2,
"datasets"[
{
"id":20190970,
"name":"人脸数据集001",
"tags":["face","detection"],
"describe":"亚洲人脸数据集",
"type":0,
"institutionName":"测试机构",
"createUser":"ceshi01",
"fileSize":9087651,
"dataCount":100,
"batchCount":2,
"batchList":[
{
"batchId":"9086",
"batchName":"批次001",
"dataCount":100
},
{
"batchId":"9086",
"bataName":"批次002",
"dataCount":100
}
]
}
{
"id":20190971,
"name":"人脸数据集001",
"tags":["face","detection"],
"describe":"亚洲人脸数据集",
"type":0,
"institutionName":"测试机构",
"createUser":"ceshi01",
"fileSize":9087651,
"dataCount":100,
"batchCount":2,
"batchList":[
{
"batchId":"9086",
"batchName":"批次001",
"dataCount":100
},
{
"batchId":"9086",
"bataName":"批次002",
"dataCount":100
}
]
}
]
}
# 返回结果说明
序号 | 返回项目 | 返回类型 | 项目说明 |
---|---|---|---|
1 | id | int | 数据集id |
2 | name | string | 数据集名称 |
3 | tags | string[] | 数据集标签 |
4 | describe | tring | 数据集描述 |
5 | datasetCount | int | 数据集数量 |
6 | type | int | 数据类型 |
7 | createUser | string | 创建者 |
8 | dataCount | int | 数据数量 |
9 | batchCount | int | 数据集的批次数量 |
10 | flieSize | int | 数据集的文件大小 |
11 | institutionName | string | 所属机构 |
12 | batchList | string[] | 数据集批次列表 |
13 | batchId | int | 数据集批次id |
14 | batchName | string | 数据集批次名称 |
# 返回结果(返回错误)
{
"code": 206,
"message":"limit参数长度超过限制"
}
# 错误码说明
序号 | 错误码 | 错误提示信息 |
---|---|---|
1 | 208 | type类型错误 |
2 | 213 | limit参数类型错误 |
3 | 214 | limit参数长度超过限制 |
4 | 215 | limit参数必须大于0 |
5 | 216 | offset参数类型错误 |