> For the complete documentation index, see [llms.txt](https://testindata.gitbook.io/dataset/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testindata.gitbook.io/dataset/open-api/stats.md).

# 数据统计

### 获取meta信息中所有key的GroupBy统计

**请求参数**

| 参数     | 类型     | 是否必传 | 描述                            |
| ------ | ------ | ---- | ----------------------------- |
| sensor | string | 否    | 如为融合数据，可传入单独筛选出单独传感器的metakeys |

```
GET http://{{host}}/v1/dataset/{{dataset_id}}/metakeys?sensor=camera_0
Content-Type: application/json
T-key: {{T-key}}


Response:
{
  "code": "",
  "msg": "",
  "data": {
    "items": {
      "k": 8,
      "k1": 7
    }
  }
}

```

### 获取具体metaKey中value的数量GroupBy统计

**请求参数**

| 参数     | 类型     | 是否必传 | 描述                                                              |
| ------ | ------ | ---- | --------------------------------------------------------------- |
| sensor | string | 否    | 如为融合数据，可传入单独筛选出单独传感器的metaKey对应value值的GroupBy统计数据（暂支持200条以内结果返回） |

```
GET http://{{host}}/v1/dataset/{{dataset_id}}/metakeystat/{key_name}?sensor=camera_0
Content-Type: application/json
T-key: {{T-key}}

Response:
{
  "code": "",
  "msg": "",
  "data": {
    "items": [
      {
        "value": "v",
        "count": 8
      }
    ]
  }
}

```

### 获取标注结果中lebel的统计信息

```
GET http://{{host}}/v1/dataset/{{dataset_id}}/labels
Content-Type: application/json
T-key: {{T-key}}

Response:
{
  "code": "",
  "msg": "",
  "data": {
    "items": [
      {
        "label": "car",
        "count": "1"
      },
      {
        "label": "person",
        "count": "1"
      }
    ]
  }
}
```
