You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 7
Next »
1- For the "site LOGO" only one attachment under the home page of the SPACE
2- for all other images, attached to the page
3- in the HTML must referrer to the attachment
Documentation: https://developer.atlassian.com/cloud/confluence/rest/#api-content-id-child-attachment-post
Best document: https://docs.atlassian.com/atlassian-confluence/REST/6.5.2/?_ga=2.77528533.1516931135.1540774221-392665659.1538899673#content/{id}/child/attachment-createAttachments
With postman: GET attachment of a page:
GET "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/111575100/descendant/attachment"
|
|
---|
successfull |
{
"results": [
{
"id": "att111215621",
"type": "attachment",
"status": "current",
"title": "headerFTU.jpg",
"macroRenderedOutput": {},
"metadata": {
"mediaType": "image/jpeg"
},
"extensions": {
"mediaType": "image/jpeg",
"fileSize": 41386,
"comment": "",
"mediaTypeDescription": "JPEG Image",
"fileId": "4e52b601-f013-4cff-96f8-4c963709032f",
"collectionName": "contentId-111575100"
},
"_expandable": {
"childTypes": "",
"container": "/rest/api/content/111575100",
"operations": "",
"children": "/rest/api/content/att111215621/child",
"restrictions": "/rest/api/content/att111215621/restriction/byOperation",
"history": "/rest/api/content/att111215621/history",
"ancestors": "",
"body": "",
"version": "",
"descendants": "/rest/api/content/att111215621/descendant",
"space": "/rest/api/space/TEST"
},
"_links": {
"webui": "/spaces/TEST/pages/111575100/IT?preview=%2F111575100%2F111215621%2FheaderFTU.jpg",
"self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/att111215621",
"download": "/download/attachments/111575100/headerFTU.jpg?version=1&modificationDate=1557693550410&cacheVersion=1&api=v2"
}
}
],
"start": 0,
"limit": 25,
"size": 1,
"_links": {
"base": "https://thefreetelecomuni.atlassian.net/wiki",
"context": "/wiki",
"self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/111575100/descendant/attachment"
}
}
|
|
{
"results": [], <<<<<<<<<<<<<<< no Result !!! = no Attachment >>>>>>>>>>>>
"start": 0,
"limit": 25,
"size": 0,
"_links": {
"base": "https://thefreetelecomuni.atlassian.net/wiki",
"context": "/wiki",
"self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/111411266/descendant/attachment"
}
}
|
|
|
|
|
|
|
|
|