Download OpenAPI specification:Download
This documentation describes how to manage diversity questions/options and user diversity information.
As these endpoints deal with diversity data, some endpoints will require administrator permissions.
This documentation is for diversity v2 and cannot be used to retrieve diversity v1 information.
Retrieve diversity questions and available options.
Diversity questions are determined by the authenticated users roles and open applications.
When viewing as an diversity administrator, you have access to the view=all
query parameter to view all questions and options.
view | string Default: "user" Enum: "all" "user"
|
teams | string Comma separated string of team ids to filter questions by. |
regions | string Comma separated string of region ids to filter questions by. |
visible | boolean or null Default: true Filter questions by visibility ( |
Array of objects (Diversity Question) |
{- "data": [
- {
- "id": 123,
- "visible": true,
- "question_text": "What is your nationality?",
- "show_other_option": true,
- "options": [
- {
- "id": 0,
- "option_text": "British",
- "is_other": false,
- "hide_within_regions": [
- {
- "id": 2421,
- "name": "England"
}
], - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}
], - "category": {
- "id": 753,
- "name": "Nationality"
}, - "is_multiple_select": false,
- "dependency": {
- "question": { },
- "option": null
}, - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}
]
}
Update an existing diversity question.
Existing options that you do not want to change should be included in the options
array, including the id
property of the option.
If an option is omitted from the request body, any existing options will be removed.
id required | integer Example: 1214 Diversity question ID |
question_text required | string Diversity question |
visible required | boolean Determine if this question is visible to users |
show_other_option required | boolean Determine if the "other" option should be shown |
required | object Diversity category |
required | Array of objects Diversity options |
object (Diversity Question) |
{- "question_text": "What is your nationality?"
}
{- "data": {
- "id": 123,
- "visible": true,
- "question_text": "What is your nationality?",
- "show_other_option": true,
- "options": [
- {
- "id": 0,
- "option_text": "British",
- "is_other": false,
- "hide_within_regions": [
- {
- "id": 2421,
- "name": "England"
}
], - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}
], - "category": {
- "id": 753,
- "name": "Nationality"
}, - "is_multiple_select": false,
- "dependency": {
- "question": { },
- "option": null
}, - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}
}
Retrieve diversity answers for a user. This endpoint will only return questions that the user has answered.
When retrieving another users diversity information, you must first generated a signed URL.
id required | integer Example: 123 User ID |
Array of objects (Diversity Question) |
{- "data": [
- {
- "question": {
- "id": 123,
- "visible": true,
- "question_text": "What is your nationality?",
- "show_other_option": true,
- "options": [
- {
- "id": 0,
- "option_text": "British",
- "is_other": false,
- "hide_within_regions": [
- {
- "id": 2421,
- "name": "England"
}
], - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}
], - "category": {
- "id": 753,
- "name": "Nationality"
}, - "is_multiple_select": false,
- "dependency": {
- "question": { },
- "option": null
}, - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}, - "option": {
- "id": 0,
- "option_text": "British",
- "is_other": false,
- "hide_within_regions": [
- {
- "id": 2421,
- "name": "England"
}
], - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}, - "other_text": null
}
]
}
Update diversity answers for a user.
You can only update your own diversity answers. To update another users diversity answers, you must use the import system.
When providing an answer for an "other" option, you must also provide the other_text
property.
The "options" parameter is used for questions that allow multiple answers.
If a question is omitted from the request body, any existing answers will be removed.
id required | integer Example: 123 User ID |
required | object Diversity question |
object Diversity option | |
Array of objects Diversity options | |
other_text | string or null Other text provided by the user (required when answering an "other" option) |
Array of objects (Diversity Question) |
[- {
- "question": {
- "id": 101
}, - "option": {
- "id": 242
}
}, - {
- "question": {
- "id": 102
}, - "option": {
- "id": 635
}
}, - {
- "question": {
- "id": 103
}, - "options": [
- {
- "id": 635
}, - {
- "id": 636
}
]
}, - {
- "question": {
- "id": 104
}, - "options": [
- {
- "id": 635
}, - {
- "id": 636
}
], - "other_text": "British"
}, - {
- "question": {
- "id": 105
}, - "option": {
- "id": 325
}, - "other_text": "Scottish"
}
]
{- "data": [
- {
- "question": {
- "id": 123,
- "visible": true,
- "question_text": "What is your nationality?",
- "show_other_option": true,
- "options": [
- {
- "id": 0,
- "option_text": "British",
- "is_other": false,
- "hide_within_regions": [
- {
- "id": 2421,
- "name": "England"
}
], - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}
], - "category": {
- "id": 753,
- "name": "Nationality"
}, - "is_multiple_select": false,
- "dependency": {
- "question": { },
- "option": null
}, - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}, - "option": {
- "id": 0,
- "option_text": "British",
- "is_other": false,
- "hide_within_regions": [
- {
- "id": 2421,
- "name": "England"
}
], - "created_at": "2020-01-01 13:00:00",
- "updated_at": "2020-01-01 13:00:00"
}, - "other_text": null
}
]
}
In order for an administrator to view another users diversity information, you must first create a signed URL using this endpoint.
You must provide the password for the authenticated user in the request body, or a confirmation boolean when SSO is enabled.
id required | integer Example: 123 User ID |
password | string or null Password for the authenticated user |
confirmation | boolean or null Confirmation boolean when SSO is enabled |
object |
{- "password": "Password123"
}