Use the following API methods to request details about custom fields for test results.
get_result_fields
Returns a list of available test result custom fields.
GET index.php?/api/v2/get_result_fields
Response content
The response includes an array of custom field definitions. Please see below for a typical response:
[
{
"id": 11,
"is_active": true,
"type_id": 11,
"name": "step_results",
"system_name": "custom_step_results",
"label": "Steps",
"description": null,
"configs": [
{
"context": {
"is_global": true,
"project_ids": null
},
"id": "..",
"options": {
"format": "markdown",
"has_actual": false,
"has_expected": true,
"is_required": false
}
}
]
}
]
A custom field can have different configurations and options per project which is indicated by the configs
field. To check if a custom field is applicable to a specific project (and to find out the field options for this project), the context
of the field, the configuration must either be global (is_global
) or include the ID of the project in project_ids
.
Also, the following list shows the available custom field types (type_id
field):
Type ID | Name |
---|---|
1 | String |
2 | Integer |
3 | Text |
4 | URL |
5 | Checkbox |
6 | Dropdown |
7 | User |
8 | Date |
9 | Milestone |
11 | Step Results |
12 | Multi-select |
Response codes
Status Code | Description |
---|---|
200 | Success (the available custom fields are returned as part of the response) |