Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 10 Current »


https://jsoneditoronline.org/

https://jsonformatter.org/





create a page:     "page4"


Content:

<p>This is a new page from curl Linux<br/>

a new page</p>

POST using linux curl
curl 
-X POST 
-H 'Content-Type: application/json' 
-d '{"type":"page","title":"page4","space":{"key":"TEST"},"body":{"storage":{"value":"<p>This is a new page from curl Linux<br/> a new page</p>","representation":"storage"}}}' 
https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/ | python3 -mjson.tool
POST with curl on Windows Powershell
PS C:\Users\jkriker> curl -Method POST -ContentType 'application/json'  -Body '{"type":"page","title":"page7",
>> "space":{"key":"TEST"},"body":{"storage":{"value":"<p>This is a new page from curl Linux<br/> a new page</p>","representation":
>> "storage"}}}' https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/


StatusCode        : 200
StatusDescription : OK
Content           : {"id":"13172807","type":"page","status":"current","title":"page7","space":{"id":13238319,"key":"TEST","name":"test","type":"global","s
                    tatus":"current","_expandable":{"settings":"/rest/api/space/TEST/s...
RawContent        : HTTP/1.1 200 OK
                    Vary: Accept-Encoding
                    Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
                    ATL-TraceId: 8f579c96f93fecd7
                    X-XSS-Protection: 1; mode=block
                    Transfer-Encoding: chu...
Forms             : {}
Headers           : {[Vary, Accept-Encoding], [Strict-Transport-Security, max-age=315360000; includeSubDomains; preload], [ATL-TraceId,
                    8f579c96f93fecd7], [X-XSS-Protection, 1; mode=block]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 4460

page
{
  "type": "page",
  "title": "page4",
  "space": {
    "key": "TEST"
  },
  "body": {
    "storage": {
      "value": "<p>This is a new page from curl Linux<br/> a new page</p>",
      "representation": "storage"
    }
  }
}
POST HTTP REQUEST
myplex@batpc2:~$ curl -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"page4",                                                "space":{"key":"TEST"},"body":{"storage":{"value":"<p>This is a new page from curl Linux<br/> a new page</p>","representation":
"storage"}}}' https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/ | python3 -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4632    0  4460  100   172   4000    154  0:00:01  0:00:01 --:--:--  4154
{
    "id": "13238405",
    "type": "page",
    "status": "current",
    "title": "page4",
    "space": {
        "id": 13238319,
        "key": "TEST",
        "name": "test",
        "type": "global",
        "status": "current",
        "_expandable": {
            "settings": "/rest/api/space/TEST/settings",
            "metadata": "",
            "operations": "",
            "lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=TEST",
            "permissions": "",
            "icon": "",
            "description": "",
            "theme": "/rest/api/space/TEST/theme",
            "history": "",
            "homepage": "/rest/api/content/13238386"
        },
        "_links": {
            "webui": "/spaces/TEST",
            "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/space/TEST"
        }
    },
    "history": {
        "latest": true,
        "createdBy": {
            "type": "anonymous",
            "profilePicture": {
                "path": "/wiki/s/-1234050512/6452/df79d7c6182c8a1ae71bb90a94d2018702e70afa/_/images/icons/profilepics/anonymous.png",
                "width": 48,
                "height": 48,
                "isDefault": true
            },
            "displayName": "Anonymous",
            "_expandable": {
                "operations": ""
            }
        },
        "createdDate": "2018-12-08T13:14:16.076Z",
        "_expandable": {
            "lastUpdated": "",
            "previousVersion": "",
            "contributors": "",
            "nextVersion": ""
        },
        "_links": {
            "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405/history"
        }
    },
    "version": {
        "by": {
            "type": "anonymous",
            "profilePicture": {
                "path": "/wiki/s/-1234050512/6452/df79d7c6182c8a1ae71bb90a94d2018702e70afa/_/images/icons/profilepics/anonymous.png",
                "width": 48,
                "height": 48,
                "isDefault": true
            },
            "displayName": "Anonymous",
            "_expandable": {
                "operations": ""
            }
        },
        "when": "2018-12-08T13:14:16.076Z",
        "friendlyWhen": "just a moment ago",
        "message": "",
        "number": 1,
        "minorEdit": false,
        "confRev": "confluence$content$13238405.2",
        "_expandable": {
            "collaborators": "",
            "content": "/rest/api/content/13238405"
        },
        "_links": {
            "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405/version/1"
        }
    },
    "ancestors": [
        {
            "id": "13238386",
            "type": "page",
            "status": "current",
            "title": "test",
            "macroRenderedOutput": {},
            "extensions": {
                "position": 1610612735
            },
            "_expandable": {
                "childTypes": "",
                "container": "/rest/api/space/TEST",
                "metadata": "",
                "operations": "",
                "children": "/rest/api/content/13238386/child",
                "restrictions": "/rest/api/content/13238386/restriction/byOperation",
                "history": "/rest/api/content/13238386/history",
                "ancestors": "",
                "body": "",
                "version": "",
                "descendants": "/rest/api/content/13238386/descendant",
                "space": "/rest/api/space/TEST"
            },
            "_links": {
                "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238386",
                "tinyui": "/x/cgDK",
                "editui": "/pages/resumedraft.action?draftId=13238386",
                "webui": "/spaces/TEST/overview"
            }
        }
    ],
    "container": {
        "id": 13238319,
        "key": "TEST",
        "name": "test",
        "type": "global",
        "status": "current",
        "history": {
            "createdBy": {
                "type": "known",
                "username": "admin",
                "userKey": "8a7f808567194a3501671de3af320095",
                "accountId": "557058:df961624-d453-4a63-922a-c947135a743b",
                "profilePicture": {
                    "path": "/wiki/aa-avatar/b9367cb79e7f68e074e75e375f80b718?s=48&d=https%3A%2F%2Fthefreetelecomuni.atlassian.net%2Fwiki%2Fimages%2Ficons%2Fprofilepics%2Fdefault.png%3FnoRedirect%3Dtrue",
                    "width": 48,
                    "height": 48,
                    "isDefault": false
                },
                "displayName": "Jean-luc KRIKER",
                "_expandable": {
                    "operations": "",
                    "details": "",
                    "personalSpace": ""
                },
                "_links": {
                    "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/user?accountId=557058:df961624-d453-4a63-922a-c947135a743b"
                }
            },
            "createdDate": "2018-12-08T06:44:35.315Z"
        },
        "_expandable": {
            "settings": "/rest/api/space/TEST/settings",
            "metadata": "",
            "operations": "",
            "lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=TEST",
            "permissions": "",
            "icon": "",
            "description": "",
            "theme": "/rest/api/space/TEST/theme",
            "homepage": "/rest/api/content/13238386"
        },
        "_links": {
            "webui": "/spaces/TEST",
            "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/space/TEST"
        }
    },
    "macroRenderedOutput": {},
    "body": {
        "storage": {
            "value": "<p>This is a new page from curl Linux<br /> a new page</p>",
            "representation": "storage",
            "embeddedContent": [],
            "_expandable": {
                "content": "/rest/api/content/13238405"
            }
        },
        "_expandable": {
            "editor": "",
            "atlas_doc_format": "",
            "view": "",
            "export_view": "",
            "styled_view": "",
            "editor2": "",
            "anonymous_export_view": ""
        }
    },
    "extensions": {
        "position": 2013265919
    },
    "_expandable": {
        "childTypes": "",
        "metadata": "",
        "operations": "",
        "children": "/rest/api/content/13238405/child",
        "restrictions": "/rest/api/content/13238405/restriction/byOperation",
        "descendants": "/rest/api/content/13238405/descendant"
    },
    "_links": {
        "editui": "/pages/resumedraft.action?draftId=13238405",
        "webui": "/spaces/TEST/pages/13238405/page4",
        "context": "/wiki",
        "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405",
        "tinyui": "/x/hQDK",
        "collection": "/rest/api/content",
        "base": "https://thefreetelecomuni.atlassian.net/wiki"
    }
}









  • No labels