I want to upload a file to SharePoint through Oracle system using Rest API. I tried the following but with no luck.
console:
POST
"Request Headers": {
"content-length": "100000",
"authorization": "Bearer access token",
"user-agent": "PostmanRuntime/7.28.4",
"accept": "*/*",
"postman-token": "11",
"host": "test.sharepoint.com",
"accept-encoding": "gzip, deflate, br",
"connection": "keep-alive",
"content-type": "multipart/form-data; boundary=--------------------------327461050037851785007682"
},
"Request Body": { "": "" },
"Response Headers": {
"cache-control": "private, max-age=0",
"expires": "Mon, 20 Dec 2021 05:18:53 GMT",
"last-modified": "Tue, 04 Jan 2022 05:18:53 GMT",
"vary": "Origin",
"p3p": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"",
"x-sharepointhealthscore": "2",
"x-aspnet-version": "4.0.30319",
"sprequestguid": "375b13a0-70ce-c000-bacc-4fdfeefc7910",
"request-id": "375b13a0-70ce-c000-bacc-4fdfeefc7910",
"ms-cv": "oBNbN85wAMC6zE/f7vx5EA.0",
"strict-transport-security": "max-age=31536000",
"x-frame-options": "SAMEORIGIN",
"content-security-policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com;",
"x-powered-by": "ASP.NET",
"microsoftsharepointteamservices": "16.0.0.21924",
"x-content-type-options": "nosniff",
"x-ms-invokeapp": "1; RequireReadOnly",
"x-cache": "CONFIG_NOCACHE",
"x-msedge-ref": "Ref A: 3C3309D8FC4C43CAA72F28D56F17244B Ref B: ZRHEDGE1219 Ref C: 2022-01-04T05:18:53Z",
"date": "Tue, 04 Jan 2022 05:18:53 GMT",
"content-length": "0"
The url should be like following
url: http://test.sharepoint.com/sites/testsite/_api/web/GetFolderByServerRelativeUrl('/Library Name/Folder Name')/Files/add(url='a.txt',overwrite=true)