0

I have tried as per in the link https://docs.gitlab.com/ee/api/repository_files.html

I have got the project id. The problem is I am not sure how to give file path. when i give

http://{domain}/api/v3/projects/{id}/repository/files

, getting the error as

{
    "message": "400 (Bad request) \"file_path\" not given"
}

When I give

http://{domain}/api/v3/projects/{id}/repository/files/src/main/resources/test.xml

, then getting

404

error. My gitlab struture is

http://{domain}/namespace/{test-component}/src/main/resources/test.xml

. what is the correct way to give folder struture? where can i get the folder structure?

sub
  • 527
  • 1
  • 7
  • 24

1 Answers1

0

Based on documentation try http://{domain}/api/v3/projects/{id}/repository/files/src/main/resources? file_path=test.xml&ref=master

Shani
  • 2,433
  • 2
  • 19
  • 23