Code Monkey home page Code Monkey logo

Comments (7)

brianbunke avatar brianbunke commented on May 25, 2024

No method right now. It's available in the API, so I'm calling this a feature request and will get around to implementing it. 😄

Also, just to clarify your API restriction comment, two things are possible right now to help circumvent the limit:

  1. Get-WikiPage -Title 'confluence doc' -Limit 500
    1. By ignoring -Expand, you can at least increase your page title search from 100 to 500 pages
  2. Get-WikiPage -Title 'confluence doc' -Limit 500 -SpaceKey ITKB
    1. By adding a space key, that filter is observed first
    2. You will get the first 500 results only within the correct space

from confluenceps.

vzabawski avatar vzabawski commented on May 25, 2024

I used this workaround. 😄

$all_pages = Get-WikiSpace -Name "KB" | Get-WikiPage -Limit 1000
$pages1 = Get-WikiSpace -Name "KB" | Get-WikiPage -Limit 1000 -Expand
$c = Compare-Object $all_pages $pages1 -PassThru
$pages2 = $c | Get-WikiPage -Expand
$pages = $pages1 + $pages2

It doesn't consume much time since I don't have much pages that doesn't fit into API limit with -Expanded option. But it's not good for large amounts of pages.

from confluenceps.

vzabawski avatar vzabawski commented on May 25, 2024

I wrote a function that gets child pages by parent id. Sadly, I couldn't get -Expand option working.

http://example.com/rest/api/content/1234/child?expand=page.body.VIEW
http://example.com/rest/api/content/1234/child?expand=page&start=20&limit=10

Examples from Confluence are not working for me, I'm getting empty respond.

from confluenceps.

ScottWelker avatar ScottWelker commented on May 25, 2024

Strange. In the v3.1 REST API an added option (might have been expand) caused the result to include child pages. Does the v5.x REST API not have the same or similar?

from confluenceps.

vzabawski avatar vzabawski commented on May 25, 2024

Can you give me an example or a link?

from confluenceps.

ScottWelker avatar ScottWelker commented on May 25, 2024

Sure vzabauski. I am raveling at the moment.

I'll endeavor to dig something up. However, I haven't used the v5.x REST API except to create pages via brianbunke's GREAT ConfluencePS 'wrapper'.

Confluence continually disappoints so I would not be too shocked if the option (include children) is removed in the later APIs. I'll see what I can find.

from confluenceps.

brianbunke avatar brianbunke commented on May 25, 2024

Get-WikiChildPage introduced. Issue resolved in #7 and supplemented in commit 359908b. 🎉

from confluenceps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.