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
5
votes
1 answer

Create a new project on Github/ Gitlab via Terminal

I want to add a new project on Gitlab only using the command line (bash). Is there a way or do I have to go to the Gitlab page and add the project via GUI? I explicitely don't mean to add a local repository to a remote - I know how to do this. I…
aerioeus
  • 952
  • 1
  • 8
  • 28
5
votes
1 answer

How to create a MR using GitLab API?

I am trying to create a merge request using the GitLab Merge Request API with python and the python requests package. This is a snippet of my code import requests, json MR = 'http://www.gitlab.com/api/v4/projects/317/merge_requests' id =…
Ali
  • 862
  • 2
  • 11
  • 26
4
votes
1 answer

How to create a merge request review from the GitLab api?

I'm trying to replicate the ability to add reviews to GitLab merge requests in my app and I don't see anything in the api documentation related to merge request reviews or merge request draft notes. On the web version of GitLab, when I create a…
brianc
  • 1,345
  • 3
  • 14
  • 28
4
votes
1 answer

Get artifacts of included gitlab template

I’d like to use the artifacts created by the Security/SAST.gitlab-ci.yml template in my final pipeline stage (reporting). How can I modify the Security/SAST.gitlab-ci.yml template to store the artifacts somewhere in my project dir? I tried to define…
pinas
  • 2,194
  • 3
  • 14
  • 29
4
votes
1 answer

How to get current job on runner in Gitlab

Is possible to get or track what current job is running at specific runner? For example. I have many projects and I want to tracking a runner_id=123. gitlab_api has api [url]/api/v4/runners/[runner_id] to get details of the runner=123. But the…
Mizugorou
  • 41
  • 3
4
votes
3 answers

How to get only specific fields in Gitlab API response?

For example I want to receive only project names: https://gitlab.com/api/v4/groups/:id/projects?fields=name Is that possible?
graceman9
  • 580
  • 2
  • 6
  • 18
4
votes
1 answer

Download a single file from GitLab artifacts archive

I'm running GitLab CE 11.5.0, and one of my jobs produces an artifact from which I'd like to download a single file. Downloading the complete artifacts archive as zip file works as described here: $ export TOKEN="12345678" $ export…
otto.poellath
  • 3,831
  • 6
  • 35
  • 56
4
votes
1 answer

How to fetch all data from GitLab API with Axios?

I want to fetch the data from all the projects hosted by my GitLab instance. Now I know that GitLab displays 20 projects by default, so I need to set a bigger number of instances displayed per…
avazula
  • 370
  • 5
  • 18
4
votes
4 answers

How to list a subgroup's projects using the GitLab API?

In GitLab you can create subgroups within a group and projects within those subgroups. The GitLab documentation allows you to list the subgroups of a group and the projects of a group, but I cannot find anything about listing projects of a subgroup.…
chacd
  • 81
  • 1
  • 3
4
votes
1 answer

Is it possible to install gitlab using local IP address of machine instead of domain name?

Is it possible to install Gitlab using the local IP address of the machine instead of domain name? If yes then how?
4
votes
2 answers

Retrieve users private token with Gitlab python API

I am trying to retrieve all users' private token and SSH keys with gitlab API (v4) using an admin private token in my curl requests. I can get a user SSH key by running the following command : curl --header "PRIVATE-TOKEN: my_admin_token"…
4
votes
2 answers

gitlab api Tag creation error

Hi I am trying to create a tag to a project using the gitlab api, but it keeps saying tag name not valid. I even tried using the sample in gitlab api doc. Here is my attempt: ➜ /tmp curl -X POST -d @body.json…
Pramod Setlur
  • 745
  • 1
  • 14
  • 26
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,345
  • 3
  • 14
  • 28
3
votes
1 answer

Submit Python script to Databricks JOB

Is it possible to submit/configure a spark python script (.py) file to databricks job? I have my developments happening in my Pycharm IDE, then push/commit the code to our gitlab repository. My requirement is I need to create new jobs in databricks…
Yuva
  • 1,842
  • 3
  • 17
  • 42
3
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
  • 174
  • 12
1
2
3
25 26