> 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/update.md).

# 更新数据

### 更新文件信息及标注结果

更新方式为**覆盖方式**。如传入参数且参数值不为空，则覆盖更新。

> POST http\://{{host}}/v1/dataset/{{dataset*id}}/refloc/{{ref\_id*}}/update

或使用fid：

> POST http\://{{host}}/v1/dataset/{{dataset*id}}/fidloc/{{fid*}}/update

请求参数

| 参数         | 类型     | 是否必传 | 描述                                                                                  |
| ---------- | ------ | ---- | ----------------------------------------------------------------------------------- |
| ref\_id    | string | 否    | 用于和业务系统中数据的对应检索的唯一ID，虽非必传，但强烈建议传入，否则后续将无法和业务系统关联。最大长度64                             |
| name       | string | 否    | 文件名称，最大长度256                                                                        |
| frame\_id  | string | 否    | 融合数据中必传，用于关联不同传感器数据用于可视化，最大长度64                                                     |
| sensor     | string | 否    | 融合数据中必传，用于融合数据关联显示和单独显示，为枚举值，pointcloud为点云，camera\_*0 至 camera\_9为相机，23D融合中将按照序号显示* |
| meta       | object | 否    | 用于检索的K/V信息，如{"weather":"sunny", "city":"beijing"}                                   |
| anotations | array  | 否    | 标注数据，可传入多个标签数据，可参考 [标签数据结构](/dataset/open-api/anotations.md)                        |

请求样例：

```
POST http://{{host}}/v1/dataset/{{dataset_id}}/fidloc/{{fid}}/update 
Content-Type: application/json
T-key: {{T-key}}

{
    "ref_id":"ref_8",
    "name":"文件名-1",
    "frame_id":"frame_0001",
    "sensor":"camera_0",
    "meta":{"k1":"v1","city":"beijing"},
    "anotations":[
        {
            "label": "car",
            "instance":"instance-id",
            "type":"box2d",
            "attrs":{"k":"v"},
            "data": {
                "x":21.31,
                "y":33.22,
                "width":210,
                "height":122
            }
        }
    ]
}


Response:
{
  "code": "",
  "msg": "",
  "data": {}
}
```
