OrgRole
An OrgRole represents a role in the company organization chart. Unlike office safety roles (Role/OfficeRole), these are organizational roles at company level.
Examples: “Director”, “Production Manager”, “Quality Officer”.
Belongs to a project (not to an office). People are assigned to organizational roles via OrgPerson.
Use this API to:
- Define organizational chart roles
- Browse available roles in 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-role/index
Returns a paginated list of organizational roles.
Most useful filters:
project_id: all roles in a companyname: search by name
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching
object
object
Whether this role is currently active.
Whether the parent project is 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 organizational roles
object
Whether this role is currently active.
Whether the parent project is 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-role/create
Creates a new organizational role.
Requires name and project_id.
The org_role_id is auto-generated if not provided.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Role to create
object
Unique identifier. Auto-generated if not provided.
Identifier code.
Name of the organizational role.
Optional description.
The project (company). Pass the project_id.
Responses
Section titled “ Responses ”Role created successfully
object
Unique identifier. Auto-generated if not provided.
Identifier code.
Name of the organizational role.
Optional description.
The project (company). Pass the project_id.
GET /v2/org-role/view/{id}
Retrieves a single organizational role by its ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The org_role_id to retrieve.
Responses
Section titled “ Responses ”Role found
object
Whether this role is currently active.
Whether the parent project is currently active.
Not found
update
Section titled “update” PUT /v2/org-role/update/{id}
Updates an existing organizational role.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The org_role_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 organizational role.
Optional description.
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 organizational role.
Optional description.
The project (company). Pass the project_id.
Not found
delete
Section titled “delete” DELETE /v2/org-role/delete/{id}
Deletes an organizational role.
If force=false (default), the response lists child entities (person assignments).
If force=true, the role and all related entities are deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The org_role_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the role and all child entities.
Responses
Section titled “ Responses ”Deleted successfully
Preview of entities that would be deleted (returned when force=false)