Skip to main content

Teams

In order to query information about teams (eg. members, workbooks of a team), the following REST services can be used.

1. Querying all teams​

Url: /api/services/app/workArea/Get

HTTP method: GET

It returns all existing teams if the calling user has the permission Workarea.View. Otherwise, it returns only the teams in which the user has been granted a permission.

Required permission: Workarea.List

Example:

GET https://dev.iclportal.com/api/services/app/workArea/Get HTTP/1.1 
{  
"result": {
"results": [
{
"id": "56c08dcd-8884-45d3-a6cc-2b0cf32b8b6d",
"title": "\"A\" Team",
"description": "The Avengers",
"teamMembers": null,
"activeTasksCount": 0,
"isActive": true,
"canEdit": true
}
],
"__count": 1
}
}
NameTypeDescription
idstringThe unique identifier of the team.
titlestringThe title of the team.
descriptionstringThe description of the team.
teamMembersarrayFor future use.
activeTasksCountnumberThe number of the active tasks in the team.
isActivebooleanTrue if the team is active. When a team is inactive, new tasks can no longer be created or assigned.
canEditbooleanTrue if the user to whom the bearer token belongs has permission to edit the team settings.

2. Querying groups​

Url: /api/services/app/workArea/GetGroups

HTTP method: POST

It returns all groups which are defined for the given team (Administrators, Coordinators, Inspectors, Viewers). The name of a group is its display name in the language of the calling user. The Tester group of the team is not returned.

Required permission: Workarea.Groups.View, either in general or for the given team.

Parameter: The parameters are provided in the HTTP request body using a JSON object. The parameter id is the unique identifier of the team.

Example:

POST api/services/app/workArea/GetGroups HTTP/1.1
{ "id": "56c08dcd-8884-45d3-a6cc-2b0cf32b8b6d" }
{  
"result": {
"groups": [
{
"groupId": 6,
"name": "Administrators"
},
{
"groupId": 7,
"name": "Coordinators"
},
{
"groupId": 8,
"name": "Inspectors"
},
{
"groupId": 10,
"name": "Viewer"
}
]
}
}

If no team with the given id exists, the request fails with 500 Internal Server Error.

3. Querying group members​

Url: /api/services/app/groups/GetMembers

HTTP method: GET

It returns all members of the given group.

Parameter: The parameter groupId is the unique identifier of the group.

Example:

GET https://dev.iclportal.com/api/services/app/groups/GetMembers?groupId=6 HTTP/1.1
{
"result": {
"results": [
{
"id": 4,
"userName": "nromanoff",
"name": "Natasha",
"surname": "Romanoff",
"emailAddress": "nromanoff@example.com"
},
{
"id": 5,
"userName": "tstark",
"name": "Tony",
"surname": "Stark",
"emailAddress": "tstark@example.com"
},
{
"id": 6,
"userName": "srogers",
"name": "Steven",
"surname": "Rogers",
"emailAddress": "srogers@example.com"
}
],
"__count": 3
}
}

4. Querying workbooks of teams​

Url: /api/services/app/workbook/GetAssociatedWorkbooks

HTTP method: GET

It returns all workbooks which are connected to the given team. Workbooks that were deleted but are still connected to the team are included; their isDeleted is true.

Parameter: The parameter workAreaId is the unique identifier of the team. If it is omitted, the result is empty.

Example:

GET https://dev.iclportal.com/api/services/app/workbook/GetAssociatedWorkbooks?workAreaId=56c08dcd-8884-45d3-a6cc-2b0cf32b8b6d HTTP/1.1
{
"result": {
"results": [
{
"id": "4907fb0f-4c35-48be-b21a-5e4864e434e7",
"definitionId": "3b5191e8-6c7d-4579-ba5d-5ee6ec3e57ad",
"version": "1.0.0.14",
"versionCode": 14,
"title": "Test iWorkbook",
"name": "Test iWorkbook",
"description": null,
"isPublished": true,
"isTestModeEnabled": false,
"creationTime": "2023-10-04T06:49:45.197Z",
"isDeleted": false,
"deletionTime": null,
"deleterUser": null,
"retentionInDays": null
}
],
"__count": 1
}
}
NameTypeDescription
isTestModeEnabledbooleanTrue if the workbook is in test mode in this team.
retentionInDaysnumberThe retention period of the workbook in days, i.e. the number of days after which completed inspections are deleted from the users' devices. null if the default retention period applies.