Gitlab API query string paramters not read

When consuming the Gitlab API via curl, only the first query string parameter (immediately after the ?) is processed. Every additional parameter (behind the & part) is simply ignored. This makes the API unusable for me as I need to get data for a specific path and a specific tag (rel). In the current situation, I can only get the latest commit from Master.

Ho can I report this bug and hopefully have somebody from Gitlab get in touch with me for a follow-up?

Hello, check this Post

Sir,I am new to GitLab.I want to integrate gitlab to a third pirty software which asks for access token url,refresh token url and authorize url.Where can I find these URL’s for Gitlab.Also what is the endpoint for making API requests.The api documentation example.com type of request doesn’t works.Do i have to replace it with something like appname.If so where to find it.Please guide me to make a simple API request successfully.I configured app.But couldn’t set up on the 3rd party software end because of the URL concern.Please help.

Same problem. I checked that post, which is about a POST. I’m struggling with a GET.

When I run the query in my application using Axios with multiple parameters in the URL (?ref=master and ?private_token=XXXXX) I get “404 Project Not Found”.

When I use a single parameter to handle the ref and move the token into the header, like this: { headers: { ‘Private-Token’: XXXX } } in my axios.get I get the following:

Failed to load http://gitlab.com/api/v4/projects/XXXX/repository/files/avro1.avsc/raw?ref=master: Response for preflight is invalid (redirect)

I realize that this appears to be a CORS issue, but I’m not sure why. All other Gitlab GETs work just fine.

When I use the Restlet rest client Chrome extension, it works WITH or WITHOUT the private token, which is really odd because the repo is private. I have no idea what to try next.

SOLVED: My url was “http” which was throwing me into a redirect. Switched it to “https” and also needed to move the private token into the header. As the OP mentioned, the second parameter in the URL seems to be a problem. Maybe I missed it in the docs??

Hi Ariel,

The post you referred to does not help me because I am trying to make a GET request. For example:
curl --header 'PRIVATE-TOKEN: {token}' --request GET https://git.hbr.clockwork.nl/api/v3/projects/{Id}/repository/tree?path=${rootSubDir}&ref=v091

In this example the path gets read but the ref is completely ignored

Hello,

Check this first please, https://docs.gitlab.com/ee/user/profile/personal_access_tokens.htmlpersonal_access_tokens

if you have any questions let me know

Hi, I’m not sure if I understood him and if it is his case, but when I have to build a url dynamically, it has happened to me that the url is cut and I must put it in quotation marks.

curl --header ‘PRIVATE-TOKEN: ${token}’ --request GET "https://git.hbr.clockwork.nl/api/v3/projects/${Id}/repository/tree?path=${rootSubDir}&ref=v091"

try add -v for more information.