Department Actions
  • 03 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Department Actions

  • Dark
    Light

Article Summary

getDepartment

Retrieves a Department.

Property

Value

Description

id*

string

The ID of the Department

department = saveDepartment({"name": "Math", "code": "765", "description": "Math Department"})
department = getDepartment(department.id)

getAllDepartments

Retrieves all Departments.

Note: If there is no department ID yet in the system, RapidIdentity will create one using a createDepartment Action.

Property

Value

Description

pageSize

integer

The page size (required for a paging request)

pageNum

integer

The page number (defaults to 1 for a paging request)

saveDepartment({"name": "Math", "code": "765", "description": "Math Department"})
departments = getAllDepartments()

saveDepartment

Updates a Department.

Property

Value

Description

id*

string

The ID of the Department

saveDepartment({"name": "Math", "code": "765", "description": "Math Department"})

getDepartmentRelationship

Retrieves just one Department Relationship.

Property

Value

Description

id*

string

The ID of the Department Relationship

department = saveDepartment({"name": "Math", "code": "765", "description": "Math Department"})
departmentRelationship = saveDepartmentRelationship({"departmentId": department.id, "userId":<some user's id>, "role": "ADMINISTRATOR"})
departmentRel = getDepartmentRelationShip(departmentRelationship.id)

getAllDepartmentRelationships

Retrieves all Department Relationships. If no relationship IDs have yet been defined, RapidIdentity will create one using a createDepartmentRelationship Action Set.

Property

Value

Description

departmentId

string

The department ID for which to fetch department relationships

userId

string

The user ID for which to fetch department relationships

role

string

The role for which to fetch department relationships

pageSize

integer

The page size (required for a paging request)

pageNum

integer

The page number (defaults to 1 for a paging request)

department = saveDepartment({"name": "Math", "code": "765", "description": "Math Department"})
saveDepartmentRelationship({"departmentId": department.id, "userId":<some user's id>, "role": "ADMINISTRATOR"})
departments = getAllDepartmentRelationships()

saveDepartmentRelationship

Updates a Department Relationship.

Property

Value

Description

id*

string

The ID of the Department Relationship

department = saveDepartment({"name": "Math", "code": "765", "description": "Math Department"})
saveDepartmentRelationship({"departmentId": department.id, "userId":<some user's id>, "role": "ADMINISTRATOR"})

deleteDepartmentRelationship

Deletes a Department Relationship.

Property

Value

Description

id*

string

The ID of the Department Relationship

Delete by Department Relationship id.

deleteDepartment

Deletes a department.

Property

Value

Description

id*

string

The ID of the department to be deleted

Delete by Department id.


Was this article helpful?

What's Next