Skip to content
developers
Open TestCollab

Get list of custom fields

GET/customfields

Get company specific list of custom fields

Use resource IDs from your own project. Keep the API token in your server or CI environment.

example.ts
import { createConfiguration, CustomFieldsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new CustomFieldsApi(config);
const result = await api.getCustomFields({
"company": 123
});
console.log(result);
Name Location Type Required Description
company query integer Yes Company ID
_limit query integer No Limit the size of the returned results
_start query integer No Skip a specific number of entries (for pagination)
_sort query string No Sort according to a specific field.
_filter query string No Stringified filter object (the filtering guide)

200 — List of custom fields

Field Type Required Description
[].id number Yes —
[].sort_order number No —
[].name string Yes —
[].label string Yes —
[].entity string No —
[].type Custom Field Type Yes —
[].default_value string Yes NULL if default value not specified, Number type for dropdown field and date, string types for other
[].is_required boolean Yes —
[].add_to_all_projects boolean No Should link with all projects?
[].projects Array of number No Project IDs in array. Can only be specified if add_to_all_projects is false
[].search boolean No Weather to make this field searchable or not
[].extra Custom Field Extra Props No —
[].extra.options Array of object No This is expected when field type is dropdown
[].extra.act_as_config boolean No Expected when custom field’s entity is TestPlan, In case of true, it will be available under config section while creating a new test plan
[].company number Yes Company ID
[].description string No —
[].is_sortable boolean No —
Illustrative response
[]
Status Meaning
403 Forbidden