OrgUnit
An OrgUnit represents a unit in the company organization chart.
Organization units have a tree structure: each unit can have a parent unit
(parent_org_unit_id) and multiple child units.
Examples: “General Management”, “Production Department”, “Quality Office”.
Belongs to a project (not to an office). People are assigned to organization units via OrgPerson, optionally with a role (OrgRole).
Use this API to:
- Define the company organization chart structure
- Create child units (by passing
parent_org_unit_id) - Browse the organization chart for a project (filter by
project_id)
Supports historicization.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Section titled “ Authentication ”OAuth2
Section titled “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” POST /v2/org-unit/index
Returns a paginated list of organization units.
Most useful filters:
project_id: all units in a companyparent_org_unit_id: child units of a specific unitname: search by name
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching
object
object
Whether this unit is currently active.
Whether the parent entities are currently active.
If true, includes historicized entries.
Example
{ "filter": { "project_id": "b5a7d602-3fc9-4e2a-9d1a-6e5b4c8f7a01" }, "per-page": 20, "page": 1, "sort": "name"}Responses
Section titled “ Responses ”List of organization units
object
Whether this unit is currently active.
Whether the parent entities are currently active.
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
create
Section titled “create” POST /v2/org-unit/create
Creates a new organization unit.
Requires name and project_id.
The org_unit_id is auto-generated if not provided.
To create a child unit, pass the parent_org_unit_id of the parent unit.
Omit parent_org_unit_id for top-level units.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Organization unit to create
object
Unique identifier. Auto-generated if not provided.
Identifier code.
Name of the organization unit.
Optional description.
Parent unit in the tree hierarchy. Null for top-level units. Pass the org_unit_id of the parent.
The project (company). Pass the project_id.
Responses
Section titled “ Responses ”Organization unit created successfully
object
Unique identifier. Auto-generated if not provided.
Identifier code.
Name of the organization unit.
Optional description.
Parent unit in the tree hierarchy. Null for top-level units. Pass the org_unit_id of the parent.
The project (company). Pass the project_id.
GET /v2/org-unit/view/{id}
Retrieves a single organization unit by its ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The org_unit_id to retrieve.
Responses
Section titled “ Responses ”Organization unit found
object
Whether this unit is currently active.
Whether the parent entities are currently active.
Not found
update
Section titled “update” PUT /v2/org-unit/update/{id}
Updates an existing organization unit.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The org_unit_id to update.
Request Body required
Section titled “Request Body required ”Fields to update
object
Unique identifier. Auto-generated if not provided.
Identifier code.
Name of the organization unit.
Optional description.
Parent unit in the tree hierarchy. Null for top-level units. Pass the org_unit_id of the parent.
The project (company). Pass the project_id.
Responses
Section titled “ Responses ”Updated successfully
object
Unique identifier. Auto-generated if not provided.
Identifier code.
Name of the organization unit.
Optional description.
Parent unit in the tree hierarchy. Null for top-level units. Pass the org_unit_id of the parent.
The project (company). Pass the project_id.
Not found
delete
Section titled “delete” DELETE /v2/org-unit/delete/{id}
Deletes an organization unit.
If force=false (default), the response lists child entities (child units, person assignments).
If force=true, the unit and all child entities are deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The org_unit_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the unit and all child entities.
Responses
Section titled “ Responses ”Deleted successfully
Preview of entities that would be deleted (returned when force=false)