Hi,
I am using a self-hosted instance of Gitlab 13.0.6.
I am trying to use the Gitlab API to fetch project information.
- project name is:
PROJNAME - project belong to:
GROUP-NAME(there is a dash in the group name) - project visibility is
internal - I use
curl --header "PRIVATE-TOKEN: API_TOKEN" "https://URL/api/v4/QUERY" | jq -C | less -Rto send REST queries. - The PRIVATE-TOKEN is a token with
APIpermissions, I am an admin of the instance.
Using: curl --header "PRIVATE-TOKEN: API_TOKEN" "https://URL/api/v4/projects/1", I do get JSON information about the project. In particular, I do get the "path_with_namespace": "GROUP-NAME/PROJNAME".
But I can’t use the namespaced path encoding to get the same JSON information (as described here https://docs.gitlab.com/ee/api/README.html#namespaced-path-encoding). I tried:
-
curl --header "PRIVATE-TOKEN: API_TOKEN" "https://URL/api/v4/projects/GROUP-NAME%2FPROJNAME"(percent encoding of the/) -
curl --header "PRIVATE-TOKEN: API_TOKEN" "https://URL/api/v4/projects/GROUP%2DNAME%2FPROJNAME"(percent encoding of the/and the-in GROUP-NAME)
What am I missing?
Thanks for your time. Best,