Edit this page on GitHub

Home > docs > api > Team

Team

A team is a group of users. Users can be in multiple teams simultaneously.

The REST API provides support for a number of operations:

Create a Team

Creates a new team with specified parameters or updates an existing one.

  • URI /api/v1/org/${orgName}/team
  • Method POST
  • Headers Authorization, Content-Type: application/json
  • Body
      {
        "name": "myTeam",
        "description": "my team"
      }
    

    All parameters except name are optional.

  • Success response
      Content-Type: application/json
    
      {
        "result": "CREATED",
        "ok": true,
        "id": "..."
      }
    

Update a Team

Updates parameters of an existing team.

  • URI /api/v1/org/${orgName}/team
  • Method POST
  • Headers Authorization, Content-Type: application/json
  • Body
      {
        "name": "new name",
        "id": "---"
        ---
      }
    

    All parameters are optional.

    Omitted parameters are not updated.

    Team id is mandatory, in case of updating team name.

  • Success response
      Content-Type: application/json
    
      {
        "result": "UPDATED",
        "ok": true,
        "id": "..."
      }
    

List Teams

Lists all existing teams.

  • URI /api/v1/org/${orgName}/team
  • Method GET
  • Headers Authorization
  • Body none
  • Success response
      Content-Type: application/json
    
      [
        {
          "id": "...",
          "name": "...",
          "description": "..."
        },
        {
          "id": "...",
          "name": "...",
          "description": "my project"
         }
      ]
    

List Users in a Team

Returns a list of users associated with the specified team.

  • URI /api/v1/org/${orgName}/team/${teamName}/users
  • Method GET
  • Headers Authorization
  • Body none
  • Success response
      Content-Type: application/json
    
      [
        { "id": "...", "username": "..." },
        { "id": "...", "username": "..." }
      ]
    

Add Users to a Team

Adds a list of users to the specified team.

  • URI /api/v1/org/${orgName}/team/${teamName}/users
  • Method PUT
  • Headers Authorization, Content-Type: application/json
  • Body
      [
        {
          "username": "userA",
          "role": "MEMBER"  
        },
        {
          "username": "userB",
          "role": "MAINTAINER"  
        },
        ...
      ]    
    
  • Success response
      Content-Type: application/json
    
      {
        "ok": true
      }
    

Add LDAP Groups to a Team

Adds a list of LDAP groups to the specified team.

  • URI /api/v1/org/${orgName}/team/${teamName}/ldapGroups
  • Method PUT
  • Headers Authorization, Content-Type: application/json
  • Body
      [
        {
          "group": "CN=groupA,DC=example,DC=com",
          "role": "MEMBER"  
        },
        {
          "group": "CN=groupB,DC=example,DC=com",
          "role": "MAINTAINER"  
        },
        ...
      ]    
    
  • Success response
      Content-Type: application/json
    
      {
        "ok": true
      }
    

Remove Users from a Team

Removes a list of users from the specified team.

  • URI /api/v1/org/${orgName}/team/${teamName}/users
  • Method DELETE
  • Headers Authorization, Content-Type: application/json
  • Body
      ["userA", "userB", "..."]
    
  • Success response
      Content-Type: application/json
    
      {
        "ok": true
      }