获取测试用例全部字段
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /organization/{organizationId}/testhub/testcase/fields HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| organizationId |
string |
是 |
企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https: //devops.aliyun.com/organization/【OrganizationId】 |
5ebbc0228123212b59xxxxx |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| spaceIdentifier |
string |
是 |
测试用例库 id,测试用例库唯一标识 |
e8bxxxxxxxxxxxxxxxx23 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| requestId |
string |
请求 id,每次请求都是唯一值,便于后续排查问题 |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorMsg |
string |
错误信息 |
error |
| errorCode |
string |
错误码 |
Openapi.RequestError |
| success |
boolean |
true 或者 false |
true |
| fields |
array<object> |
字段信息 |
|
|
array<object> |
|||
| creator |
string |
创建人 id |
19xx7043xxxxxxx914 |
| description |
string |
描述信息 |
字段的具体信息 |
| gmtCreate |
integer |
创建时间 |
1623916393000 |
| gmtModified |
integer |
修改时间 |
1623916393000 |
| type |
string |
区分不同的类型,如系统字段、用户自定义字段 |
NativeField |
| identifier |
string |
字段唯一标识符 |
e8bxxxxxxxxxxxxxxxx23 |
| modifier |
string |
修改人 |
19xx7043xxxxxxx914 |
| name |
string |
字段名称 |
负责人 |
| format |
string |
字段格式 |
list |
| className |
string |
字段类型 |
例:date |
| resourceType |
string |
区分不同的适用对象 |
例:Workitem |
| defaultValue |
string |
默认值 |
123 |
| isRequired |
boolean |
是否必填 |
false |
| isSystemRequired |
boolean |
是否是系统必须字段,比如:负责人、状态等。 |
false |
| linkWithService |
string |
联动的服务,比如:迭代服务开启/关闭时,这个字段加进或剔除出对应的模板; 在字段模板里,这类字段不能手动进行添加或删除 |
null |
| isShowWhenCreate |
boolean |
创建时是否展示 |
false |
| options |
array<object> |
待选值 |
|
|
object |
|||
| identifier |
string |
待选值的唯一标识 |
重复的缺陷 |
| fieldIdentifier |
string |
字段唯一标识 |
e8bxxxxxxxxxxxxxxxx23 |
| value |
string |
待选值中文名称 |
重复的缺陷 |
| valueEn |
string |
待选值英文名称 |
null |
| displayValue |
string |
根据语言环境获取当前展示的值 |
重复的缺陷 |
| position |
integer |
待选值顺序 |
null |
| level |
integer |
展示级别,数字范围 1~9,数字越大,颜色越浅。 |
1 |
示例
正常返回示例
JSON格式
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorMsg": "error",
"errorCode": "Openapi.RequestError",
"success": true,
"fields": [
{
"creator": "19xx7043xxxxxxx914",
"description": "字段的具体信息",
"gmtCreate": 1623916393000,
"gmtModified": 1623916393000,
"type": "NativeField",
"identifier": "e8bxxxxxxxxxxxxxxxx23",
"modifier": "19xx7043xxxxxxx914",
"name": "负责人",
"format": "list",
"className": "例:date",
"resourceType": "例:Workitem",
"defaultValue": "123",
"isRequired": false,
"isSystemRequired": false,
"linkWithService": "null",
"isShowWhenCreate": false,
"options": [
{
"identifier": "重复的缺陷",
"fieldIdentifier": "e8bxxxxxxxxxxxxxxxx23",
"value": "重复的缺陷",
"valueEn": "null",
"displayValue": "重复的缺陷",
"position": 0,
"level": 1
}
]
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Openapi.RequestError | request error | OpenAPI请求数据错误 |
| 403 | Operate.NoPermission | NoPermission | 没有权限 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。