> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codeant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Active Developers

> Returns all developers who made commits in the organization during the specified date range. Includes per-developer statistics: commit counts, lines added/deleted, language breakdown, coding day distribution, and repository contributions. Useful for team activity dashboards and headcount tracking.



## OpenAPI

````yaml /openapi.json post /api/metrics/developer/devs/active/get
openapi: 3.0.3
info:
  title: CodeAnt AI API
  description: >-
    API for code analysis (SAST, SCA, secrets, IaC) and developer productivity
    metrics. Supports GitHub, GitLab, Bitbucket, and Azure DevOps.
  version: 1.0.0
servers:
  - url: https://api.codeant.ai
    description: Production server
security: []
tags:
  - name: Analysis
    description: Code analysis operations
  - name: Agent Analysis
    description: >-
      AI-powered agent analysis operations. Uses LLM-based code exploration
      agents to perform deep security threat hunting, bug finding, and custom
      analysis with reflection-based false positive filtering.
  - name: Developer Metrics — Teams
    description: >-
      Manage developer teams: create, update, delete teams and manage team
      membership. Teams are used to organize developers and scope metrics.
  - name: Developer Metrics
    description: >-
      Developer productivity and activity metrics: active developers, PR
      throughput, individual comparisons, and AI-generated summaries. All
      endpoints support GitHub, GitLab, Bitbucket, and Azure DevOps.
paths:
  /api/metrics/developer/devs/active/get:
    post:
      tags:
        - Developer Metrics
      summary: Get Active Developers
      description: >-
        Returns all developers who made commits in the organization during the
        specified date range. Includes per-developer statistics: commit counts,
        lines added/deleted, language breakdown, coding day distribution, and
        repository contributions. Useful for team activity dashboards and
        headcount tracking.
      operationId: getActiveDevs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DateRangeRequest'
            examples:
              github:
                summary: GitHub
                value:
                  platform: github
                  org: my-org
                  start_date: '2025-01-01'
                  end_date: '2025-03-01'
              gitlab:
                summary: GitLab
                value:
                  platform: gitlab
                  org: my-group
                  start_date: '2025-01-01'
                  end_date: '2025-03-01'
              bitbucket:
                summary: Bitbucket
                value:
                  platform: bitbucket
                  org: my-workspace
                  start_date: '2025-01-01'
                  end_date: '2025-03-01'
              azure_devops:
                summary: Azure DevOps
                value:
                  platform: azure_devops
                  org: my-org
                  start_date: '2025-01-01'
                  end_date: '2025-03-01'
      responses:
        '200':
          description: Active developers list
          content:
            application/json:
              schema:
                type: object
                properties:
                  metric:
                    type: string
                    example: active_developers
                  platform:
                    type: string
                  org:
                    type: string
                  start_date:
                    type: string
                    format: date
                  end_date:
                    type: string
                    format: date
                  active_developers:
                    type: array
                    items:
                      $ref: '#/components/schemas/ActiveDeveloper'
                  total_count:
                    type: integer
                    description: Number of active developers
        '400':
          description: Bad request — missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevMetricsErrorResponse'
              example:
                error: 'Missing required parameters: platform, org'
        '401':
          description: Unauthorized — missing, invalid, or insufficient access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevMetricsErrorResponse'
              examples:
                missing_token:
                  summary: Missing Authorization header
                  value:
                    error: Missing Authorization header. Use 'Bearer <access_token>'
                invalid_token:
                  summary: Invalid or insufficient token
                  value:
                    error: >-
                      Access token invalid or does not have access to this
                      organization
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevMetricsStatusResponse'
              example:
                status: error
                message: Internal server error
      security:
        - BearerAuth: []
components:
  schemas:
    DateRangeRequest:
      allOf:
        - $ref: '#/components/schemas/DevMetricsBaseRequest'
        - type: object
          required:
            - start_date
            - end_date
          properties:
            start_date:
              type: string
              format: date
              description: Start of the date range (YYYY-MM-DD)
              example: '2025-01-01'
            end_date:
              type: string
              format: date
              description: End of the date range (YYYY-MM-DD)
              example: '2025-03-01'
    ActiveDeveloper:
      type: object
      description: An active developer with commit activity and code statistics
      properties:
        login:
          type: string
          description: Developer's git login/email
        name:
          type: string
          description: Developer's display name
        commit_count:
          type: integer
          description: Total commits in the date range
        repositories:
          type: array
          items:
            type: string
          description: Repositories the developer contributed to
        repository_commits:
          type: object
          additionalProperties:
            type: integer
          description: Commit count per repository
        coding_days:
          type: object
          additionalProperties:
            type: integer
          description: Commits per day (date → count)
        total_additions:
          type: integer
        total_deletions:
          type: integer
        total_files_changed:
          type: integer
        languages:
          type: object
          description: Breakdown by file extension
          additionalProperties:
            type: object
            properties:
              additions:
                type: integer
              deletions:
                type: integer
              files:
                type: integer
        commit_times:
          type: object
          description: Commits by time of day
          properties:
            morning:
              type: integer
            afternoon:
              type: integer
            evening:
              type: integer
            night:
              type: integer
        repository_count:
          type: integer
        avg_commit_size:
          type: number
        net_code_impact:
          type: integer
          description: additions - deletions
        test_ratio:
          type: number
          description: Ratio of test code changes
    DevMetricsErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
    DevMetricsStatusResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
        message:
          type: string
          description: Human-readable status message
    DevMetricsBaseRequest:
      type: object
      required:
        - platform
        - org
      properties:
        platform:
          type: string
          description: Version control platform
          enum:
            - github
            - gitlab
            - bitbucket
            - azure_devops
            - azuredevops
          example: github
        org:
          type: string
          description: Organization, workspace, or group name on the platform
          example: my-org
        github_base_url:
          type: string
          description: Base URL for GitHub (use for GitHub Enterprise Server)
          default: https://github.com
          example: https://github.com
        gitlab_base_url:
          type: string
          description: Base URL for GitLab (use for self-hosted GitLab instances)
          default: https://gitlab.com
          example: https://gitlab.com
        azure_devops_base_url:
          type: string
          description: Base URL for Azure DevOps (use for Azure DevOps Server)
          default: https://dev.azure.com
          example: https://dev.azure.com
        bitbucket_base_url:
          type: string
          description: Base URL for Bitbucket (use for Bitbucket Data Center/Server)
          default: https://api.bitbucket.org/2.0
          example: https://api.bitbucket.org/2.0
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Access token for the git provider (GitHub PAT, GitLab PAT, Bitbucket App
        Password, Azure DevOps PAT). Pass via `Authorization: Bearer <token>`
        header.

````