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
3
votes
2 answers

GiLab - is it possible to get job id of the project which was executed 4 days ago through GitLab API

we have scheduled pipeline executed once every day. With this setup, i would like to know if its possible to get job id[successful] of the project which was executed 4 days ago through GitLab API
sathiya
  • 279
  • 1
  • 5
  • 17
3
votes
2 answers

How to list all the project variables in a gitlab project via GitLab V4 api

I'd like to list all the project variables in a gitlab project. I have followed their official documentation but seems like I couldn't get it to work. Below is my code: import gitlab, os # authenticate gl = gitlab.Gitlab('https://gitlab.com/',…
blackPanther
  • 181
  • 1
  • 3
  • 14
3
votes
1 answer

how to export all projects inside a group in gitlab

we are migrating from self hosted gitlab to gitlab.com subscription. We have parent 28 group and under these groups there are multiple subgroups and projects. I know I can export one group and it will export all the subgroups under it and then I can…
Aman35
  • 39
  • 1
  • 5
3
votes
1 answer

Use setuptools to Install a Python package from a private Gitlab package repository

I created a private package for my employer. Since I’m forbidden to upload it to PyPI (it’s proprietary), I uploaded it to the packages index for my project on our private Gitlab hub. I can install it manually with: $ pip install my-package…
Lawrence I. Siden
  • 9,191
  • 10
  • 43
  • 56
3
votes
1 answer

How to list public groups of a user in Gitlab?

I want all the public groups of a particular user in gitlab. Is there any API or any other way to achieve it. https://gitlab.com/api/v4/groups If I use this API without providing any authentication token, it gives me all the public groups in GITLAB.…
aman
  • 33
  • 6
3
votes
2 answers

Batch import repositories to gitlab (self-hosted)

I have about 50 git repositories that I want to import into a GitLab instance. They are not in GitHub/GitLab/whatever, but just sitting on my hard disk as a result of a SVN git conversion. What would be a good way to import them all? I am thinking…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
3
votes
1 answer

GitLab Self Hosted: Check plan from API

I want to check if I have access to premium features (such as group hooks) for my GitLab instance (self hosted) from the API. What endpoint should I call? Notes: I thought of checking the version and see if it is ending with -ee for Enterprise…
Martin Faucheux
  • 884
  • 9
  • 26
3
votes
1 answer

How to use REST API to create a file in GitLab and if a file with the same name existed, overwrite the old file

How to use REST API to create a file in GitLab and if a file with the same name existed, overwrite the old file. Does the "create" action automatically does this for me? https://docs.gitlab.com/ee/api/commits.html E.g. I wanna upload XXX/YYY/A.txt,…
user3489985
  • 327
  • 4
  • 18
3
votes
1 answer

GitlabParsingError when accessing a project with GitLab API with Python

I try to access a project on a private GitLab instance (please take a look at the screenshot for the version numbers) by using the python-gitlab module. I have created an access token with all permissions over the web UI of the GitLab repository…
Kampi
  • 1,798
  • 18
  • 26
3
votes
1 answer

Getting pipeline ID after triggering that pipeline in Gitlab

I use Gitlab CI/CD for deploying my projects. I use Gitlab REST API for manipulating with pipelines. For starting pipeline I can use this endpoint: POST /projects/:id/trigger/pipeline response for that request something like this: { "ref":…
tikurilla
  • 31
  • 1
  • 4
3
votes
0 answers

GitLab merge request API + merge_status

We're trying to use the GitLab API to automate the merge request lifecycle based on the movement of Jira tickets. Using the /merge_requests endpoint, I can see the merge_status field which seems to contain one of the following values: unchecked,…
Daniel Becroft
  • 716
  • 3
  • 19
3
votes
0 answers

How to query if a GitLab merge request supports multiple reviewers?

GitLab's documentations say that a merge request can be updated to add one or more reviewers via the reviewer_ids property: https://docs.gitlab.com/ee/api/merge_requests.html#update-mr What seems strange to me is that certain projects or merge…
brianc
  • 1,547
  • 3
  • 16
  • 30
3
votes
1 answer

Gitlab API endpoint to find all issues that contains a specific label

I am triying to retrieve all issues in a Gitlab instance that contains a specific label. I only able to retrieve those issues that have only one label but my issues have two or three labels more. Have anybody found a solution for this?
Daniel Carroza
  • 310
  • 1
  • 8
3
votes
2 answers

How do I get all files (paths) of a specific commit from gitlab api?

I want to load the file contents from the gitlab api using a specific tag. This can be achieved by using the blob for each file (https://docs.gitlab.com/ee/api/repository_files.html). The problem I am facing is that I do not see the way to find out…
Markus
  • 2,214
  • 3
  • 19
  • 32
3
votes
2 answers

GitHub/GitLab REST API - Get diff between two branches

We want to get a difference between two GitLab/GitHub branches through REST API. We saw Git supports a command to do that but it seems they don't support for REST API. Is there any API support for this? git diff --name-status…
TonyTran
  • 87
  • 2
  • 11