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

How to get the public snippets of a project without authentication?

I can browse the public snippets of a project without authenticating, for example: https://gitlab.com/Boiethios/someproject/snippets. I thus expect to access this information through a public API. However, the V4 API does not allow to do so: GET…
Boiethios
  • 38,438
  • 19
  • 134
  • 183
0
votes
1 answer

Changing installation directory of GitLab

I am trying to install Gitlab (Community Edition) on Linux CentOS. According to my knowledge, the configuration files are stored in etc/config and the data are stored in /var/opt/Gitlab. But I want to change it to a custom directory. Is it possible…
enamul17
  • 159
  • 2
  • 3
  • 14
0
votes
4 answers

Gitlab API to upload whole project from local file system

I need to upload using API whole project folder which contains multiple text files, image files, source files, etc. I had gone through Gitlab Commits and upload API's but none of them matches requirement. Is there any API to upload full project…
Vishwanath.M
  • 6,235
  • 11
  • 42
  • 56
0
votes
1 answer

Add artifact to repository in gitlab-ci.yml

I have a multi-project pipeline. Project B depends on Project A. Inside Project B pipeline I am able to get my desired artifacts. Problem is that I am in the Runner's directory, The root path is CI_PROJECT_DIR, something like…
Kyle
  • 695
  • 6
  • 24
0
votes
1 answer

Gitlab: List all changed files in a MR via API

How do I list all the changed files in a MR via Gitlab API? I'm working in a CI project and just want to build the necessary code!
Taison Morris
  • 878
  • 1
  • 8
  • 12
0
votes
1 answer

Merge Request Approval API Authentication

I'd like to get the state of a merge request approval via the gitlab API with GET /projects/:id/merge_requests/:merge_request_iid/approval_state This call needs a account based access token with api level permissions (read/write on everything).…
hottehead
  • 43
  • 7
0
votes
1 answer

Gitlab - how to allow multi project pipelines to create a branch in trigger repo

I have a repo A(upstream) and a repo B(downstream). After some jobs complete in repo A; I want to trigger some jobs in repo B. I was able to achieve that. trigger_repo_B: stage: trigger_repo_B trigger: project: test/repo_B What I havent…
LateNightDev
  • 185
  • 1
  • 2
  • 10
0
votes
1 answer

GITLAB : cannot create a Group using the API as root

I am trying to create a group using Gitlab CE 12.4.3 The api token is the one generated by the admin account in Gitlab. SO this account has the permission to create groups curl --header "PRIVATE-TOKEN: 6czXYzu1j7dD16PqtiZw" -d …
iclman
  • 1,218
  • 9
  • 21
0
votes
1 answer

gitlab nodejs api - retrieve all repositories for user

I cannot figure out the way how to simply retrieve all repositories for my user on gitlab. I'm trying to use this npm package: https://www.npmjs.com/package/gitlab So for gitlab: Repositories=Projects Here is how I try to use the gitlab…
Lenny
  • 157
  • 1
  • 13
0
votes
2 answers

GitlabCI : trigger pipeline

I have 2 pipelines on gitlab CI, and i want to add a dependency on them. That is, when the first pipeline completes without errors, execute the other. Pipeline 1 : unit test, lint + build Pipeline 2: run automated tests About pipeline 2: needs to…
Ricardo Daniel
  • 421
  • 7
  • 15
0
votes
2 answers

How to Get GitLab users custom attributes using the API

Trying to show the custom attributes (mainly the location field ) for some public GitLab users. but it's not working I am using python gitlab library to get the list. and I can print the user names, ids and url. Now I want to access the custom…
Ahmad saleh
  • 103
  • 3
0
votes
1 answer

How to get the list of files associated with a merge request using python-gitlab

I am intending to make a bot that will make some automated merge request comments based off of the files associated with the merge request. Is there any easy way to do this? I stumbled upon a library called python-gitlab that seems helpful but am…
0
votes
1 answer

Prevent progression of pipeline if tag of specified repository is lesser than specified number

I have 2 repositories A & B on gitlab and I make changes on both repositories and tag both of them too. Can I ensure that repository A's pipeline does not run the last build in its pipeline if the specified tag in Repository B's pipeline has not…
masterforker
  • 2,443
  • 2
  • 25
  • 39
0
votes
1 answer

IS there any way to know total number of pipelines in Gitlab without using the API?

I am trying to decide which Gitlab tier to move to. I have an almost 3 years old Gitlab-ce. I want to test whether I need 2000 CI pipeline minutes or 10000 (Bronze and Silver tiers). What I learned so far, is that it needs some scripting along with…
Badr
  • 694
  • 1
  • 7
  • 26
0
votes
0 answers

How to create gitlab project from command line

I have a project in that I create github repo using curl like below #!/bin/bash # Create new github repo from the command line. # Gather constant vars # usage=> ./create.sh "name" "account" "token" GITHUBUSER=$2 TOKEN=$3 NAME=$1 DESC="Blog of…
Hfyuu
  • 199
  • 1
  • 3
  • 11