Skip to content

[Confluence] get_page_child_by_type without pagination parameters results in MissingSchema exception #957

Description

@kkosciusz

When using get_child_pages() or get_page_child_by_type() without start or limit parameters the _get_paged() helper method fails to continue with pagination and constructs invalid request:

MissingSchema: Invalid URL 'rest/api/content/1325203670/child/page?next=true&limit=25&start=25': No scheme supplied.

Based on examples provided in the server REST API (https://developer.atlassian.com/server/confluence/pagination-in-the-rest-api/) and in cloud REST API (https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-wiki-rest-api-search-get) the next link is relative, not absolute:

"_links": {
    "base": "http://localhost:8080/confluence",
    "context": "",
    "next": "/rest/api/space/ds/content/page?limit=5&start=5",
    "self": "http://localhost:8080/confluence/rest/api/space/ds/content/page"
},

It seems that _get_paged() should make requests with absolute = False or construct the url as base + next.

The change was introduced in #937 by @Spacetown

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confluenceAtlassian Confluence (Cloud, Server or Dataceneter)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions