更新场景库
功能介绍
更新场景库。
URI
PATCH /v2/{project_id}/sim/sm/groups/{id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID,获取方法请参见获取项目ID |
|
id |
是 |
String |
场景库ID |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
内容类型。填application/json |
|
X-Auth-Token |
是 |
String |
用户Token,通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
name |
是 |
String |
场景库名称,最大长度64位,支持中文,字母,数字及下划线命名 |
|
description |
是 |
description object |
描述的内容 |
|
simulator |
是 |
String |
仿真器,如:B |
|
parent |
是 |
String |
父级场景库分类资源地址 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
url |
String |
场景库资源地址 |
|
id |
Integer |
场景库ID |
|
created_at |
TimeStamp |
创建时间 |
|
updated_at |
TimeStamp |
更新时间。 |
|
count |
String |
场景组数量 |
|
description |
description object |
描述的内容 |
|
path |
String |
路径信息 |
|
name |
String |
场景库名称 |
|
simulator |
String |
仿真器,如:B |
|
parent |
String |
父级场景库资源地址 |
|
scenarios |
Array of String |
场景资源地址列表 |
请求示例
更新场景库
PATCH https://{endpoint}/v2/{project_id}/sim/sm/groups/208
{
"name": "updated_group",
"simulator": "B",
"description": {
"content": "updated_group"
},
"parent": "/v2/54d37c8f25af42xxxxx9772687bf/sim/sm/categories/156/"
}
响应示例
{
"url": "/v2/54d37c8f25af42xxxxx9772687bf/sim/sm/groups/208/",
"id": 208,
"created_at": 1748923379.132619,
"updated_at": 1748923438.504022,
"count": 1,
"description": {
"content": "updated_group"
},
"path": "/154/156",
"name": "updated_group",
"simulator": "B",
"parent": "/v2/54d37c8f25af42xxxxx9772687bf/sim/sm/categories/156/",
"scenarios": [
"/v2/54d37c8f25af42xxxxx9772687bf/sim/sm/scenarios/32192/"
]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
请求成功 |
错误码
请参见错误码。