A team is a group of users. Users can be in multiple teams simultaneously.
The REST API provides support for a number of operations:
Creates a new team with specified parameters or updates an existing one.
/api/v1/org/${orgName}/team
POST
Authorization
, Content-Type: application/json
{
"name": "myTeam",
"description": "my team"
}
All parameters except name
are optional.
Content-Type: application/json
{
"result": "CREATED",
"ok": true,
"id": "..."
}
Updates parameters of an existing team.
/api/v1/org/${orgName}/team
POST
Authorization
, Content-Type: application/json
{
"name": "new name",
"id": "---"
---
}
All parameters are optional.
Omitted parameters are not updated.
Team id
is mandatory, in case of updating team name
.
Content-Type: application/json
{
"result": "UPDATED",
"ok": true,
"id": "..."
}
Lists all existing teams.
/api/v1/org/${orgName}/team
GET
Authorization
Content-Type: application/json
[
{
"id": "...",
"name": "...",
"description": "..."
},
{
"id": "...",
"name": "...",
"description": "my project"
}
]
Returns a list of users associated with the specified team.
/api/v1/org/${orgName}/team/${teamName}/users
GET
Authorization
Content-Type: application/json
[
{ "id": "...", "username": "..." },
{ "id": "...", "username": "..." }
]
Adds a list of users to the specified team.
/api/v1/org/${orgName}/team/${teamName}/users
PUT
Authorization
, Content-Type: application/json
[
{
"username": "userA",
"role": "MEMBER"
},
{
"username": "userB",
"role": "MAINTAINER"
},
...
]
Content-Type: application/json
{
"ok": true
}
Adds a list of LDAP groups to the specified team.
/api/v1/org/${orgName}/team/${teamName}/ldapGroups
PUT
Authorization
, Content-Type: application/json
[
{
"group": "CN=groupA,DC=example,DC=com",
"role": "MEMBER"
},
{
"group": "CN=groupB,DC=example,DC=com",
"role": "MAINTAINER"
},
...
]
Content-Type: application/json
{
"ok": true
}
Removes a list of users from the specified team.
/api/v1/org/${orgName}/team/${teamName}/users
DELETE
Authorization
, Content-Type: application/json
["userA", "userB", "..."]
Content-Type: application/json
{
"ok": true
}