Hello everyone,

 I want to access the files inside a project hosted in gitlab ce server 
with a rest api call. 

I used the below api 
 *http://<gitlab server>/api/v3/projects/<project 
id>/repository/tree?private_token=<token id>*

which returns me the project with the immediate children.

for example if the project structure is  A 
                                                        |__ Readme.md       
, it returns Readme.md..project and src.
                                                        |__ .project
                                                        |__ src
                                                               |__ myfile

As per the Gitlab api documentation if the file path is specified in the 
above query it should return the subfolders but I always get 404 error.

I tried below combinations,

    *http://<gitlab server>/api/v3/projects/<project 
id>/repository/tree?private_token=<token id>&file_path=path*

     *http://<gitlab server>/api/v3/projects/<project 
id>**&file_path=path**/repository/tree?private_token=<token 
id>*

    *http://<gitlab server>/api/v3/projects/<project id>**/repository/tree*
*&file_path=path**?private_token=<token id>*

But it always returns 404. Can anyone suggest the right way to get the 
files inside a gitlab project.

Thanks
Santhosh


                                                                

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/97dc52d2-c4e1-4d0b-b5d7-c9b0653e539e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to