Automation APIs form team management
This article details the API methods to be used to automate the configuration of dedicated actions within the Team Builder tool.
Getting the List of Teams
The following method returns the list of existing teams in the system.
To be able to use this method, your profile must have been granted the "Read" permission for "Teams" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Admin > Functional Admin > Teams).
| Service | Action | Endpoint | Parameters | Output Sample |
|---|---|---|---|---|
| Object | GET | /api/team |
|
Copy |
Getting the List of Users Assigned to a Team
The following method returns the list of all users assigned to a specific team.
To be able to use this method, your profile must have been granted the "Read" permission for "Teams" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Admin > Functional Admin > Teams).
| Service | Action | Endpoint | Parameters | Output Sample |
|---|---|---|---|---|
| Object | GET | /api/team/{uidTeam}/user |
|
Copy |
If assigned = true, then the method returns the users that are assigned to the team; if assigned = false, then the method returns users that are not assigned to the team.
In the output, the list of the users in the team is sorted as follows: first name, last name.
Creating a Team
The following API method can be used to create teams in the system.
To be able to use this method, your profile must have been granted the "Read" permission for "Teams" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Admin > Functional Admin > Teams).
| Service | Action | Endpoint | Parameters | Input Sample |
|---|---|---|---|---|
| Object | POST | /api/team |
|
Copy |
When this method is used, the system checks that the name of the team is unique. If the name already exists, the system returns the following message: "The name of the team already exists.".
Editing an Existing Team
The following API method can be used to edit existing teams in the system.
To be able to use this method, your profile must have been granted the "Read" permission for "Teams" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Admin > Functional Admin > Teams).
| Service | Action | Endpoint | Parameters | Input Sample |
|---|---|---|---|---|
| Object | PUT | /api/team/{uidTeam} |
|
Copy |
When this method is used, the system checks that the name of the team is unique. If the name already exists, the system returns the following message: "The name of the team already exists.".
Adding Users to a Team/Removing Users from a Team
| Service | Action | Endpoint | Parameters | Input Sample |
Output Sample |
|---|---|---|---|---|---|
| Object | POST | /api/team/{uidTeam}/user |
|
Copy |
Copy |
Deleting an Existing Team
The following API method can be used to delete an existing team and the related user assignments.
To be able to use this method, your profile must have been granted the "Read" permission for "Teams" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Admin > Functional Admin > Teams).
| Service | Action | Endpoint |
|---|---|---|
| Object | DELETE | /api/team/{uidTeam} |
Getting the List of Teams to Which a User is Assigned
The following API method enables you to return the list of all teams to which the currently logged in user is assigned. The method described below uses an encrypted payload and contains the uiduser and its JWT parameter.
| Service | Action | Endpoint | Output Sample |
|---|---|---|---|
| Object | POST | /api/team/get-uids |
Copy |