PractiTest Discussion Forum

Unable to retrieve all custom fields for a test case

Hello, I am using this API endpoint to get details for a test case Full API Documentation (Version 2) - PractiTest
Unfortunately I am unable to see all custom fields associated with this test case. UI shows some additional custom fields but API query does not return full data. Only partial custom fields are being returned.
Could you please let me know what is the correct approach to query or this is a bug ?

Hi,
This endpoint should return all custom fields that are not empty inside the “custom-fields” hash.
Can you please share the response you get?

Hello @yaniv
Thanks for your reply. I do get some custom fields in the response:

"custom-fields":{"---f-34851":"[\"test01\"]","---f-35247":"[\"Player Experience\"]","---f-159319":"Automatable"}

But this is not the complete list. I also have Browser/Device as one of the custom field which has a value set, but it doesnt show in the response.
Screen Shot 2023-12-14 at 7.38.07 AM

This is how custom field has been defined/created in Practitest:

{'id': '36052', 'type': 'custom-fields', 'attributes': {'name': 'Browser/Device', 'field-format': 'list', 'project-id':1234, 'possible-values': ['All Desktop', 'All Mobile', 'Safari', 'Windows'],

Hello @tshukla !
The GET request of Tests, or a specific Test, returns the custom field and its value in the response only if this specific custom field has a value in this specific Test.
Therefore, I recommend you to check the Test in UI and see whether the Custom Field ‘Browser/Device’ has a value in it.