ListTestCaseFields
Retrieves the list of test case fields.
Try it now
Test
RAM authorization
Request syntax
GET /organization/{organizationId}/testhub/testcase/fields HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The enterprise identifier, also known as the enterprise ID. It is a string that can be obtained from the Yunxiao access link, such as https://devops.aliyun.com/organization/[OrganizationId]. |
5ebbc0228123212b59xxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| spaceIdentifier |
string |
Yes |
The ID of the test case library, which is the unique identifier of the test case library. |
e8bxxxxxxxxxxxxxxxx23 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. Each request has a unique value to facilitate subsequent troubleshooting. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorMsg |
string |
The error message. |
error |
| errorCode |
string |
The error code. |
Openapi.RequestError |
| success |
boolean |
Indicates whether the request is successful. |
true |
| fields |
array<object> |
The field information. |
|
|
array<object> |
|||
| creator |
string |
The ID of the creator. |
19xx7043xxxxxxx914 |
| description |
string |
The description. |
Specific field information |
| gmtCreate |
integer |
The creation time. |
1623916393000 |
| gmtModified |
integer |
The update time. |
1623916393000 |
| type |
string |
The type of the field, such as system field or user-defined field. |
NativeField |
| identifier |
string |
The unique identifier of the field. |
e8bxxxxxxxxxxxxxxxx23 |
| modifier |
string |
The updater. |
19xx7043xxxxxxx914 |
| name |
string |
The name of the field. |
Assignee |
| format |
string |
The format of the field. |
list |
| className |
string |
The class of the field. |
Example: date |
| resourceType |
string |
The applicable resource type. |
Example: Workitem |
| defaultValue |
string |
The default value. |
123 |
| isRequired |
boolean |
Indicates whether the field is required. |
false |
| isSystemRequired |
boolean |
Indicates whether the field is required by the system, such as the assignee or status. |
false |
| linkWithService |
string |
The linked service. For example, when the iteration service is enabled or disabled, this field is added to or removed from the corresponding template. In the field template, such fields cannot be manually added or deleted. |
null |
| isShowWhenCreate |
boolean |
Indicates whether the field is displayed during creation. |
false |
| options |
array<object> |
The options. |
|
|
object |
|||
| identifier |
string |
The unique identifier of the option. |
Duplicate defect |
| fieldIdentifier |
string |
The unique identifier of the field. |
e8bxxxxxxxxxxxxxxxx23 |
| value |
string |
The Chinese name of the option. |
Duplicate defect |
| valueEn |
string |
The English name of the option. |
null |
| displayValue |
string |
The display value based on the locale. |
Duplicate defect |
| position |
integer |
The position of the option. |
1 |
| level |
integer |
The display level. Valid values: 1 to 9. A larger value indicates a lighter color. |
1 |
Examples
Success response
JSON format
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorMsg": "error",
"errorCode": "Openapi.RequestError",
"success": true,
"fields": [
{
"creator": "19xx7043xxxxxxx914",
"description": "Specific field information",
"gmtCreate": 1623916393000,
"gmtModified": 1623916393000,
"type": "NativeField",
"identifier": "e8bxxxxxxxxxxxxxxxx23",
"modifier": "19xx7043xxxxxxx914",
"name": "Assignee",
"format": "list",
"className": "Example: date",
"resourceType": "Example: Workitem",
"defaultValue": "123",
"isRequired": false,
"isSystemRequired": false,
"linkWithService": "null",
"isShowWhenCreate": false,
"options": [
{
"identifier": "Duplicate defect",
"fieldIdentifier": "e8bxxxxxxxxxxxxxxxx23",
"value": "Duplicate defect",
"valueEn": "null",
"displayValue": "Duplicate defect",
"position": 0,
"level": 1
}
]
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Openapi.RequestError | request error | |
| 403 | Operate.NoPermission | NoPermission | You are not authorized to perform this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.