POST/ managements

In Guardian, one is able to define a hierarchy which represents the organizational structure of a company, allowing management responsibilities to be distributed among regional managers, branch managers, human resources specialists, etc—in fact, a company’s hierarchy can be defined to any level of specificity required for a given organization.

A management enables additional user permissions by extending user scope. Specifically, defining a management associates a set of employees with a user, allowing him or her to view and modify the employees’ cases. A management scope is defined by first creating a group, and then associating the manager’s user account with that group.

This API is used to create management relationships between a user and an existing employee group. Management groups logically describe a tree structure, mirroring the organization of the company. A group is identified by a unique path from the root of the hierarchy to the desired node. Multiple managements can exist for the same group node.

Employee groups represent individual node paths within the organization’s hierarchical structure and are used to categorize a collection of employees. The hierarchy is comprised of between one and five levels as defined by the organization (excludes the root level which exists for every company). The organization may create levels for the following types of data stored in Guardian: locations, legal entities, and custom fields.

The post request must include the attribute values that define the employee group, listed in hierarchical order; the first element in the list is the first level of the hierarchy below the company node in the tree, and subsequent elements traverse the tree from top to bottom. Location and Legal Entity hierarchical attributes are defined by integer while Custom Field hierarchical attributes are defined by string. A post that includes [] (an explicit empty list; not null), the associated user is assigned to the entire company (root node) and has access to all employees.

 

Method

POST

 

Resource Information

Requires authentication? YES
Request formats JSON
Response formats JSON

 

Parameters

Parameter Label Description Type Max Length Required
id   Guardian system generated unique key int  N/A  
userId   The ID of the user for whom to create the employee group management relationship int    Yes
group   The ordered list (in top-to-bottom order within hierarchy) of integer and or string attributes that identify the employee group within the hierarchy for which to make the assignment relationship. Location and Legal Entity hierarchical attributes are defined by integer value (ID) while Custom Field hierarchical attributes are defined by string string/int    Yes

 

Example

Request Example

POST https://<server>/v1/managements

{
 ""userId"": 34434,
 ""group"": [
 27546,
 894,
 ""custom 10""
 ]
}

 

Response Example

{
 ""userId"": 34434,
 ""group"": [
 27546,
 894,
 ""custom 10""
 ],
 ""id"": 1206
}