Hi!
I am building a script to bulk-handle the deprovisioning from our company Jira platform (using Python and REST API).
Using the 'Delete User' API from the REST API library I receive an error to say 'the user cannot be deleted as they have created issues and their records would be lots etc etc'
When I use the 'disable user' option from the User Management API, which I'm told requires the same level of access (Site admin privliges and an API token), I receive "{"code":401,"message":"Unauthorized"}"
I think it's just this bit i need to get working so was hoping someone could take a look at the code I'm using and let me know if there's something I'm missing here?
my code for the 'Deactivate User' API call:
@Michael Savedra just for clarity.. can you make successful calls to the GET (read) methods, such as Get Profile or Get API Tokens with your access token in the Authorization: Bearer xyz format?
Hi Neil,
Yes unfortunately it's the same story when I use the the api for Get Profile:
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.
@Michael Savedra with those same credentials, can you perform the API call using a REST client (ex: Postman, Insomnia, etc.) successfully? This can help us get closer to understanding if this is a credentials issue or a Python/code problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Neil Mansilla I'm able to to succfully execute the JIRA REST API on any commands from the main library.
Do you have a link to an example for the postman/insomnia stuff so I could give that a go as well?
Could it be that i'd need to be an Org Admin rather than Site Admin?
Cheers,
Michael
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.