List Departments
GET /services/api/v1/departments
Returns a list of departments.
Response
Results list.
- Example
- Schema
{
"entries": [
{
"id": "1",
"ancestor_id": null,
"depth": 0,
"subtree_ids": ["1"],
"has_public_name": false,
"ancestor_ids": [],
"name_en": "Human Resources",
"name_de": "Human Resources",
"public_name_en": "Human Resources",
"public_name_de": "Human Resources"
},
{
"id": "2",
"ancestor_id": null,
"depth": 0,
"subtree_ids": ["2", "3", "4", "5"],
"has_public_name": false,
"ancestor_ids": [],
"name_en": "IT",
"name_de": "IT",
"public_name_en": "IT",
"public_name_de": "IT"
},
{
"id": "3",
"ancestor_id": "2",
"depth": 1,
"subtree_ids": ["3", "5"],
"has_public_name": false,
"ancestor_ids": ["2"],
"name_en": "Hardware",
"name_de": "Hardware",
"public_name_en": "Hardware",
"public_name_de": "Hardware"
},
{
"id": "4",
"ancestor_id": "2",
"depth": 1,
"subtree_ids": ["4"],
"has_public_name": false,
"ancestor_ids": ["2"],
"name_en": "Software",
"name_de": "Software",
"public_name_en": "Software",
"public_name_de": "Software"
},
{
"id": "5",
"show_in_job_list_filter": true,
"ancestor_id": "3",
"depth": 2,
"subtree_ids": ["5"],
"has_public_name": false,
"ancestor_ids": ["3", "2"],
"name": "Web",
"name_de": "Web",
"public_name": "Web",
"public_name_de": "Web"
}
],
"current_page": 1,
"per_page": 30,
"total_entries": 5
}
Attribute | Type | Description |
---|---|---|
id | string | Department id |
depth | int | Department tree depth of the current node |
ancestor_id | string | Department tree ancestor |
subtree_ids | string[] | Department subtree nodes |
ancestor_ids | string[] | Department ancestors |
has_public_name | boolean | Determines if the public name on, for example, career pages should be different than the internal name of the department |
name_{locale} | string | Department name in all locales of the business. |
public_name_{locale} | string | Department public name in all locales of the business. |