Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #345200
Closed
Open
Issue created Nov 09, 2021 by Mark Lapierre@mlapierreMaintainer

Groups API fails to return `runners_token` when `with_projects` is false

Summary

According to the documentation for GET /groups/:id:

In case the user that requests is administrator of the group, it returns the runners_token for the group too.

However, that only works if with_projects is true (the default). If with_projects=false runners_token is missing, even if the user is administrator of the group.

Steps to reproduce

  1. Create a group
  2. Make a Groups API request like: https://staging.gitlab.com/api/v4/groups/gitlab-qa-sandbox-group?with_projects=true
  3. Note runners_token is present.
  4. Now change the request to: https://staging.gitlab.com/api/v4/groups/gitlab-qa-sandbox-group?with_projects=false

The last request doesn't include runners_token

What is the current bug behavior?

A request to GET /groups/:id with with_projects=false doesn't include runners_token when made by a group admin.

What is the expected correct behavior?

A request to GET /groups/:id with with_projects=false includes runners_token when made by a group admin.

Possible fixes

Maybe move runners_token from API::Entities::GroupDetail to API::Entities::Group?

Assignee
Assign to
Time tracking