Unable to fetch a file in a directory

Hello, I’ve been recently trying to work with the API to automate a release process. One of the steps consists in checking the content of a file in a directory. I have no issue fetching a file at the root of the project but unable to access any file if it’s in a directory.

This is the structure of the project:

project
|_ README.md
|_ roles
   |_ requirements.yml

I’m using this documentation as reference: https://docs.gitlab.com/12.10/ee/api/repository_files.html

to access the README.md file this is the request I execute
/api/v4/projects/:id/repository/files/README%2Emd?ref=master
Result: 200

to acces the requirements.yml file this is the request I execute
/api/v4/projects/:id/repository/files/roles%2Frequirements%2Eyml?ref=master
Result 404

gitlab version: 12.2.4-ee

Any idea of what I could me missing ?