import requests import re portal_url = "https://gi-deployment-portal.cmd.navi-tech.in" s = requests.Session() # tbd: replace it with token cookie = "" x_xsrf_token = "" s.headers.update({'cookie': cookie, 'x-xsrf-token': x_xsrf_token}) list_manifest_path = "/api/manifest/list" individual_manifest_path = "/api/manifest/" r = s.get(portal_url + list_manifest_path) manifest_list = r.json() for manifest in manifest_list: # Get each manifest r = s.get(portal_url + individual_manifest_path + str(manifest['id'])) manifest = r.json() if 'deployment' in manifest and 'healthChecks' in manifest['deployment'] and 'startupProbeEnabled' in manifest['deployment']['healthChecks']: print(manifest['id'], end='\t') print(manifest['deployment']['healthChecks']['startupProbeEnabled']) # print(manifest['id']) # manifest['deployment']['healthChecks']['startupProbeEnabled']=False # r = s.post(portal_url + update_manifest_path, json=manifest) # print(r)