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

Using curl for pushing a file to GitHub repository

I want to create (push) new file on the GitHub repository without git tools, (because the git tool doesn't available on my PHP host). So I had a little research and I found GitHub REST API. I try to use curl with personal access token to upload or…
Morteza Asadi
  • 1,819
  • 2
  • 22
  • 39
5
votes
1 answer

Gitlab CI/CD: pass job environment variables to shell script

I have like this job in my gitlab ci cd configuration file: jobName: stage: dev script: - export - env - sshpass -p $SSH_PASSWORD ssh -o StrictHostKeyChecking=no $SSH_LOGIN 'bash -s' < script.sh when: manual I tried share/pass…
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
5
votes
1 answer

How to use `not` condition in the gitlab api issue query

I am trying to read the list of open issues title which doesn't have label resolved. For that I am referring the API documentation (https://docs.gitlab.com/ee/api/issues.html) which mentions NOT but I couldn't able to get the NOT to work. The…
BalaC
  • 85
  • 1
  • 7
5
votes
0 answers

Gitlab EE - Gitlab Pages setup without wildcard domain

I can't figure out how to setup Gitlab Pages on my self-hosted Gitlab instance without wildcard domains. For example, I have 1 server with 3 public IP addresses and domain names: 10.8.0.10 (git.example.com) - main GitLab instance 10.8.0.11…
5
votes
2 answers

Gitlab api v4 returns 404 on project search when using namespace/projectname instead of id

I try to use the Gitlab Workflow plugin for VS Code. Unfortunately it does not find my project. I debugged it and found that it calls https://mydomain/gitlab/api/v4/projects/mygroup%2Fmyproject and the api returns { error: "404 Project Not…
Arigion
  • 3,267
  • 31
  • 41
5
votes
2 answers

GitLab: Job artifacts in multi project pipelines

I have been trying to learn multi project pipelines for a while now, and apart from GitLab documentation, I have not found any study material. If I could see an example, it would really help. I have been using the following ci config for a multi…
Compile Commit
  • 375
  • 1
  • 5
  • 17
5
votes
1 answer

Querying the access permissions of a gitlab access token

Let's say I have a gitlab access token (generated and given to an application by a user). I can find if that token can be used to read from a repository by actually trying to read some data and seeing if that operation succeeds. How do I find…
saga
  • 1,933
  • 2
  • 17
  • 44
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
  • 1,348
  • 1
  • 16
  • 41
5
votes
0 answers

GitLab API Token is not visibile in Jenkins Credentials

After getting the private token from GitLab and trying to create credentials in Jenkins. The newly created credential is not visible in the dropdown. Creating the credential No Credentials are visible when opening the dropdown I am on Jenkins ver.…
Mohammad Haidar
  • 1,109
  • 1
  • 16
  • 35
4
votes
2 answers

How can I get all the branches of a project using Gitlab API?

Trying to get all the branches under a project using GitLab API, but I can see only 20 branches are returned. How can I get the complete list of all the branches? I am using the following API. curl --header "PRIVATE-TOKEN: "…
Ashish Pratap
  • 439
  • 5
  • 21
4
votes
2 answers

Gitlab CI/CD: generating a release with executable attached

I'm trying to generate a release with the executable through the ci/cd pipeline system that Gitlab uses. The aim is to use the executable as part of the release in another project to generate Visual Studio Code Snippets as part of that projects…
Jip W.
  • 43
  • 1
  • 5
4
votes
3 answers

GitLab Release Links API: 404 project not found

I'm trying to add an asset to a GitLab release but I keep getting {"message":"404 Project Not Found"} when trying to add a link. I was trying to follow https://docs.gitlab.com/13.7/ee/api/releases/links.html#create-a-link, but I am either crazy or…
boring10
  • 83
  • 2
  • 7
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,547
  • 3
  • 16
  • 30
4
votes
2 answers

GitLab API - search project

I'm using: GET https://localhost/api/v4/search?scope=projects&search=test to find project named "test" , but I get not only project named "test" but "qtest", "testot" or "test1" too. Is it possible to get only exact name?
simoN
  • 65
  • 2
  • 12
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,708
  • 4
  • 21
  • 33
1 2
3
44 45