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

How to add multiline comments to mergerequests in gitlab via rest api?

i looked at the documentation but its hard to understand how it works. This is my current restcall: { "body": "Via Rest", "position": { "base_sha": "bcdfbfd57c8f3cd6cd65998464bb71a562d49948", "start_sha":…
Loading
  • 1,098
  • 1
  • 12
  • 25
2
votes
0 answers

Is there a way we can export gitlab merge request metrics through api of users

Using git-lab, in order to verify the users contributions, can we get individuals metrics like: total_number of merge_requests raised total_number of review comments provided for other merge_requests total_number of approvals users done so far for…
Mithun Shreevatsa
  • 3,588
  • 9
  • 50
  • 95
2
votes
1 answer

How to identify retry pipeline jobs in GitLab?

I am using GitLab CI/CD. When the jobs get failed in a pipeline i can retry them manually. Once i retry the job, is there anyway someone can identify job is retried? Particularly is there any CI variables showing job is retried.
Kiran
  • 221
  • 1
  • 2
  • 10
2
votes
0 answers

Gitlab API access project by it's old path before moving?

Using the Gitlab API I can retrieve a single project by it's path. Once I moved a project Gitab is so nice, to redirect users accessing the old URL to new projects and tell them to change their bookmarks: Unfortunately trying to access the old path…
Kound
  • 1,835
  • 1
  • 17
  • 30
2
votes
1 answer

How to use Query String in Gitlab REST API

I found Gitlab API from here GetProjectMembers It says we can use query string in API. GET /projects/:id/members/all Attribute Type Required Description query string no A query string to search for members So my question is…
B.Kingsun
  • 350
  • 3
  • 11
2
votes
1 answer

Gitlab v4 api 403 forbidden error for project.variables.list(get_all=True)

I am using Gitlab v4 api to list a project's variables, while the code returns vars for some projects, it also returns 403 forbidden response for some other projects. And the error is not very verbose so I'm confused what could be the possible…
blackPanther
  • 181
  • 1
  • 3
  • 14
2
votes
3 answers

Gitlab OAuth Refresh token expired

I have integrated a Git-Lab OAuth app in my web-app. Users authenticate this OAuth app and give access to their Git-Lab repositories through the Access Token. Once a user connects his repositories with my web-app , my web app saves the refresh token…
umer
  • 1,196
  • 1
  • 14
  • 33
2
votes
3 answers

How to create project access tokens in gitlab?

I do not find where to create a project access token in gitlab. I tried to follow the instructions here: https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html, but I do not find the settings > Access Tokens menu. Am I missing…
Antoine Collet
  • 348
  • 2
  • 14
2
votes
1 answer

Unable to connect to python-gitlab

I am attempting to use python-gitlab to create a script that automates the creation of branches. However, when I try to connect and get a specific group, I get the error: Exception has occurred: SSLError HTTPSConnectionPool(host='gitlab.X.com',…
2
votes
2 answers

How to write custom GitLab approval rules?

My team is using GitLab Premium. In the project settings, under Merge request approvals, there is an Approval rules section. In the first row, we increased the Approvals required number to 1 so that every merge request must be approved by at least…
user18184
  • 488
  • 5
  • 14
2
votes
0 answers

GitlabAPI PUT approval_rules can't update group_ids

I'm trying to update the group_ids of specific approval rule in a project using the PUT API https://gitlab.com/api/v4/projects/:proj/approval_rules/:ruleId using this call : curl -s --request PUT --header "PRIVATE-TOKEN: xxx" --data…
Yuval Simhon
  • 1,439
  • 2
  • 19
  • 34
2
votes
1 answer

Set directory of .gitlab-ci.yml via REST

Gitlab allows you to change the place it looks for the .gitlab-ci.yml file: I want to change this location via REST in all projects of a gitlab group. Although I browsed through the gitlab rest api description, I was not able to find the right…
J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
2
votes
1 answer

How get : merge_request_iid if know CI_BUILD_ID and CI_PROJECT_ID?

I want to create Job trigged by MERGE_REQUEST and exist force_remove_source_branch in true. Get info about force_remove_source_branch from api curl --header "PRIVATE-TOKEN: ${API_ACCESS_TOKEN}"…
Nikolay Baranenko
  • 1,582
  • 6
  • 35
  • 60
2
votes
2 answers

There has been a timeout failure or the job got stuck. Check your timeout limits or try again in COMPILE STAGE

I get this message and my runner is working btw. so what can be the problem here? This is the error I get From this TO THIS :( the .gitlab-ci.yml is working btw
Pie
  • 63
  • 1
  • 8
2
votes
3 answers

gitlab not expanding variable used in parallel/matrix

I am trying to pass the variable to parallel/matrix and do not see that getting expanded and the job failing. This is being set in the job from the environment variable. I am trying to echo the variable in script and see it shows the right value,…
Srinivas Boga
  • 21
  • 1
  • 4