Perhaps you could use Selenium. It will handle the session, the cookies, JS and you can interact with any part of the webpage.
Before that try to read the JSON file and deserialize it.
Before that try to read the JSON file and deserialize it.
import json url_cmdb_test = "http://idcsrv190/cmdb/api2/ci" user,password = get_name_and_password( credential_file_name ) report_json_to_file = os.path.normpath(os.path.join(os.getcwd(),"test-ci_2.json")) file_json_test = open(report_json_to_file, "r", encoding="utf-8").read() data = json.loads(file_json_test) # here you turn the json into a python dictionary headers = {"Content-Type" : "application/json;charset=utf-8"} ret = requests.post(url=url_cmdb_test, data=data, headers=headers, auth=requests.auth.HTTPBasicAuth( user, password ), verify=False) # data=data print(str(ret.status_code)) print(str(ret.text))