GET
/
api
/
v2
/
enterprise
/
metrics
/
prs
curl -X GET "https://api.devin.ai/api/v2/enterprise/metrics/prs" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "prs_opened": 45,
  "prs_closed": 42,
  "prs_merged": 38
}

Returns pull request metrics for your enterprise, including counts of PRs opened, closed, and merged.

Query Parameters

start_date
string

Start date for the metrics period. Defaults to the beginning of the current billing cycle.

end_date
string

End date for the metrics period. Defaults to the current date.

org_ids
array

Array of organization IDs to filter metrics. If not provided, returns metrics for all organizations.

user_ids
array

Array of user IDs to filter metrics. If not provided, returns metrics for all users.

Response

prs_opened
integer
required

Total number of pull requests opened in the specified period

prs_closed
integer
required

Total number of pull requests closed in the specified period

prs_merged
integer
required

Total number of pull requests merged in the specified period

curl -X GET "https://api.devin.ai/api/v2/enterprise/metrics/prs" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "prs_opened": 45,
  "prs_closed": 42,
  "prs_merged": 38
}