You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest version, and the immediately prior version, Get-WikiPage fails silently for "-Limit" values in the range [1..4] inclusive. However, 0 and seemingly any value above 4 works. Negative values result in an understandable HTTP 500 Server Error from Confluence.
Get-WikiPage -Title somepage -SpaceKey somespacekey -Limit n
Where:
somepage exists (and is returned for limits of zero or above 4).
somespacekey exists (and is returned for limits of zero or above 4).
n is some limit number.
It's of course relatively easy to avoid the issue. Just thought you might want to know.
Oh! And, THANKS!! This tool looks very useful.
The text was updated successfully, but these errors were encountered:
Note that it's ignoring the Title parameter so far
Makes the REST Get call with that URI and your credentials
Uses Where-Object to filter down to Title wildcard matches
This is the part that matters: Inside the space key you supply, it grabs the first n results at random.1 If the first four random results don't match your Title string, they are all filtered out as part of step 3, and then it appears to fail silently.
I have two options here:
Keep it this way. Hopefully not everyone runs into the same problem 😢
Maybe I can review the help I wrote for Get-WikiPage and be more explicit about this?
Go back to adding the Title parameter in step 1, BUT:
From memory, this makes it case sensitive (like SpaceKey is currently)
and I'm pretty sure it also breaks wildcarding
I hated those downsides in option 2, so I went the option 1 route during creation.
Let me know if that makes sense, or please tell me if I misunderstood your problem completely, haha.
1 Random as far as I can tell, anyway. I'm sure there's some rhyme or reason, but I haven't figured it out. ↩
You've understood completely. I like that last "do this instead". Thank you!
I really appreciate your sharing this. I had to work directly with the Confluence v3.x REST API. ConfluencePS is saving me a bunch of work - for the Confluence v5.x REST API.
In the latest version, and the immediately prior version, Get-WikiPage fails silently for "-Limit" values in the range [1..4] inclusive. However, 0 and seemingly any value above 4 works. Negative values result in an understandable HTTP 500 Server Error from Confluence.
Get-WikiPage -Title somepage -SpaceKey somespacekey -Limit n
Where:
It's of course relatively easy to avoid the issue. Just thought you might want to know.
Oh! And, THANKS!! This tool looks very useful.
The text was updated successfully, but these errors were encountered: