Issues Statistics API

Every API call to issues_statistics must be authenticated.

If a user is not a member of a project and the project is private, a GET request on that project will result to a 404 status code.

Get issues statistics

Gets issues count statistics on all issues the authenticated user has access to. By default it returns only issues created by the current user. To get all issues, use parameter scope=all.

GET /issues_statistics
GET /issues_statistics?labels=foo
GET /issues_statistics?labels=foo,bar
GET /issues_statistics?labels=foo,bar&state=opened
GET /issues_statistics?milestone=1.0.0
GET /issues_statistics?milestone=1.0.0&state=opened
GET /issues_statistics?iids[]=42&iids[]=43
GET /issues_statistics?author_id=5
GET /issues_statistics?assignee_id=5
GET /issues_statistics?my_reaction_emoji=star
GET /issues_statistics?search=foo&in=title
GET /issues_statistics?confidential=true
AttributeTypeRequiredDescription
labelsstringnoComma-separated list of label names, issues must have all labels to be returned. None lists all issues with no labels. Any lists all issues with at least one label.
milestonestringnoThe milestone title. None lists all issues with no milestone. Any lists all issues that have an assigned milestone.
scopestringnoReturn issues for the given scope: created_by_me, assigned_to_me or all. Defaults to created_by_me
author_idintegernoReturn issues created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_usernamestringnoReturn issues created by the given username. Similar to author_id and mutually exclusive with author_id.
assignee_idintegernoReturn issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee.
assignee_usernamestring arraynoReturn issues assigned to the given username. Similar to assignee_id and mutually exclusive with assignee_id. In CE version assignee_username array should only contain a single value or an invalid param error will be returned otherwise.
my_reaction_emojistringnoReturn issues reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction.
iids[]integer arraynoReturn only the issues having the given iid
searchstringnoSearch issues against their title and description
instringnoModify the scope of the search attribute. title, description, or a string joining them with comma. Default is title,description
created_afterdatetimenoReturn issues created on or after the given time
created_beforedatetimenoReturn issues created on or before the given time
updated_afterdatetimenoReturn issues updated on or after the given time
updated_beforedatetimenoReturn issues updated on or before the given time
confidentialBooleannoFilter confidential or public issues.
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/issues_statistics

Example response:

{
  "statistics": {
    "counts": {
      "all": 20,
      "closed": 5,
      "opened": 15
    }
  }
}

Get group issues statistics

Gets issues count statistics for given group.

GET /groups/:id/issues_statistics
GET /groups/:id/issues_statistics?labels=foo
GET /groups/:id/issues_statistics?labels=foo,bar
GET /groups/:id/issues_statistics?labels=foo,bar&state=opened
GET /groups/:id/issues_statistics?milestone=1.0.0
GET /groups/:id/issues_statistics?milestone=1.0.0&state=opened
GET /groups/:id/issues_statistics?iids[]=42&iids[]=43
GET /groups/:id/issues_statistics?search=issue+title+or+description
GET /groups/:id/issues_statistics?author_id=5
GET /groups/:id/issues_statistics?assignee_id=5
GET /groups/:id/issues_statistics?my_reaction_emoji=star
GET /groups/:id/issues_statistics?confidential=true
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the group owned by the authenticated user
labelsstringnoComma-separated list of label names, issues must have all labels to be returned. None lists all issues with no labels. Any lists all issues with at least one label.
iids[]integer arraynoReturn only the issues having the given iid
milestonestringnoThe milestone title. None lists all issues with no milestone. Any lists all issues that have an assigned milestone.
scopestringnoReturn issues for the given scope: created_by_me, assigned_to_me or all.
author_idintegernoReturn issues created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_usernamestringnoReturn issues created by the given username. Similar to author_id and mutually exclusive with author_id.
assignee_idintegernoReturn issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee.
assignee_usernamestring arraynoReturn issues assigned to the given username. Similar to assignee_id and mutually exclusive with assignee_id. In CE version assignee_username array should only contain a single value or an invalid param error will be returned otherwise.
my_reaction_emojistringnoReturn issues reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction.
searchstringnoSearch group issues against their title and description
created_afterdatetimenoReturn issues created on or after the given time
created_beforedatetimenoReturn issues created on or before the given time
updated_afterdatetimenoReturn issues updated on or after the given time
updated_beforedatetimenoReturn issues updated on or before the given time
confidentialBooleannoFilter confidential or public issues.
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/4/issues_statistics

Example response:

{
  "statistics": {
    "counts": {
      "all": 20,
      "closed": 5,
      "opened": 15
    }
  }
}

Get project issues statistics

Gets issues count statistics for given project.

GET /projects/:id/issues_statistics
GET /projects/:id/issues_statistics?labels=foo
GET /projects/:id/issues_statistics?labels=foo,bar
GET /projects/:id/issues_statistics?labels=foo,bar&state=opened
GET /projects/:id/issues_statistics?milestone=1.0.0
GET /projects/:id/issues_statistics?milestone=1.0.0&state=opened
GET /projects/:id/issues_statistics?iids[]=42&iids[]=43
GET /projects/:id/issues_statistics?search=issue+title+or+description
GET /projects/:id/issues_statistics?author_id=5
GET /projects/:id/issues_statistics?assignee_id=5
GET /projects/:id/issues_statistics?my_reaction_emoji=star
GET /projects/:id/issues_statistics?confidential=true
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the project owned by the authenticated user
iids[]integer arraynoReturn only the milestone having the given iid
labelsstringnoComma-separated list of label names, issues must have all labels to be returned. None lists all issues with no labels. Any lists all issues with at least one label.
milestonestringnoThe milestone title. None lists all issues with no milestone. Any lists all issues that have an assigned milestone.
scopestringnoReturn issues for the given scope: created_by_me, assigned_to_me or all.
author_idintegernoReturn issues created by the given user id. Mutually exclusive with author_username. Combine with scope=all or scope=assigned_to_me.
author_usernamestringnoReturn issues created by the given username. Similar to author_id and mutually exclusive with author_id.
assignee_idintegernoReturn issues assigned to the given user id. Mutually exclusive with assignee_username. None returns unassigned issues. Any returns issues with an assignee.
assignee_usernamestring arraynoReturn issues assigned to the given username. Similar to assignee_id and mutually exclusive with assignee_id. In CE version assignee_username array should only contain a single value or an invalid param error will be returned otherwise.
my_reaction_emojistringnoReturn issues reacted by the authenticated user by the given emoji. None returns issues not given a reaction. Any returns issues given at least one reaction.
searchstringnoSearch project issues against their title and description
created_afterdatetimenoReturn issues created on or after the given time
created_beforedatetimenoReturn issues created on or before the given time
updated_afterdatetimenoReturn issues updated on or after the given time
updated_beforedatetimenoReturn issues updated on or before the given time
confidentialBooleannoFilter confidential or public issues.
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/4/issues_statistics

Example response:

{
  "statistics": {
    "counts": {
      "all": 20,
      "closed": 5,
      "opened": 15
    }
  }
}