Problem with access file inside subdirectory

Summary

First of all, English is not my native language, so apologize for all mistakes and grahama.

I have problem with getting file by GitlabApi from subfolders

Steps to reproduce

According to

https://docs.gitlab.com/ee/api/repository_files.html

to get file from repo i need to execute curl request with parameters like this

curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/project_id/repository/files/file_path?ref=master'

I create project with simple readme.md and second instance of this file in subfolder 'generic' When i execute curl like this

curl --request GET --header 'PRIVATE-TOKEN: token' 'https://gitlab.com/api/v4/projects/14060645/repository/files/readme.md?ref=master'

the response looks like { "file_name":"readme.md", "file_path":"readme.md", "size":6, "encoding":"base64", "content_sha256":"711a6108ba2ce6ca93dd47d6817f2361db10d8ab6eec89460b2dfc2c325efabe", "ref":"master", "blob_id":"ea786ff2cf69cdc0e487ad1cea3b8bd361eb66a3", "commit_id":"b93dff7fefec786dc4073a4f03b08ab5a307b055", "last_commit_id":"cca2b018a8700bd08109252c7ae3e61ad7259dea", "content":"cmVhZG1l"}

But when i try to get file from subsystem by execute curl --request GET --header 'PRIVATE-TOKEN: token' 'https://gitlab.com/api/v4/projects/14060645/repository/files/generic/readme.md?ref=master'

i've got 404 response code

Example Project

Here is url to this project https://gitlab.com/nerka.pawel/gitlabapitest. Project is set as public

What is the current bug behavior?

Return 404 when try to get access to file inside subsystem

What is the expected correct behavior?

The same response as from root instance of readme.md

Edited Sep 13, 2019 by Mark Fletcher
Assignee Loading
Time tracking Loading