Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stash REST API's

Rahul Mishra May 14, 2015

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

1 vote
Answer accepted
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2015

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

1 vote
Mark McCormack _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2015

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

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2015

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events