Comments (3)
And also to add, if that ^ is actually the problem you're running into, do this instead:
Get-WikiPage -Title somepage -SpaceKey somespacekey -Limit 100 | Select -First n
from confluenceps.
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.
Thanks again!!
from confluenceps.
Thanks man! This helped me realize I haven't yet added ValidateRange on the [int] parameters, so I appreciate the feedback!
I think you're running into an API problem I haven't been able to "hide" at this point. Here's what your command is actually doing, in order:
Get-WikiPage -Title somepage -SpaceKey somespacekey -Limit n
- Build the URI:
https://wiki.contoso.com/rest/api/content?type=page&spaceKey=somespacekey&limit=n
- 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?
- Maybe I can review the help I wrote for
- 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. ↩
from confluenceps.
Related Issues (20)
- Content Overflow when resizing window width. CSS bug HOT 3
- Is it possible to get the last modification time for an Attachment?
- Get-ConfluenceSpace does not return labels, and does not take label as input parameter HOT 2
- Set-Confluence failing with "com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor"
- ConvertTo-Space : Cannot create object of type "ConfluencePS.Space". Cannot convert value "29290657992" to type "System.Int32". Error: "Value was either too large or too small for an Int32." HOT 2
- Ability to set minorEdit on page change
- Build scripts spoils global gitconfig file
- Large PageID results System.Int32 overflow HOT 3
- Module Version Mismatch in PowerShell Gallery HOT 1
- Issue: Get-ConfluencePage with multiple Labels
- Cmdlets Using PSCredential Objects HOT 1
- Get-ConfluenceAttachment doesnt work anymore cause PageID is bigger than Int32 HOT 1
- Set-ConfluenceAttachment on Powershell 7.1.5
- Set-ConfluenceInfo does not persist when called in a function
- Function override causes build failure
- The builds fail due to server-2014 decommissioning
- Need instructions for authenticating to Confluence Cloud HOT 2
- ConvertTo-ConfluenceStorageFormat cmdlet gives error on Ubuntu
- Set-Attachment HOT 2
- Get-ConfluenceAttachment throws error for archived pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from confluenceps.