PractiTest Discussion Forum

Getting all the tests in a project having a paticular define Custom Field

Hi all,
I am trying to find a way in which I can fetch all the tests which have a paticular Custom field using API.
Please suggest me a way if this is possible.

You mean particular custom field value, right?
We just use GET tests request on all tests and then search for the value in the response.
The trick is that their custom fields appear in the response under their ID, something like
“—f-12345”: “AAA”, where 12345 is custom field’s ID and AAA is the value. You can find the custom field Id either by going into its edit page in project settings → fields, then you can see it in the URL - or you can fetch it from GET all fields request: Full API Documentation (Version 2) - PractiTest

Hey! I am a bit late for this reply, but I am once stuck with customfields, Can we use POST to update it in the same way tou mentioned above? I remember Trying out but the custom fields did not quite Work for me.

If I understand correctly, you’re looking more for a PUT request, which indeed, can fill the custom fields with values.
This is a TEST PUT request, for example : Full API Documentation (Version 2) - PractiTest

Alex from PractiTest