API returns 404 for projects with dots on the name
ZD Reference https://gitlab.zendesk.com/agent/tickets/28028
GitLab Version
8.7.4 CE
Summary
If you create a project, with certain characters in its name, then the API to "Get" the project doesn't work right. I am aware that NAMESPACE/PROJECT_NAME must be urlencoded, as described here:
http://docs.gitlab.com/ce/api/projects.html#get-single-project
To recreate the problem, create a project with .
characters in its name. project.example.com
When you Urlencode, the "." characters remain unchanged.
projectid=
url encode $namespace/$projectname
foobarnamespace%2Fproject.example.com
And then when you try to get the project by doing a GET
on this URL:
http://gitlabserver/api/v3/projects/foobarnamespace%2Fproject.example.com
You get 404 Project Not Found
.
I discovered that the API returns a result, if you know either the numeric project ID, or the modified project name project-example-com
, but normally you don't know either of those pieces of information until you complete this GET
request using the actual string project name (with dots).