Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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
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
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:
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:
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your answer is not pertinent. The question was about the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.