Q: How to add the the addon using the REST API. Thanks to Conor Macpherson.
A: Here is the example request and request body:
PUT https://test.atlassian.net/wiki/rest/api/content/<PAGE_ID>?expand=body.storage
{ "type": "page", "title": "page-name", "version": { "number": 19 }, "body": { "storage": { "value": "<ac:structured-macro ac:name=\"swagger-open-api-macro\"><ac:plain-text-body><![CDATA[<YOUR-SWAGGER-DEFINITION-HERE>]]></ac:plain-text-body></ac:structured-macro>", "representation": "storage" } } } |