How to get files from multiple path using wild card i n API

siva2221 November 19, 2017

Hi Guys,

I have many folders starting with name "dynamic".I need to get files from all folders which has name as "dynamic"

Example:

Folder 1 - dynamic_xyz

Folder 2 - dynamic_abc

Folder 3- dynamic_fgc

I need to get files from all the folders using BitBucket API 

 

I tried below API but doesn't work,

https://abc.com/rest/api/1.0/projects/repos/repo_slug/files?path=%Dynamic_%

                 It gives me error.

 

Can anyone help on this

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 8, 2017

 

 

Hi Sivanandam, have you checked this documentation?  

Looks like it should be possible but the path parameter may need to be absolute:

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/files/{path:.*}

You can use wildcard in the file part, not the path.

If you try with this and keep getting errors, please send us a screenshot of them as it might help identify what's going wrong. 

Regards,

Ana

mzhydenko January 9, 2019

Hi @Ana Retamal could you please also help me with my question? which is how can I use the wildcard in another case like  confluence/rest/api/user?username=* . What I need is to get the list of all users in the confluence and get some info about them

Any help would be really appreciated.

Thank you in advance!

mzhydenko January 9, 2019

in fact, if I`m using the query I typed (confluence/rest/api/user?username=*), I get the error 

No user found with key : null

does it mean that the key attribute is a must?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events