I have problems getting requests.put working on the api in Python. The same way of authentication that works with GET and POST do not work with PUT. I want to make calls to this:
PUT /cases/{caseSystemId}/ongoingScreening
I have the following things defined in my .env file:
REFINITIV_API_ENDPOINT = https://rms-world-check-one-api-pilot.thomsonreuters.com REFINITIV_API_KEY = abc111 REFINITIV_API_SECRET = abc222 REFINITIV_PRODUCT_KEY = abc333 REFINITIV_GROUP_ID = abc444
How do I use this to make PUT calls in Python using the requests library? We are using Python 3.8.5. I am running Debian WSL on Windows 10. Everything I tried so far gives me the HTTP401 error. I know the keys work because GET and POST on other endpoints work with them.
https://rms-world-check-one-api-pilot.thomsonreuters.com/v2/cases/{case_system_id}/ongoingScreening PUT headers = { "Date": "Tue, 16 Feb 2021 13:28:15 GMT", "Authorization": "Signature keyId=\"CENCORED1\",algorithm=\"hmac-sha256\",headers=\"(request-target) host date\",signature=\"CENCORED2=\"" } result.status_code = 401 result.headers = {'Strict-Transport-Security': 'max-age=15552000, includeSubdomains', 'Authorization': 'WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"', 'Transfer-Encoding': 'chunked', 'Date': 'Tue, 16 Feb 2021 13:31:55 GMT', 'Server': '""'}