Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1- For the "site LOGO" only one attachment under the home page of the SPACE

...

With postman: GET attachment of a page:

GET "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/111575100/descendant/attachment"




1- get the homepage "content id"

"GET Space"

GET https://thefreetelecomuni.atlassian.net/wiki/rest/api/space/TEST/

>>>>>      homepage: "/rest/api/content/164855963"


2- use this id to get the attachment

"GET Attachment"

GET https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/164855963


GET  https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/164855963/descendant/attachment

>>>>>>   id: "att164757511", 

>>>>>>  title: "headerFTU.jpg",


Success

GET https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/164855963/descendant/attachment


Code Block
titleGET attachment
collapsetrue
{
    "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"
    }
}


Faile


Code Block
titleGET no attachment
collapsetrue
{
    "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"
    }
}






...