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.

390 questions
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
  • 679
  • 1
  • 7
  • 14
12
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
  • 3,672
  • 3
  • 26
  • 46
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
9
votes
1 answer

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
  • 439
  • 1
  • 3
  • 21
6
votes
2 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,345
  • 3
  • 14
  • 28
6
votes
2 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
  • 13,346
  • 11
  • 50
  • 114
6
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
  • 287
  • 3
  • 15
6
votes
2 answers

GitLab API - How to GET the repository/project files and metadata?

I am new to GitLab and using API calls and am confused on how to make a call to get the repository/project files and metadata. My current API call is as follows: https://gitlab.com/api/v3/projects?private_token=privateToken privateToken at the end…
Doug Andres
  • 243
  • 2
  • 4
  • 11
6
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
  • 1,488
  • 3
  • 14
  • 35
6
votes
1 answer

Gitlab API filter all projects by tag

I was looking through the documentation on gitlab and couldn't find a way to filter out projects by tags. I do notice that if you go to the dashboard, then "Explore Projects", then "All", at the side "tags" appears which is a dropdown menu populated…
6
votes
1 answer

Get MR related data from Gitlab API

How to: Get all commits in a particular Merge Request. Get all users who committed in a particular Merge Request. No. of lines added/deleted/updated by a particular user in a Merge Request. Can't find how to use Gitlab…
softvar
  • 16,589
  • 10
  • 48
  • 74
5
votes
1 answer

How do I retrieve all users from a GitLab deployment using the GraphQL interface?

I am trying to load user information from GitLab so that I can associate usernames with issues. When querying for issues, the assignee username is not directly available. Instead, a user ID is available. If I execute this GraphQL query using the…
Jean-Paul Calderone
  • 45,622
  • 5
  • 85
  • 111
5
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
  • 71
  • 1
  • 6
5
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
  • 8,159
  • 20
  • 61
  • 121
5
votes
3 answers

How to remove all Gitlab repository?

I have created several repositories in GitLab.Now I want to delete or remove all repository at once. How can I do this? is there any API available?
Harsh Patel
  • 4,208
  • 6
  • 24
  • 55
1
2 3
25 26