I'm trying to create a page from powershell using the following command -
$json = "{""type"": ""page"",""title"": ""My test page 2"",""space"": {""key"": ""TST""},""body"": {""storage"": {""value"": ""Another testing"",""representation"": ""storage""}}}"
$res = Invoke-RestMethod https://xxxx.xxx.net/wiki/rest/api/content/ -Method Post -Body $json -Headers @{Authorization = "Basic xxxxxxx"} -ContentType 'application/json'
However, I'm getting 403 Error. I can create page using menu options with no problem, so clearly I have necessary authority. I can also make GET request with no problem. I appreciate if anyone could point out my mistake.
Thanks
Hi Michael Moe,
Since you have fixed this case I'll mark this question as answered.
Cheers,
Rodrigo
Nope, my stupid mistake. I fixed that and now it works. Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have a space with the key "TST"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.