Rose_Bai | 2022-11-11 00:39:21 UTC | #1
[Importing a new schedule using Java]
I'm trying to import new schedules via Genesys API using a Client Credentials with Trawler. But got "No AWSAccessKey" from the "PUT request", See below in details:
- send a post request via /api/v2/workforcemanagement/businessunits/{bu_id}/weeks/{weekId}/schedules/import/uploadurl
I got a successful response with: {"uploadKey":"userUploads/schedule/import/...input.json.gz",
"url":"https://fileupload.usw2.pure.cloud/userUploads/schedule/import/...", "headers": {"Content-Encoding":"gzip","Content-Type":"application/json","x-amz-tagging":"organizationId=...&originPlatform=PureCloud&role=darth&owner=Dev-CloudAppsDarth@genesys.com"}}
- then try to send a PUT request after adding an 'schedules.json.gz' in ByteString to the PostData in the PUTrequest:
"https://fileupload.usw2.pure.cloud/useruploads/schedule/import/....." Params { RequestorID: "trawler-*-datawarehouse" UserAgentsToObey: "..." MaxPageSize: 34000000 UserAgentToSend: ".../2.1" HTTPOptions { Protocol: PROTOPUT PostData: "\037\213\b\b\373\361cc\000\003automationSchedule2022-10-31_CS-StartDate-31-10-2022.json\000......" Headers { key: "Content-Encoding" value: "gzip" } Headers { key: "x-amz-tagging" value: "organizationId=....&originPlatform=PureCloud&role=darth&owner=Dev-CloudAppsDarth@genesys.com" } Headers { key: "Content-Type" value: "application/json" } } }
Unfortunately, Received unsuccessful response from Genesys. Details: <?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>No AWSAccessKey was presented.</Message><RequestId>K3X4N4DQ060B9H9H</RequestId><HostId>PwkH7XT7OK7/2LXEjFGTmzoDxVZK7PzZmii5UdXjkkXSP0w49V+oWyxZ+OgUutmVq25+CoaMwTM=</HostId></Error>. Raw reply: Data { ID: 6818171853504990624 .... }
Please advice! Thanks! Rose
Rose_Bai | 2022-11-12 19:13:16 UTC | #2
My mistake in the put request, I fixed the issue. Thanks
system | 2022-12-13 19:13:27 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 17176