Good morning Atlassian-Team,
I have an issue similar to the existed topics below, but slightly different. I should create an automatic jira rule for my company.
The goal of the rule should be:
When an issue is created or manually activatedfor work items with issue type "Epic",then Jira Automation should create a confluence pagein a specific customer page/location (pageID).
Describtion:
The idea is first to create a page for created jira issues in a central place via the method Publish a new page in Confluence and then to move to them to the right place. Based on my information I have to use REST API for moving those pages , because the embedded method in jira automation can only target single places. That would mean, if I want a general rule for more customers I would need for every customer the same rule with other parameters. But this is obviously too much if there are a lot of customers.
My current progress for this rule:
Trigger: manually triggeredCondition applied: Issue Type equals EpicThen: Publish a new page in ConfluenceThen: Send Web Request (Get) # Check CQL where pages are savedThen: Create variableThen: Send Web Request (Get) # Check CQL where to move the location based label/projectkeyThen: Create variableThen: Send Web Request (Post) #Move to specific PageID
Status of my progress:
My rule don't work, because I get the error message that my Get-requests URL are invalid.
First Get-Request URL:https://collaboration.your.site/wiki/rest/api/content/search?cql=space=CustomerPage AND type=page AND ancestor=pageID AND title={{createdPage.title}}&limit=1Second Get-Request URL:https://collaboration.your.site/wiki/rest/api/content/search?cql=space=CustomerPage AND type=page AND label={{issue.project.key.toLowerCase}}&limit=1Third Post-Request URL:https://collaboration.your.site/wiki/rest/api/content/{{reportSearch.body.results.first.id}}/move
What is the issue here? Is there another easier way to solve the task?
Thank you for your help!
Best regards,
Artur
Related topics:
1. Best-way-to-create-Confluence-page-from-a-JIRA-issue
2. Creation-of-confluence-page-mandatory-when-creating-an-issue
Hi @Artur
Are all API calls not working?
What is the result on just using your browser on each API call, does this give a result?
What kind of API token did you create?
Hi Marc,
1) Yes all API Calls aren't working.
2) First two Get-Requests, when using in browser get's brower page "We'll be back in a flash", which is probably an 404 error.
The third Post-Request get this message:
This XML file does not appear to have any style information associated with it. The document tree is shown below
It's also an 404 Error message, but it's probably, because the first Get-Requests have no results.
3) I created an API-Token from Account Settings -> Security -> Create API token.
Ah I understand I should not have made an "normal API Token", but an API Token with scopes and that's why I probably get the error message "We'll be back in a flash"?
You do need a full token.
Did you create one, what is the result on using any of the API calls?
Actually I have an full token (without scopes) active. Are the three webrequest urls shown up the last days are correct?
It looks like you're new here. Sign in or register to get started.