Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I return the contents of a Jira table via API?

Kirsten Cox April 4, 2023

Hello,

I have a Jira table generated inside a Confluence page with a JQL query, do you know if I can get the contents of the table returned via API instead of just the macro structure? 

For example, I'm currently calling this endpoint:

https://YOURDOMAIN.atlassian.net/wiki/api/v2/pages/{PAGEID}?body-format=storage

Which is returning this:

<hr /><ac:structured-macro ac:name=\"jira\" ac:schema-version=\"1\" data-layout=\"full-width\" ac:local-id=\"\" ac:macro-id=\"9932a9f0-89d7-4d89-be7b-6cd50c9a3c6a\"><ac:parameter ac:name=\"server\">System JIRA</ac:parameter><ac:parameter ac:name=\"columns\">key,summary,type,hospital system,product,service line</ac:parameter><ac:parameter ac:name=\"maximumIssues\">1000</ac:parameter><ac:parameter ac:name=\"jqlQuery\">fixVersion = 'CMX-Automate 2.0.26' AND issuetype IN (10010,10004,10127,10130) </ac:parameter><ac:parameter ac:name=\"serverId\"></ac:parameter></ac:structured-macro>

I'd like to return the contents within the table instead of the macro and its properties. Is that possible?

1 answer

0 votes
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2023

Hi @Kirsten Cox ,

 

Not aware of an API return call that would deliver a table. Usually, this needs to be scripted in order to parse the API values into a table. 

Here's an example:

https://stackoverflow.com/questions/74375035/convert-json-response-from-rest-api-into-datatable

There maybe tools out there to convert it. 

 

-Ben

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events