This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

405 - Method Not Allowed on LRC ReloadDataFile public API

Attempting a PUT to the ReloadDataFile API (URL below) from Powershell using Invoke-RestMethod.  I'm able to successful do it from Postman.  From powershell, no matter what I attempt, I get the 405 - Method Not Allowed.  Obviously, the PUT is allowed on this endpoint as it works from Postman.  

When I replace the url, project Id, data file id, tenant ID, and auth, I have no issues on any of the other get/post requests, so that does not appear to be the issuel.


Here's what my current scripts looks like:

$FileName = "";
$FileNameWithPath = "C:temp\";
$URL = "">

$fileBytes = [System.IO.File]::ReadAllBytes($FileNameWithPath);
$fileEnc = [System.Text.Encoding]::GetEncoding('UTF-8').GetString($fileBytes);
$boundary = [System.Guid]::NewGuid().ToString();
$LF = "`r`n";

$headers = @{
ContenType = "multipart/form-data; boundary=--$boundary--"

$bodyLines = (
) -join $LF

Invoke-RestMethod -Method PUT $URL -H $headers -Body $bodyLines