Request a list of teams that the user is an admin of.
Returns a list of teams available to the user in the following form:
[ { "id": "<ID of the team>", "displayName": "<Name of the team>" }, ... ]
RESPONSE Fields | Value Type | Description |
---|---|---|
id | String | The GUID of the team, used for details and further operations |
displayName | String | The display name value of the channel, as displayed in the interface |
Note: Requesting the list of teams using the admin context with /api/cowork/admin/teams
will return only teams that the user has administrative access to.
# Request # Use user:password for authorization GET /api/cowork/admin/teams/ HTTP/1.1 Accept: */* Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u # Response HTTP/1.1 200 OK Content-Type: application/json [ { "id": "3n1ytbwme7ngfyn9g9guwwurt", "displayName": "First Team" }, { "id": "5ypbaw82tt84pd9xfjww6b670", "displayName": "Second Team" } ]
Creates a new channel using the following JSON. The response is a team entry, being the newly created team.
{ "displayName": "<Name of the team>", "adminGroupIDs": [ "<GUID>", ... ], "adminUserIDs": [ "<GUID>", ... ], "memberGroupIDs": [ "<GUID>", ... ], "memberUserIDs": [ "<GUID>", ... ] }
REQUEST Fields | Value Type | Description |
---|---|---|
displayName | String | The display name value of the channel, as displayed in the interface |
adminGroupIDs | List of Strings | Optional list of group IDs derived from the Users and Groups manager to allow administrative access to this team for |
adminUserIDs | List of Strings | Optional list of user IDs derived from the Users and Groups manager to allow administrative access to this team for |
memberGroupIDs | List of Strings | Optional list of group IDs derived from the Users and Groups manager to allow read access to the team for. Only user in these groups will be able to join channels in this team |
memberUserIDs | List of Strings | Optional list of user IDs derived from the Users and Groups manager to allow read access to the team for. Only these user will be able to join channels in this team. |
Note: Creating a team requires the /api/cowork/admin
context.
Note: A team without member groups or member users can not be accessed by anyone.
# Request # Use user:password for authorization POST /api/cowork/admin/teams/ HTTP/1.1 Accept: */* Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u {"displayName":"Third Team","adminUserIDs":["truwwug9g9nyfgn7emwbty1n3"]} # Response HTTP/1.1 200 OK Content-Type: application/json { "id": "3n1ytbwme7ngfyn9g9guwwurt", "displayName": "Third Team" }