JIRA Automation GET Web Request to Confluence API returning no data in Results list

Brendan Martin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2022

I'm stumped on why I'm unable to get the results list back from an API call.

 

Navigating to https://confluence.corp.com/rest/api/content?title=FOO%20BAR%20BAT I get:

{"results":[{"id":"1878008","type":"page","status":"current","title":"FOO BAR BAT","extensions":{"position":0},"_links":{"webui":"/display/MPSM/FOO+BAR+BAT","edit":"/pages/resumedraft.action?draftId=1878008&draftShareId=f22defd9-0e03-4932-a777-8af1350e9a75","tinyui":"/x/8ZwxCw","self":"https://confluenceent.cms.gov/rest/api/content/187800817"},"_expandable":{"container":"/rest/api/space/MPSM","metadata":"","operations":"","children":"/rest/api/content/1878008/child","restrictions":"/rest/api/content/1878008/restriction/byOperation","history":"/rest/api/content/1878008/history","ancestors":"","body":"","version":"","descendants":"/rest/api/content/1878008/descendant","space":"/rest/api/space/MPSM"}}],"start":0,"limit":25,"size":1,"_links":{"self":"https://confluence.corp.com/rest/api/content?title=FOO%20BAR%20BAT","base":"https://confluence.corp.com","context":""}}


When I enter the exact same web address into JIRA automation, I get back:

{
"results": [],
"start": 0,
"limit": 25,
"size": 0,
"_links": {
"self": "https://confluence.corp.com/rest/api/content?title=%22ESRD%20API%20Releases%22",
"base": "https://confluence.corp.com",
"context": ""
}
}

Here is a screenshot:

Screen Shot 2022-03-03 at 3.36.42 PM.png

 

I get back a 200, so everything appears to be valid.  I have checked that my account is good.  I have made other API calls and they have worked.  It is just simply this specific GET that's not returning any information.  I have tried a number of options with the URL (space, expand, etc) just to see if I can get *something* back, but every time it's the empty JSON above.

Ultimately, my goal is just return "id" so I can use that as to reference a parent page for the creation of a new child age, but as you can see the results list is [] with no data so I'm completely stuck.  I bet this is just something dumb but I've been stuck on this all day and I have a migraine. Any assistance would be appreciated.

EDIT 4/Mar/22

I suspect I might be losing my authorization (or something similar) because I get back the same empty string if I just send the call with no header.  Oddly, I got this is work once this morning and then it stopped again.  I suspect this might be something for my internal IT to resolve so I've opened a ticket with them. 

I'm keeping this here and open so at the very least it can serve as a reference to others since I wasn't able to find anything on this specific problem via Google.  I'll follow up as I get additional information and (hopefully) a resolution.

1 answer

1 vote
Gregory MANSON
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 23, 2023

Hello,

i have the same issue. Have you solved or found a solution please 

 

if I put the url is working fine but when I put the smart value with {{createdpage.title}} I have no results. 
I put the webrespuns in a comment , if a open the url the navigator show me the result correctly. 
so I don’t’ understand what is wrong. 

please help ^^

Suggest an answer

Log in or Sign up to answer