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

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

Get next-gen access type (public, private) by REST calls

Hello,

 

I need a way to query whether a next-gen project has either public or limited access type, by means of the REST API.

I implemented a Python script but results are unclear. The returned "inPrivate" field is not consistent with the actual project data.

Some community posts say that property just tells you whether you have permission to browse issues in the project

Documentation here, though, says (click on the Project link just above the sample response).

isPrivate

boolean

Whether the project is private.

 

 

Which is right ?

And above all, how can I get that information by REST calls ?

Thanks

1 answer

Hello @Pierangelo Repetti 

The Atlassian v3 REST API documentation about the isPrivate field is correct.

You can easily confirm this by creating a new Next-Gen project that does not have private permissions and that field will return a false value. Then, if you create a Next-Gen project that does have private permissions, that field will return a true value.

Hello @David Bakkers ,

I am afraid this is not what I am getting, and that's why I wrote this post in the first place.

The isPrivate field is returning False for a next-gen project I created and I am managing. I am positive it has private access,

private_access.jpg

I should be getting True instead, if documentation is correct as you say. Or might we be meaning different things for "private permissions" ?

Thanks

Pierangelo

Sorry @Pierangelo Repetti , I take it back, I was wrong.

The documentation is a bit misleading; the isPrivate field does not tell you if the Next-Gen project is a 'private' , 'open' or 'limited' type, it just tells if you, personally, have access to that project.

There doesn't seem to be a way to read or set a Next-Gen project's security / permissions type via the REST API at the moment. There is this feature request that discusses that, and this feature request requesting the ability to set / read that via the REST API.

Looks like you're out of luck until those features are added.

Hi @David Bakkers 

thanks for clarifying.

Something is not quite correct anyway, because inPrivate for the project I mentioned earlier is returning false though I do have access to it.

I have just opened a support case.

Thanks again,

Pierangelo

The more I read the documentation and the comments made in other discussions, the more vague and contradictory the purpose of that isPrivate field seems to be. I wouldn't be surprised if the field reported on a value for a Jira project security configuration from an older version of Jira and that configuration is no longer in use, or was only for the server version.

Maybe it's a remnant from the prior version of the REST API and someone hasn't removed that field from the endpoint's response, and all it can do now is endlessly report false, since the source of what it is reporting on no longer exists?

Also, it seems that for Next-Gen projects, the field responsible for reporting or setting the project's security is 'accessLevel', as per this thread, which describes a backdoor way of changing it.

It will be interesting to hear what Atlassian say the purpose of the isPrivate field is and under what circumstances it will report true.

I'll post here what the Support will say about this.

Like David Bakkers likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

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