首页 > 解决方案 > How to parse rest api code from confluence page

问题描述

how can i parse fields ( task id,task status, task body) from rest api which is on confluence page

I am trying to parse the rest api from confluence page to get Task ID,Task Status, and body fields from the api code. I am open for python,alteryx or sas or any option to parse this file. we have few other rest api's which need to be parsed. so looking for automate process. please recommend a solution.

 ```{"id":"33469","type":"page","status":"current","title":"Huddle Tracker","body":{"storage":{"value":"<ac:task-list>\n<ac:task>\n<ac:task-id>4</ac:task-id>\n<ac:task-status>incomplete</ac:task-status>\n<ac:task-body><span><ac:link><ri:user ri:userkey=\"123456789abc\" /></ac:link> - 6/13</span></ac:task-body>\n</ac:task>\n<ac:task>\n<ac:task-id>5</ac:task-id>\n<ac:task-status>incomplete</ac:task-status>\n<ac:task-body><p><span><ac:link><ri:user ri:userkey=\"123456789abc\" /></ac:link> - 6</span>/14</p></ac:task-body>\n</ac:task>\n<ac:task>\n<ac:task-id>6</ac:task-id>\n<ac:task-status>incomplete</ac:task-status>\n<ac:task-body><span><ac:link><ri:user ri:userkey=\"123456789abc\" /></ac:link> - 6/15<br /></span></ac:task-body>\n</ac:task>\n<ac:task>\n<ac:task-id>7</ac:task-id>\n<ac:task-status>incomplete</ac:task-status>\n<ac:task-body><span><ac:link><ri:user ri:userkey=\"123456789abc\" /></ac:link> - 6/16<br /></span></ac:task-body>\n</ac:task>\n</ac:task-list><p><span><br /></span></p><p><span><br /></span></p><p><br /></p>","representation":"storage","_expandable":{"content":"/rest/api/content/33469"}},"_expandable":{"editor":"","view":"","export_view":"","styled_view":"","anonymous_export_view":""}},"extensions":{"position":"none"},"_links":{"webui":"/display/abcd01d/Huddle+Tracker","edit":"/pages/resumedraft.action?draftId=33469","tinyui":"/x/Rw-zEw","collection":"/rest/api/content","base":"https://confluence:9999","context":"","self":"https://confluence:9999/rest/api/content/33469"},"_expandable":{"container":"/rest/api/space/abcd01d","metadata":"","operations":"","children":"/rest/api/content/33469/child","restrictions":"/rest/api/content/33469/restriction/byOperation","history":"/rest/api/content/33469/history","ancestors":"","version":"","descendants":"/rest/api/content/33469/descendant","space":"/rest/api/space/abcd01d"}}

i need Task ID, Task Status and Task Body parsed.

标签: confluenceconfluence-rest-api

解决方案


在寻找可用的工具之后,我决定使用 RPA 来抓取内容并解析它。我发现的另一个选择是使用 python 包来抓取数据。


推荐阅读