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 remove old archive jobs in chef?

I am trying to clean up my gitlab server running v12.x something. I wrote a python script to query the api for the gitlab server and i send a request I get a 201 response code. I used the official docs (https://docs.gitlab.com/ee/api/jobs.html) But…
Mr. E
  • 457
  • 1
  • 5
  • 20
0
votes
3 answers

How to erase job via gitlab api

I have an issue were I am the owner of a project on a gitlab server, and I can successfully delete all artifacts for a job as listed in the docs.. curl --request DELETE --header "PRIVATE-TOKEN: "…
Mr. E
  • 457
  • 1
  • 5
  • 20
0
votes
1 answer

importing a group to gitlabvia API

I am in the process of figuring out how to best migrate some projects from one instance of gitlab (let's call it gitlab.A.com) to another instance (call that one gitlab.B.com). Both are Gitlab Enterprise Edition 12.10.3-ee. I would like to first…
0
votes
1 answer

gitlab4j - create a commit to branch from Java

I am using gitlab4j API to access my GitLab Repository. I want to commit a text file from my local system to specific branch. How do I achieve this via gitlab4j API?
code-geek
  • 441
  • 1
  • 8
  • 22
0
votes
1 answer

Building services for Gitlab

How to create my own service and add it into gitlab? Services like jira, jenkins are present under integrations in Gitlab. How can I create a service to add it under gitlab Integrations and make it useful for every one's use?
dinolin
  • 78
  • 9
0
votes
1 answer

Clone project withing the same group, and use source project's .gitlab-ci.yml as a template in target project

There is a group that hosts 00_Parent_Project: the source project containing e.g. .gitlab-ci.yml template: Group [project] 00_Parent_Project [repo] .gitlab-ci.yml How, using GitLab API, can I clone the source project, so that the target…
AbreQueVoy
  • 1,748
  • 8
  • 31
  • 52
0
votes
0 answers

Gitlab: project not found when trying to get pipelines

I want to get pipelines of a project using this GET request: https://my-company.com/api/v4/projects/2080/pipelines The response is: { "message": "404 Project Not Found" } Although the project exists and I definitely use the correct project…
IKo
  • 4,998
  • 8
  • 34
  • 54
0
votes
1 answer

Hook execution failed: Failed to open TCP connection to ::1:8000 (Connection refused - connect(2) for "::1" port 8000)

I need to integrate pivotal tracker manually because I want some extra options, but I'm getting a "failed to open TCP connection" error. I'm working from localhost and gitlab is in an intranet. I've tried both the example in ruby in the docs and a…
0
votes
1 answer

How to read all files with different extensions from git repository?

How to read all the files with a different extension (say .txt, .yml, etc) from the GitLab repository? I'm using GitLabApi and below is the code that I have done so far. This is basically fetching a single file. public class GitLabRepoService { …
Akhil Suseelan
  • 217
  • 1
  • 5
  • 25
0
votes
1 answer

Creating a new GitLab issue and assigning a label to it automatically

I am working on designing webpage UI where some experimental data is stored. This data could be inaccurate sometimes so I'm providing a button at the bottom of the page which redirects the user to the new issue webpage in GitLab. Look at the sample…
betelgeuse
  • 1,136
  • 3
  • 13
  • 25
0
votes
1 answer

Filter gitlab commits by branch and message - gitlab API

I am writing application which consume gitlab api. for that i want to search / filter commits by both branch and commit message. But Gitlab support two endpoints which are Search : /api/v4/projects/24/search?scope=commits&search=fixed this will…
Chamly Idunil
  • 1,848
  • 1
  • 18
  • 33
0
votes
1 answer

Is their an inbuilt method directly available to search a gitlab repo through it's name using python-gitlab

I am using python-gitlab which is a python wrapper for the original Gitlab API. I am actually using it to create scripts to access and modify gitlab projects. I came across a constraint while working with it, which is to mention the project id as…
Saurav Saha
  • 745
  • 1
  • 11
  • 30
0
votes
1 answer

How can I extract contents from a file stored in gitlab repos

Using the gitlab-python package, I'd like to extract lines from all Dockerfiles. Using my code below, I am able to get project names and url to the repo I want but how can I ensure there is a Dockerfile and read the contents of the Dockerfile.…
py_noob
  • 433
  • 2
  • 8
  • 17
0
votes
1 answer

Is it possible to push to Gitlab with the Python API?

I am just messing around, but I have a blank project in Gitlab. I have a Python script (well, ipython notebook). I would like the Python script to simply push any files in "C:/users/files" to the Gitlab project. I cannot find any instruction on how…
Simon Kiely
  • 5,880
  • 28
  • 94
  • 180
0
votes
1 answer

Gitlab run job either by trigger or changes

I am trying to trigger a particular job in CI after either of the 2 conditions trigger by another job in the same pipeline OR changes: somefile.txt My CI is as described job1: stage: build script: - echo "JOb1" - curl -X POST -F…