Skip to content

Conversation

@olaor
Copy link
Contributor

@olaor olaor commented Oct 5, 2021

All other functions in confluence.py use rest/api/.

confluence.get_content_templates() works a lot better now.

Copy link

@Mooreel Mooreel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The url in the template call(s) includes wiki/ and the init always adds wiki to the baseURL for cloud instances.

if ("atlassian.net" in url or "jira.com" in url) and ("/wiki" not in url):
url = AtlassianRestAPI.url_joiner(url, "/wiki")

def get_content_template(self, template_id):
url = "wiki/rest/api/template/{template_id}".format(template_id=template_id)

This pr fixes this correctly.

@gonchik gonchik changed the title Fixed template functions urls using wiki/rest/. [Confluence] Fixed template functions urls using wiki/rest/. Jan 1, 2022
@gonchik gonchik merged commit 38685ec into atlassian-api:master Jan 1, 2022
@gonchik
Copy link
Member

gonchik commented Jan 1, 2022

Thanks

gonchik pushed a commit that referenced this pull request Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants