Skip to main content
POST
/
api
/
metrics
/
developer
/
prs
/
get
curl --request POST \
  --url https://api.codeant.ai/api/metrics/developer/prs/get \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "platform": "github",
  "org": "my-org",
  "start_date": "2025-01-01",
  "end_date": "2025-03-01"
}
'
{
  "metric": "developer_pr_data",
  "platform": "<string>",
  "org": "<string>",
  "start_date": "2023-12-25",
  "end_date": "2023-12-25",
  "developer_pr_data": [
    {
      "login": "<string>",
      "name": "<string>",
      "total_prs": 123,
      "open_prs": 123,
      "closed_prs": 123,
      "merged_prs": 123,
      "total_additions": 123,
      "total_deletions": 123,
      "total_files_changed": 123,
      "repositories": [
        "<string>"
      ],
      "repository_prs": {},
      "pr_creation_dates": {},
      "prs_detail": [
        {
          "repository": "<string>",
          "pr_number": 123,
          "title": "<string>",
          "state": "open",
          "additions": 123,
          "deletions": 123,
          "files_changed": 123,
          "created_at": "2023-11-07T05:31:56Z",
          "merged_at": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "total_count": 123
}

Authorizations

Authorization
string
header
required

Access token for the git provider (GitHub PAT, GitLab PAT, Bitbucket App Password, Azure DevOps PAT). Pass via Authorization: Bearer <token> header.

Body

application/json
platform
enum<string>
required

Version control platform

Available options:
github,
gitlab,
bitbucket,
azure_devops,
azuredevops
Example:

"github"

org
string
required

Organization, workspace, or group name on the platform

Example:

"my-org"

start_date
string<date>
required

Start of the date range (YYYY-MM-DD)

Example:

"2025-01-01"

end_date
string<date>
required

End of the date range (YYYY-MM-DD)

Example:

"2025-03-01"

github_base_url
string
default:https://github.com

Base URL for GitHub (use for GitHub Enterprise Server)

Example:

"https://github.com"

gitlab_base_url
string
default:https://gitlab.com

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

Example:

"https://gitlab.com"

azure_devops_base_url
string
default:https://dev.azure.com

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

Example:

"https://dev.azure.com"

bitbucket_base_url
string
default:https://api.bitbucket.org/2.0

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

Example:

"https://api.bitbucket.org/2.0"

Response

Developer PR data

metric
string
Example:

"developer_pr_data"

platform
string
org
string
start_date
string<date>
end_date
string<date>
developer_pr_data
object[]
total_count
integer

Number of developers with PR activity