Create a Custom Field
Use the following operation to create a custom field in Zephyr Enterprise:
POST /flex/services/rest/latest/project
Request format
To create a custom field, send a POST request to the following URL:
http://{ZEPHYR-SERVER}/flex/services/rest/latest/field
Request body
{
"entityName": "testcase",
"systemField": false,
"displayName": "Text customfield2",
"fieldTypeMetadata": 1,
"mandatory": false,
"importable": true,
"exportable": true,
"searchable": true,
"searchFieldName": "textcf2",
"projectCheck": true,
"unique": false,
"length": 1024,
"allProject": true,
"isVisible": true
}
The
entityName
value can be testcase, requirement, or project.The
fieldTypeMetaData
value can be any of the following:1
- text2
- long text3
- picklist4
- check box5
- date10
- number12
- cascade13
- rich text
Response body
{
"id": 1006,
"entityName": "testcase",
"systemField": false,
"fieldTypeMetadata": 1,
"fieldName": "zcf_1006",
"columnName": "zcf_1006",
"displayName": "Text customfield2",
"mandatory": false,
"searchable": true,
"importable": true,
"exportable": true,
"length": 1024,
"searchFieldName": "textcf2",
"createdOn": 1588072804836,
"projectIds": [],
"unique": false,
"allProject": true,
"isVisible": true
}
Specify values for the custom field
Use the following operation:
PUT /flex/services/rest/v3/admin/preference
Request format
To specify a value for a custom field, send a PUT request to the following URL:
http://{ZEPHYR-SERVER}/flex/services/rest/v3/admin/preference
Request body
{
"value": "[{\"value\":\"option 1\",\"id\":\"1\"},{\"value\":\"option 2\",\"id\":\"2\"}]",
"accessLevel": 0,
"defaultValue": "[{\"value\":\"option 1\",\"id\":\"1\"},{\"value\":\"option 2\",\"id\":\"2\"}]",
"editable": true,
"isCustomizable": true,
"name": "testcase.zcf_1008.LOV"
}
testcase.zcf_1008.Lov
is the field name of the created picklist custom field appended with the entity name.
Response body
See Also
Â
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html