Get custom field options
The "Get Custom Field Options" endpoint allows you to retrieve all available dropdown options associated with a specific custom field identified by its customFieldId.
This endpoint is particularly useful for obtaining the current set of options available for a dropdown custom field, which can be used for display purposes or further operations.
Key guidelines to follow for retrieving the custom field options:
- customFIeldId: The unique identifier of the custom field. This is a path URL parameter, so make sure to include it in the request URL. Additionally, ensure that the custom field is of the 'dropdown' type.
- limit: This parameter controls how many results you want to receive in one request. You can set it to a number between 1 and 100, and if you don’t provide a number, it will show 10 results by default.
- Offset: This parameter tells the system where to start retrieving results from. For example, if you have already retrieved the first 10 results, you can set the offset to 10 to get the next set of results. The default value is 0, which means it will start from the beginning.
CURL example for retrieving custom field options (values):
curl --request GET \
--url 'https://api.connecteam.com/users/v1/custom-fields/123456/options?limit=10&offset=0&isDeleted=false' \
--header 'X-API-KEY: 73acf336-5115-49f0-9b7b-380db8562b5d' \
--header 'accept: application/json'
Payload example for the response:
{
"requestId": "64ebd384-7132-4ee1-9940-234b03e11e69",
"data": {
"options": [
{
"id": 0,
"value": "Team 11",
"isDisabled": false,
"isDeleted": false
},
{
"id": 1,
"value": "Team 2",
"isDisabled": false,
"isDeleted": false
},
{
"id": 2,
"value": "Team 3",
"isDisabled": false,
"isDeleted": false
}
]
},
"paging": {
"offset": 3
}
}
Updated 19 days ago