[EAC] REST API Documentation.
- Harshit Sharma
- Saurabh Gupta
Owned by Harshit Sharma
Fetch all attachment based on page-id
API -/confluence/rest/easy-attachment/1.0/content/1933317
METHOD TYPE - GET
RESPONSES -
STATUS 200 (OK) - fetch all the list of attachments.
{
"results": [
{
"id": "2228227",
"type": "attachment",
"status": "current",
"title": "testing-5.png",
"links": {
"webui": {
"type": "webui",
"path": "/display/TEST/test-71?preview=%2F1933317%2F2228227%2Ftesting-5.png"
},
"download": {
"type": "download",
"path": "/download/attachments/1933317/testing-5.png?version=1&modificationDate=1710229959125&api=v2"
},
"thumbnail": {
"type": "thumbnail",
"path": "/download/thumbnails/1933317/testing-5.png?api=v2"
}
},
"space": null,
"history": null,
"version": null,
"ancestors": null,
"operations": null,
"children": null,
"descendants": null,
"container": null,
"body": null,
"metadata": {
"comment": "Comment",
"mediaType": "image/png",
"labels": {
"results": [],
"start": 0,
"limit": 200,
"size": 0
}
},
"extensions": {
"mediaType": "image/png",
"fileSize": 70275,
"comment": "Comment"
},
"restrictions": null
},
{
"id": "2228226",
"type": "attachment",
"status": "current",
"title": "Screenshot 2024-02-13 114327.png",
"": "",
.....................
},
],
"start": 0,
"limit": 100,
"size": 4
}
STATUS 400 (INTERNAL_SERVER_ERROR) - Database Query failed
Upload attachment for any page.
API -
/confluence/rest/easy-attachment/1.0/content/1933317/upload/base64
METHOD TYPE - POST
REQUEST BODY -
{
"base64Data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAEuCAYAAADWYKFrAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAABX3SURBVHhe7Z0HeBTlusf/2fRuIIQqICGg9KiUA6JAAKkK147KBREUrnCwcBQsNEV8PHq4wBUVyeWgV0VERECqiqhEioiAtFAiiKGFkoQUsknu/D9mYLPZTWZ2J5NNZn7P8zk7ZQ3/fd+vzbzfO3516tQphgmxyVvTYQk3G5Zws2EJNxuWcL0IiK6NuKThi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zGgzrxz0VTiIiIkSop7vsnUx8mZaWplo0qRJ1nEPS3bt3ixyurgqTW2oR7S1WHVeD4sZMKq2kH3WGgX8c4HCZlbtrGP3Mc47vUfEEw+s404J6C0Uz1tWb9yVVicbNETXXqMEawHiAJdxsWMLNhmmFa+rO+Ia6e++9VwwtmV7cFVyuwVcMsJ8u75pt27aJ4imG9eOEf4xvquOkw1P4w3F8zhfCeTM+N1S4L2ENYDzAEm42LOFmwxJuNizhZsMSbjYs4WbDEm42LOFmwxJe3eC9vLJKtRLuKKw8qrRwR4HuxDr+GI6lWlicQhxxFOiOKn17mRHPjreXKZTJ9njb2V14uEK1Ea6IZp4phqowA2hZVFlXd3RlZUtLqxFNNFs8KSlJJJHWIw5GgS94ZmpSPlJSC8XS4nw+pwhv27YtUlNTxefy0Cz81VdfFUmumLCO/2Bv4Q9IF126dCnmzZsnHy0fRbijq3PpR4UK79ChA95//32xjMJb+PSVHrRs2TLVwhULeyO8WnZnaqg2AxitVAuLE66OUPMucmYLZpWqFsIpmjADsBqYkK/KC1ey/jJ7oBYqXThbZU+7ReUVBFpFE0OFN2rUCCNGjBCZ9Fl69eolYlnHjx8vViYYBYe1hginZfjehAULFuCRRx7B4MGDRZk0aZIYuHD5JYP4tcIlm0TrOjdD6jjXob355ptiOMloZSaiVjLpUzSXavAtOnyZhCcoMfFaxVeocCat5ahMGh2K2PSxY8eKLNzsdrj+hONz5l9nzDpXKHIe4AlHjhwRW+Z7Vwfw/wEpKVOrhWWXAAAAAElFTkSuQmCC",
"fileName": "testing-23.png"
}
RESPONSES -
STATUS 200 (OK) - Attachment uploaded successfully.
Attachment uploaded successfully
STATUS 400 (BAD REQUEST) - file passed empty, file name passed empty, Invalid license, Invalid attachment data.
STATUS 500 (INTERNAL SERVER ERROR) - server failed
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'html' is unknown.