Stash REST API's

Hi,

I am looking for Stash REST API's which allow me to tweak project permissions to enable public access and raise the default permission level for the project from 'no access' to 'read' .

From the documentation, i don't see any or may be i am missing it

I am basically trying to say that all authenticated users should be able to browse all repositories even though their groups haven't been explicitly mapped for that project or repository

Is there an alternate way to do it globally without having this to configure for every project ? 

Regards,

Rahul


 

 

2 answers

1 accepted

This widget could not be displayed.

Hello Rahul, 

there is a REST Endpoint for what you are trying to do. Check out the docs here.
For your case I believe you would want to POST to

/rest/api/1.0/projects/{projectKey}/permissions/PROJECT_READ/all?allow=true

This would grant all users read access to the project with the key you specify in the REST url.

I hope that helps, 

Felix

This widget could not be displayed.

Rahul,

There has just been a brand new Stash Add-on released to the Marketplace which helps a lot with updating all of your projects or repositories in bulk with just one script. You can find the relevant section in our documentation here:

https://scriptrunner.adaptavist.com/stash/latest/docs/script_console/#bulk-project-permissions-update

You can also set project and repository defaults for all future creations as they happen based on the project create or repository create event. You can find the relevant section related to setting default permissions for projects and repositories in our documentation:

https://scriptrunner.adaptavist.com/stash/latest/docs/event_handlers/#default-project-repository-permissions

Feel free to take a look, it's called ScriptRunner for Stash and in the Marketplace now.

You can get an overview of both of these Administration features by watching this Admin video:

https://www.youtube.com/watch?v=iRnD00EPmQE

Your answer is not pertinent. The question was about the REST API.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

249 views 14 2
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you