v1

latestOpenAPI 3.0.32026-07-26233989.2 KB
Developer Metrics - Teams

Create Team

Creates a new developer team. Teams can be organized around developers (by adding members), repositories (by assigning repos), or both. You can also create empty teams and add members/repos later via the update and member endpoints.

Use cases:

  • Developer-based team: Pass members to group developers (e.g. a frontend squad). You can optionally pass repositories as a filter to scope metrics to specific repos for this team.
  • Repository-based team: Pass only repositories to group repos (e.g. all microservices). No members - metrics are aggregated across the listed repos.
  • Mixed team: Pass both members and repositories - metrics are scoped to these members across these repos.
  • Disabled lists: Create special teams named codeant-disabled-members or codeant-disabled-repos to exclude specific developers or repositories from all metrics calculations across the organization.

Optionally assign one or more team_leads (by login) and categorize teams with tags. Teams can be nested using parent_team_id.

post/api/metrics/developer/teams/create

Request body

platform'github' | 'gitlab' | 'bitbucket' | 'azure_devops' | 'azuredevops' required

Version control platform

orgstring required

Organization, workspace, or group name on the platform

github_base_urlstring

Base URL for GitHub (use for GitHub Enterprise Server)

gitlab_base_urlstring

Base URL for GitLab (use for self-hosted GitLab instances)

azure_devops_base_urlstring

Base URL for Azure DevOps (use for Azure DevOps Server)

bitbucket_base_urlstring

Base URL for Bitbucket (use for Bitbucket Data Center/Server)

namestring required

Team name (min 2 characters)

descriptionstring

Team description

colorstring

Hex color code

team_leadsstring[]
repositoriesstring[]
tagsstring[]

Tags for categorizing the team

parent_team_idstring uuid

Parent team ID for creating nested/sub-teams

created_bystring

Identifier of who created the team

Example request

{
  "platform": "github",
  "org": "my-org",
  "github_base_url": "https://github.com",
  "gitlab_base_url": "https://gitlab.com",
  "azure_devops_base_url": "https://dev.azure.com",
  "bitbucket_base_url": "https://api.bitbucket.org/2.0",
  "name": "Backend Team",
  "description": "Responsible for API services",
  "color": "#1570EF",
  "team_leads": [
    "lead@example.com"
  ],
  "repositories": [
    "my-org/backend-api"
  ],
  "members": [
    {
      "user_login": "jane@example.com",
      "user_name": "Jane Doe",
      "role": "lead"
    },
    {
      "user_login": "john@example.com",
      "user_name": "John Smith",
      "role": "member"
    }
  ],
  "tags": [
    "backend",
    "api"
  ],
  "created_by": "admin@example.com"
}

Response

Team created successfully

statusstring
messagestring

Example response

{
  "status": "success",
  "message": "Team created successfully",
  "team": {
    "name": "Backend Team",
    "description": "Responsible for API services",
    "color": "#1570EF",
    "members": [
      {
        "user_login": "jane@example.com",
        "user_name": "Jane Doe",
        "role": "member"
      }
    ],
    "repositories": [
      "my-org/backend-api"
    ]
  }
}