Dear Support,
I am getting 500 error for Get All users API v3 Python code.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-users-search-get
Error
{
"errorMessages": [
"Internal server error"
],
"errors": {}
Thanks,
Omantha
Hi @OmanthaPrasad - I’m unable to reproduce error. I’m making call from Postman (REST API client) and am getting response payload as expected.
Can you try from Postman or curl? My guess is that your call isn’t properly formed from Python.
Hi Nmansilla,
I can even get the result from Postman with same API key, but with the python code I am not able to get the result, do you have working python code?
Thanks,
Omantha
Hi @OmanthaPrasad
Try this out:
import http.client
conn = http.client.HTTPSConnection("<your-site>.atlassian.net")
headers = {
'authorization': "Basic <your-access-token>",
}
conn.request("GET", "/rest/api/3/users/search", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))