Python Script to List Confluence Cloud Space Admin Permissions by User with REST API -- 4
Budget: $25 – $50 CAD
I'm looking for a python script that takes the input of a Confluence user (email address or uid) and will output a list of Space Key and Space Name for each space where the user has the "administer" "space" permission. Atlassian does not offer an endpoint to make this an easy query. Alternatively write in Java if comfortable - see REST API links below for examples
The only way I can think of to achieve this would be to parse the properties of every single space. Please write in Python and utilizing API token.
The "administer space" permission should have the value of 'administer': 'space' for operation.key and operation.target.
There will be more work in the form of an additional script to add/remove a specific user permission if you complete this project successfully.
A test Confluence Cloud environment (with user setup as space admin) and API key can be provided.
Context: https://community.developer.atlassian.com/t/list-of-admins-of-a-defined-space-in-confluence-server-rest-api/24907
Example Permission Request: https://gist.github.com/nedbat/76f19e2af264e7f0bf5743fe659ed911
REST API Example Docs:
https://docs.atlassian.com/atlassian-confluence/REST/6.6.0/#space/%7BspaceKey%7D/property-get
https://developer.atlassian.com/cloud/confluence/rest/intro/
https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-wiki-rest-api-space-spacekey-get
GET /wiki/rest/api/space/{spaceKey}
The only way I can think of to achieve this would be to parse the properties of every single space. Please write in Python and utilizing API token.
The "administer space" permission should have the value of 'administer': 'space' for operation.key and operation.target.
There will be more work in the form of an additional script to add/remove a specific user permission if you complete this project successfully.
A test Confluence Cloud environment (with user setup as space admin) and API key can be provided.
Context: https://community.developer.atlassian.com/t/list-of-admins-of-a-defined-space-in-confluence-server-rest-api/24907
Example Permission Request: https://gist.github.com/nedbat/76f19e2af264e7f0bf5743fe659ed911
REST API Example Docs:
https://docs.atlassian.com/atlassian-confluence/REST/6.6.0/#space/%7BspaceKey%7D/property-get
https://developer.atlassian.com/cloud/confluence/rest/intro/
https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-wiki-rest-api-space-spacekey-get
GET /wiki/rest/api/space/{spaceKey}
Related categories:
Business, Accounting, Human Resources & Legal
Python
JSON
Atlassian Confluence
RESTful API