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

Extract and write gitlab pipeline ID in gatling log

I am new to both GITLAB and GATLING. I am trying to implement shift-left performance testing as part of CI/CD pipeline using the mentioned tool. Although I am very proficient with Jenkins and Jmeter. I am trying to write Gitlab Pipeline ID to…
0
votes
1 answer

Deploy code from gitlab on ec2 WITHOUT.gitlab-ci.yml file

I am using gitlab as repository and want to push my code on ec2 whenever any commit is done on gitlab. The gitlab CD/CI documentation states that I have to add a file .gitlab-ci.yml at the root directory of my repo. This is actually a problem for…
0
votes
1 answer

Gitlab API - Getting 401 unauthorized when trying to access api with private access token

I am trying to call Gitlab API from my AngularJS code as below $http.get("https://git.company.com/api/v4/projects?private_token=xxx"); I generated the PAT from my organization's gitlab user settings. I tried the curl command and still getting 401.…
niruj
  • 125
  • 2
  • 9
0
votes
1 answer

git describe in html format (inside gitlab-ci)

Using Gitlab API, during the CI, I create a release with a curl command: # create a release - >- curl --request POST -H "PRIVATE-TOKEN: ${GITLABAPI_TOKEN}" -H 'Content-Type: application/json' --data…
Tyvain
  • 2,640
  • 6
  • 36
  • 70
0
votes
1 answer

Getting {"message":"404 Project Not Found"} response while making request through nonauthorized browser window

I am getting expected response while doing HTTP get a request through an authorized browser window, but I receiving 404 - project not found response while trying to do the same HTTP request from the private browser window or browser window that is…
0
votes
1 answer

How to retrieve raw file content from a repository commit with gitlab api?

We can get list of repository commits by: GET /projects/:id/repository/commits?path=:thefilename We can get raw file content by blob id: GET /projects/:id/repository/blobs/:sha/raw However, the first api doesn't return blob id of each repository…
Sum NL
  • 1,055
  • 2
  • 12
  • 21
0
votes
0 answers

GitLab CI/CD runner not able to access dynamic file paths in nodejs

I am running my nodejs code in the pipeline in Gitlab CI/CD. Gitlab is only able to find Hardcoded paths from my git repositories. Here's an example var…
kiran shinde
  • 51
  • 1
  • 4
0
votes
0 answers

How to get ''git show-branch" from Gitlab API?

I'm looking after a way to get the equivalent of git show-branch from Gitlab API, in order to avoid of checkouting my repos when I don't need sources, but branch history... The functionnality does not seems to exist, do you know a way to get around…
Fractaliste
  • 5,777
  • 11
  • 42
  • 86
0
votes
1 answer

How can I see all the opened merge requests in GitLab using a command?

Is there a git command that can show all the opened merge requests for a repository? I've found how I can see all the branches that were merged into master using: git log --merges --first-parent master \ --pretty=format:"%h %<(10,trunc)%aN…
0
votes
1 answer

How to fail Gitlab pipeline that calls another pipeline via API?

I have 2 Gitlab repos: Project A Integration tests for Project A I want to stop the pipeline / build of Project A if the integration tests fail but currently the Project A pipeline passes even if the integration tests fail. My .gitlab-ci.yml for…
0
votes
1 answer

Gitlab API Update existing file in repository giving 400 error in rest template

I am trying to edit existing file in a repo using gitlab v4 api, When I tried to edit file using postman rest client it executes without any issue, 200 status returned. When I tried the same with SpringBoot RestTemplate, I am always ending up with…
Nithyananth
  • 74
  • 10
0
votes
1 answer

Recursive HTTP-requests in Scala

I need to do recursive requests and then collect all models into one List, but not understand how to do it. Please tell me am I thinking right way? package kindSir.main import dispatch.Defaults._ import dispatch._ import kindSir.models._ import…
0
votes
1 answer

How to access the folder of a project directly in gitlab?

I have tried as per in the link https://docs.gitlab.com/ee/api/repository_files.html I have got the project id. The problem is I am not sure how to give file path. when i give http://{domain}/api/v3/projects/{id}/repository/files , getting the…
sub
  • 527
  • 1
  • 7
  • 24
0
votes
1 answer

Why GitLab api Compare is different from git diff?

When comparing two branches from GitLab repository, using gitlab api: GET /projects/:id/repository/compare?from=master&to=feature I get different from git diff --name-only results - more files than expected. Seems like gitlab's compare…
MRed
  • 15
  • 1
  • 7
0
votes
0 answers

Interact with API to get user info after authentication

I authenticated the REST server and got a token in the cookies. This token allowed access to the REST server, but I want to interact with the authentication service. Github responses with that message { "message": "Bad credentials", …