Getting User Profile Fields
AVAILABLE WITH BUSINESS SUBSCRIPTION
Request: GET /user/profile/fields
Permissions to Run the Request
Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators, and users with a custom role can add users only to the departments they manage and their sub-departments.
Course authors do not have access to the methods or data involved in requesting user information.
Request Headers
| Parameter | Description |
|---|---|
| Authorization (required) | Access token. You can obtain a token by making a request |
| Accept: application/json (required) | Format of the response data: JSON |
Existing customers may continue using ispringlearn.com, and new customers should use ispring.com.
Response Parameters
| Parameter | Description |
|---|---|
| userFieldInfo | An array with data about the user profile field |
| userFieldInfoId | The ID of the profile field |
| label | The name of the profile field |
| type | The field type. Possible values:
|
| isUnique | The parameter shows if the field is unique Possible values: 0 — not unique (false) |
| isRequired | The parameter shows if the field is required Possible values: 0 — is optional (false) |
| orderPriority | The ordinal number of the field – the count starts from 0 For example, for the first field in the list, the parameter orderPriority=0, etc |
| values [] (optional) | An array with the data of the fields from the list. For example, the country field type includes a list of countries |
| field | The dropdown list item. Each field contains both the name field and the value field |
Possible Response Codes
| Code | Text | Description |
|---|---|---|
| 200 | Ok | The request has been processed successfully |
| 400 | Bad Request | A request error |
| 401 | Unauthorized | An authorization error |
| 403 | Permission denied | The user doesn't have enough permissions to complete the request |
Sample Request
GET /user/profile/fields HTTP/1.1
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Accept: application/json
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
Connection: close
{
"userFieldInfo": [
{
"userFieldInfoId": "USER_DEFINED_FIELD3",
"name": "string",
"label": "string",
"type": "string",
"isUnique": true,
"isRequired": true,
"orderPriority": 0,
"values": [
{
"name": "string",
"value": "string"
}
]
}
]
}