Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Custom case fields are not working in "get_cases" API



I’ve created a new case field (system name: component , type: Multi-select and with the following options:
1, Component 1
2, Component 2
3, Component 3
4, Component 4

and added this components to some test cases.

I want now to get the test cases containing some of these components with API. I’ve tried this:

Is there a way to get only the tests that have a component (Component 1) selected?



Hi Bogdan,

Thanks for your posting. The get_cases API method supports the filters you can find in the API documentation but this currently does not include custom fields:

You can read the full list and filter this on the client side of course though and all details required for this are included in the response.



Thank you for the quick response. I will filter the test cases from the response.



Thanks, Bogdan, great to hear that this works for you :slight_smile:

Have a good week!



When will the API support GETs on custom fields?


Hi Seth!

The API fully supports custom fields, it’s just that there are currently no separate server-side filters for this (it’s planned to look into this). You can already fully filter the list of cases on the client side and the response contains everything you would need for this. We understand that a server-side filter works better for many scenarios of course and I’m happy to add another vote to this feature request, thanks for your feedback!




I have created a custom field for test case. The field is named Tags (tags_multi_select) and is a multi-select field.

However, when I use get_case API, it does not return this field in the response. Does the API not return multi-select fields?

I have defined other custom fields that are not multi-select and the API returns those fields.

Please let me know.



Hi Tarik,

Thanks for your posting. Multi-select fields are only included if a case actually has a value set for this field and this is then returned as array of IDs (as configured in the custom field options). If the response/case does not include the field, you can assume that this field is empty for this case (otherwise the full list is included).

I hope this helps!



For the test case I’m getting via the API, i have selected 2 values for this field Tags (tags_multi_select). But when I try to retrieve it via the response it’s null, it’s not being returned even when the field is not empty…
e.g. testCase.get(“tags_multi_select”)


Nevermind, I forgot to precede the field name with “custom”. Now it works!


Hi Tarik,

Ah sorry, missed your previous reply. Yes, custom fields are submitted and accessed with a custom_ prefix via the API but good to hear that you found it yourself already.



What’s the status on the API server-side filter for customs?
It’s a pain to download 100 mb each time to filter by custom fields on the client side.