Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Pierangelo Repetti
Contributor
June 16, 2021

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

0 votes
Sunny Ape
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 16, 2021

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.

Pierangelo Repetti
Contributor
June 17, 2021

Hello @Sunny Ape ,

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

Sunny Ape
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 17, 2021

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.

Pierangelo Repetti
Contributor
June 17, 2021

Hi @Sunny Ape 

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

Sunny Ape
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 17, 2021

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.

Pierangelo Repetti
Contributor
June 18, 2021

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

Like Baby Store likes this
Pierangelo Repetti
Contributor
June 21, 2021

The JIRA Support team filed a bug to the Developers

https://jira.atlassian.com/browse/CLOUD-11217CLOUD-11217

Like Sunny Ape likes this

Suggest an answer

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

Atlassian Community Events