Skip to content

[Confluence] Fixed template functions urls using wiki/rest/. #863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 1, 2022

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