List all custom fields: Migration guide
This guide details how the List all custom fields endpoint has changed (previously known as listCustomFields in v1).
Key changes
- Pagination: To improve performance, we've added pagination to this endpoint in v2. Now, you'll receive your results in pages of 1 000 custom fields. For more information, see our Pagination guide.
- Filtering: The v2 endpoint uses the Left-Hand side (LHS) bracket notation in query parameters for filtering. For more information, see our Filtering guide.
Documentation links
Here are the links to the API reference for:
Endpoint mapping
Here's the direct correlation between the v1 and v2 endpoint URLs:
- API v1:
/api/v1/customfields - API v2:
/api/v2/custom-fields
Behavior changes (if applicable)
The API v2 endpoint introduces pagination, resulting in pages of up to 1 000 custom fields. The response includes a Link header for fetching the next page if more results are available.
Filtering in v2 is now supported via query parameters name and type using LHS bracket notation.
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location -g 'https://app.360learning.com/api/v1/customfields?company={{company}}&apiKey={{apiKey}}'API v2 input example
curl --request GET \
--url 'https://app.360learning.com/api/v2/custom-fields?name[eq]=Department&type[eq]=string' \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'authorization: Bearer access_token'Main input differences
v2 introduces filtering via new query parameters.
Change type | API v1 | API v2 |
|---|---|---|
Modified |
|
|
Added |
| |
Added |
|
Output changes
This section details the specific alterations to the successful output returned between API versions.
API v1 output example
[
{
"_id": "610aac9922cc37084f692457",
"name": "My New Custom Field",
"targetCollection": "users"
}
]API v2 output example
[
{
"name": "My New Custom Field",
"targetType": "users",
"type": "string",
"_id": "610aac9922cc37084f692457"
}
]Main output differences
Change type | API v1 | API v2 |
|---|---|---|
Modified |
|
|
Modified |
|
|
Added |
|
Updated 7 days ago
