I am trying to use the api to create a new document in projectwise explorer. I keep getting a 403 forbidden error
{ "errorId": null, "errorMessage": "The specified origin is not allowed.", "errorDescription": null}
Is this something I should be able to do with the api?
I have changed the web.config file to allow Cross Domain requests. <add name="Access-Control-Allow-Origin" value="*" />
Thanks
Byron
I have been working on this, attempting to Post from powershell, I am getting a 200 ok, but no new file appears in the project.
$fileToAttach ="C:\users\hickeyb\documents\file.txt"
$auth = $username + ':' + $upassword$Encoded = [System.Text.Encoding]::UTF8.GetBytes($auth)$authorizationInfo = [System.Convert]::ToBase64String($Encoded)$headers = @{"Content-Type" = "application/json" "Content-Length" = "0" "Content-Disposition" = "attachment; filenanme=C:\users\hickeyb\documents\scorrection1.txt" "Authorization"="Basic $($authorizationInfo)"}
$test = Invoke-WebRequest -Uri localhost/.../$file -Method Post -Headers $headers -SessionVariable "MySession" -InFile $fileToAttach -Verbose -ErrorVariable errorveriable
Has anyone had any success adding documents with the API?
The return headers show Mas-License-Error-Message that says Client's license is invalid. What does this mean?
I believe I got this mas-license-error because I was attempting to make the post request on a machine that did not have projectwise explorer installed.
When I tried again with explorer installed I did not get that error. Still getting 200 ok, but no new document is created.