It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Dec 08, 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

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!

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
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

1,091 views 3 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you