I am trying to retrieve a Confluence page using this script line:
Invoke-RestMethod -Method GET -User user:pswd
-Uri "https://confluenceURL/rest/api/content/7700576?expand=body.storage"
But get this error:
Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At line:1 char:1
+ Invoke-RestMethod -Method GET -User user:passwd -Uri "https ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Does anyone know what I'm doing wrong here ? I know the page exists and I have access to it.