Skip to content

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

Security scheme type: oauth2

Flow type: password

Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token

Security scheme type: apiKey

Query parameter name: access-token

POST
/v2/org-role/index

Returns a paginated list of organizational roles.

Most useful filters:

  • project_id: all roles in a company
  • name: search by name

Parameters for searching

object
filter
object
org_role_id
string format: uuid
code
string
name
string
description
string
project_id
string format: uuid
owned_active

Whether this role is currently active.

boolean
nullable
parent_active

Whether the parent project is currently active.

boolean
nullable
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: code name
history

If true, includes historicized entries.

boolean
Example
{
"filter": {
"project_id": "b5a7d602-3fc9-4e2a-9d1a-6e5b4c8f7a01"
},
"per-page": 20,
"page": 1,
"sort": "name"
}

List of organizational roles

Array<object>
object
org_role_id
string format: uuid
code
string
name
string
description
string
project_id
string format: uuid
owned_active

Whether this role is currently active.

boolean
nullable
parent_active

Whether the parent project is currently active.

boolean
nullable
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

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.

Role to create

object
org_role_id

Unique identifier. Auto-generated if not provided.

string format: uuid
code

Identifier code.

string
<= 50 characters
name
required

Name of the organizational role.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid

Role created successfully

object
org_role_id

Unique identifier. Auto-generated if not provided.

string format: uuid
code

Identifier code.

string
<= 50 characters
name
required

Name of the organizational role.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid
GET
/v2/org-role/view/{id}

Retrieves a single organizational role by its ID.

id
required
string format: uuid

The org_role_id to retrieve.

Role found

object
org_role_id
string format: uuid
code
string
name
string
description
string
project_id
string format: uuid
owned_active

Whether this role is currently active.

boolean
nullable
parent_active

Whether the parent project is currently active.

boolean
nullable

Not found

PUT
/v2/org-role/update/{id}

Updates an existing organizational role.

id
required
string format: uuid

The org_role_id to update.

Fields to update

object
org_role_id

Unique identifier. Auto-generated if not provided.

string format: uuid
code

Identifier code.

string
<= 50 characters
name
required

Name of the organizational role.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid

Updated successfully

object
org_role_id

Unique identifier. Auto-generated if not provided.

string format: uuid
code

Identifier code.

string
<= 50 characters
name
required

Name of the organizational role.

string
<= 255 characters
description

Optional description.

string
nullable
project_id
required

The project (company). Pass the project_id.

string format: uuid

Not found

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.

id
required
string format: uuid

The org_role_id to delete.

force
boolean

If true, deletes the role and all child entities.

Deleted successfully

Preview of entities that would be deleted (returned when force=false)