Role
Manage roles, which represent office or project roles assigned to people.
You can create, update, delete, and search for roles with advanced filtering and pagination.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Section titled “Operations” POST /v2/role/index
Returns a paginated and filterable list of roles.
Use POST to allow complex filters via JSON payload.
Request Body
Section titled “Request Body ”Parameters for searching roles
object
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
The name of the associated project.
The type of the associated project.
The name of the associated office.
Indicates whether the office role is actively owned.
Indicates whether the parent office role is active.
The field of the model to sort the list for, use a minus to revert the sort. Es -name is to require the sort in reverse order
The field establishes whether to also include historized elements that are no longer active in the results. If you leave this parameter empty the response returns only actual entries.
Example
{ "filter": { "name": "Manager", "office_id": "off-1" }, "per-page": 10, "page": 1, "sort": "name"}
Responses
Section titled “ Responses ”List of roles
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
The name of the associated project.
The type of the associated project.
The name of the associated office.
Indicates whether the office role is actively owned.
Indicates whether the parent office role is active.
Example
{ "office_role_id": "role-1", "office_id": "off-1", "code": "MGR", "name": "Manager", "description": "Manages the office", "project_id": "proj-1"}
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/role/create
Create a new role by providing the required details.
Request Body required
Section titled “Request Body required ”Role object to be created
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
Example
{ "office_id": "off-2", "code": "ENG", "name": "Engineer", "description": "Responsible for technical tasks", "project_id": "proj-2"}
Responses
Section titled “ Responses ”Role created successfully
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
Example
{ "office_role_id": "role-2", "office_id": "off-2", "code": "ENG", "name": "Engineer", "description": "Responsible for technical tasks", "project_id": "proj-2"}
GET /v2/role/view/{id}
Retrieve a role by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the role to retrieve
Responses
Section titled “ Responses ”Role found
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
The name of the associated project.
The type of the associated project.
The name of the associated office.
Indicates whether the office role is actively owned.
Indicates whether the parent office role is active.
Example
{ "office_role_id": "role-1", "office_id": "off-1", "code": "MGR", "name": "Manager", "description": "Manages the office", "project_id": "proj-1"}
Role not found
delete
Section titled “delete” DELETE /v2/role/delete/{id}
Delete a role by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Section titled “Path Parameters ”ID of the role to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”Role deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
update
Section titled “update” PUT /v2/role/update/{id}
Update an existing role by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the role to update
Request Body required
Section titled “Request Body required ”Role object with updated data
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
Example
{ "name": "Updated Manager", "description": "Updated description"}
Responses
Section titled “ Responses ”Role updated successfully
object
The unique identifier of the office role.
The unique identifier of the office associated with the role.
The code associated with the office role, if available.
The name of the office role.
A description of the office role, if available.
The unique identifier of the associated project.
Example
{ "office_role_id": "role-1", "name": "Updated Manager", "description": "Updated description"}
Role not found