I need to setup some environment variables and queue the last successful version for deployment using a python script.
I'm doing something like this to get the last deployed versionId:
url = f"{base_url}/rest/api/latest/deploy/environment/{environment_id}/results"headers = {"Accept": "application/json"}response = requests.request("GET", url, auth=(username, password), headers=headers)
response = json.loads(response.text)
return response["results"][0]["deploymentVersion"]["id"]This was working fine until 2 days ago. Suddenly from yesterday, I'm getting a 401 Unauthorized error.
I'm getting this page when I try the same via Insomnia

The interesting thing is, I'm able to do all the actions from the UI and using curl with the same credentials. Any idea what I'm missing?