Questions tagged [gitlab-api]

The GitLab API is the api for the GitLab Community Edition.

The GitLab API is the for the GitLab Community Edition, which is hosted on github. See for more information on GitLab.

The GitLab API offers numerous access and management resources, including the most common needed for effective :

Additional API resources are available to provide a rich source control environment. Full documentation can also be found in the GitLab API github repository.

663 questions
24
votes
3 answers

GitLab: Is it possible to run pipeline on a specific runner?

Is it possible to run a pipeline on a specific runner? (not using tags) Is it feasible to use environments, or even gitlab runner exec maybe? Scenario: Have an existing project with multiple runners already attached to it (specific project token…
Rekovni
  • 6,319
  • 3
  • 39
  • 62
23
votes
1 answer

Pagination in Gitlab API only returns 100 per_page max

I am currently using GitLab API to return all projects within a group. The question I have is, how do I return all projects if there are over 100 projects in the group? The curl command I'm using is curl --header "PRIVATE-TOKEN: **********"…
Dante
  • 548
  • 1
  • 7
  • 19
14
votes
2 answers

How to remove/uninstall gitlab-runner completely from centos

My gitlab-runner service is not running no matter what I do. I used to have same problem before and when I used to update, and it used to start running but now it’s not starting at all. I have uninstalled and then again installed it’s still the…
MSA
  • 171
  • 1
  • 2
  • 7
14
votes
3 answers

Gitlab API: How to generate the private token

This is what I tried: curl http://git.ep.petrobras.com.br/api/v3/session --data-urlencode 'login=myUser&password=myPass' Answer: {"message":"401 Unauthorized"}
rodvlopes
  • 895
  • 1
  • 8
  • 18
12
votes
1 answer

GitLab API - How to get private_token using GET with session parameter?

I am using GitLab API v3 to do some operations on my private installation. Using private_token in GET URL is working fine. e.g. GET http://git.example.com/api/v3/projects?=private_token=xyz123 But in order to make this possible, you need a…
Amar Gautam
  • 131
  • 1
  • 1
  • 6
11
votes
3 answers

How to setup two PyPI indices

I have a local GitLab installation that comes with a local PyPI server to store company internal Python packages. How can I configure my PyPI to search packages in both index servers? I read about .pypirc / pip/pip.ini and found various settings but…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
11
votes
2 answers

Gitlab Trigger API returns 404

I created a trigger (using settings/ci_cd page). The instructions below the trigger tell me to call it using version 3 API (of course, I set the token variable to the token stated under the trigger section): curl -X POST \ -F token=${TOKEN} \ …
nik
  • 2,114
  • 3
  • 22
  • 43
9
votes
1 answer

gitlab api: how to retrieve userId of current user

I'd like to have a individually callable url to see issues in gitlab for a specific user. How can I retrieve the currently logged in user? https://server/folder/project/issues?scope=all&state=opened&assignee_id=
til
  • 832
  • 11
  • 27
9
votes
2 answers

Gitlab API not showing all attributes in build status of commit

I am using simple curl command as given in gitlab documents, to Post the build status to a commit . But in gitlab build status it only shows: "Pipeline #20 failed for abc....." Even when I am passing "description", "target_url" attributes. I…
TPS
  • 493
  • 1
  • 5
  • 28
8
votes
1 answer

How do I track the origin of a token in Gitlab?

Given a gitlab project/group access token, how do I find out the name of the token and from which group/project it came from?
Uri H
  • 523
  • 1
  • 3
  • 7
8
votes
2 answers

Is the CI_JOB_TOKEN really not authorized to access the registry API?

The Gitlab Documentation clearly says that CI_JOB_TOKEN is valid authorization for the container registry API. But why, then, does the following when run in an otherwise empty test pipeline yield a 403 forbidden? curl --header "JOB-TOKEN:…
Robert Jack Will
  • 10,333
  • 1
  • 21
  • 29
8
votes
2 answers

Is there a way I can recover a deleted repository on Gitlab?

I deleted a repository in Gitlab from the website, and I am trying to retrieve it, is that possible?
S.Troy
  • 117
  • 2
  • 8
8
votes
3 answers

What is a GitLab line_code as referenced when creating a new merge request thread

I'm trying to create a discussion note on a merge request on a certain line of a file with the GitLab api using this endpoint: https://docs.gitlab.com/ee/api/discussions.html#create-new-merge-request-thread Part of the payload asks for a…
brianc
  • 1,547
  • 3
  • 16
  • 30
8
votes
2 answers

Using GitLab API, how do I get a list of active users?

Gitlab-CE v8.14.3 I'm reading the GitLAB API docs, and am trying to get the list of active users. I'm an admin and created a personal token. I do this $ curl -XGET "Private-Token: kfjakjfkjkd" https://company.domain.com/api/v3/users?active=true and…
Chris F
  • 14,337
  • 30
  • 94
  • 192
7
votes
1 answer

How to get user total commit number of all repositories on GitLab?

For now I am trying this API (just randomly picked an id from a project) https://gitlab.com/api/v4/projects/3199253/repository/contributors And I find that the commit number is always 1 while it is more than 1 on the contributor page. Meanwhile,…
Terry Windwalker
  • 1,343
  • 2
  • 16
  • 36
1
2 3
44 45