Forum Discussion

ihsb's avatar
ihsb
New Contributor
4 years ago
Solved

Returning customfield names instead of ID via API

On Zephyr Scale 8.0.2, the /testcase/search API returns a customFieldValues field (despite the API doc mentioning it as customFields). This only shows the ID of the customfield and selected option fo...
  • jfelix's avatar
    4 years ago

    Hi, ihsb! Thanks for your question.

    In the latest version of the app (8.0.3), you can use the REST API and get all the information related to custom fields.

     

    For example, GET /rest/atm/1.0/testcase/search?query=projectKey = "{{projectKey}}" AND folder = "/{{folderName}}" should result in a response similar to this one:

     

    [
        {
            ...
            "customFields": {
                "datepicker": "2019-02-20T03:00:00.000Z"
            },
            ...
            "testScript": {
                ...
                "type": "STEP_BY_STEP",
                "steps": [
                    {
                        "testData": "",
                        "customFieldValues": [
                            {
                                "booleanValue": true,
                                "id": 126265,
                                "customField": {
                                    "archived": false,
                                    "name": "checkbox - ts",
                                    "index": 0,
                                    "id": 38,
                                    "type": "CHECKBOX",
                                    "projectId": 10007,
                                    "required": false
                                }
                            }
                        ],
                    }
                ]
            },
        }
    ]

     

     

    Do you see a different response schema when trying this endpoint?