Versions Compared

Key

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


https://jsoneditoronline.org/

https://jsonformatter.org/


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



create a page:     "page4"


Content:

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

a new page</p>


Code Block
titlePOST using linux curl
collapsetrue
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


{
Code Block
titlepage
POST with curl on Windows Powershell
collapsetrue
PS C:\Users\jkriker> curl -Method POST -ContentType 'application/json'  -Body '{"type": "page",
  "title": "page4page7",
 >> "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 }       : }
}
Code Block
titlePOST HTTP REQUEST
collapsetrue
myplex@batpc2:~$ curl -X POST -H 'Content-Type: application/json' -d '{"200
StatusDescription : OK
Content           : {"id":"13172807","type":"page","status":"current","title":"page4",         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
         "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",Vary: Accept-Encoding
          "status": "current",         "_expandable": {Strict-Transport-Security: max-age=315360000; includeSubDomains; preload
            "settings": "/rest/api/space/TEST/settings",       ATL-TraceId: 8f579c96f93fecd7
    "metadata": "",             "operations": "",
   X-XSS-Protection: 1; mode=block
         "lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=TEST",          Transfer-Encoding: chu...
Forms "permissions": "",           :  "icon": "",{}
Headers           : {[Vary,  "description": "",
  Accept-Encoding], [Strict-Transport-Security, max-age=315360000; includeSubDomains; preload], [ATL-TraceId,
         "theme": "/rest/api/space/TEST/theme",          8f579c96f93fecd7], [X-XSS-Protection,  "history": "",1; mode=block]...}
Images             "homepage": "/rest/api/content/13238386"
{}
InputFields       : },{}
Links             "_links": {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 4460

Code Block
titlepage
{
  "webuitype": "/spaces/TESTpage",
  "title": "page4",
  "space": {
    "selfkey": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/space/TEST"
  },
  "body": {
 }   "storage": {
},      "historyvalue": "<p>This {is a new page from curl Linux<br/> a new "latest": truepage</p>",
      "representation":  "createdBystorage":
{    }
  }
}


Code Block
titlePOST HTTP REQUEST
collapsetrue
myplex@batpc2:~$ curl -X POST -H 'Content-Type: application/json' -d '{"type": "anonymouspage",
            "profilePicture": {
    "title":"page4",             "path": "/wiki/s/-1234050512/6452/df79d7c6182c8a1ae71bb90a94d2018702e70afa/_/images/icons/profilepics/anonymous.png",                    "width": 48,                 "height": 48,
                "isDefault": true
            },
 "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
          "displayName": "Anonymous",             "_expandable": {        Dload  Upload   Total    "operations": ""Spent    Left  Speed
100  4632     }0  4460  100   172  }, 4000    154  0:00:01  "createdDate": "2018-12-08T13:14:16.076Z",
   0:00:01 --:--:--  4154
{
    "_expandableid": {"13238405",
            "lastUpdated"type": "page",
            "previousVersion"status": "",
      current",
     "contributorstitle": "page4",
    "space": {
        "nextVersionid": ""13238319,
         }"key": "TEST",
        "_linksname": {
 "test",
          "selftype": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405/history"global",
        }
"status": "current",
   },     "version_expandable": {
            "bysettings": {"/rest/api/space/TEST/settings",
            "typemetadata": "anonymous",
            "profilePictureoperations": {"",
                "pathlookAndFeel": "/wikirest/sapi/-1234050512/6452/df79d7c6182c8a1ae71bb90a94d2018702e70afa/_/images/icons/profilepics/anonymous.png",
   settings/lookandfeel?spaceKey=TEST",
            "permissions": "",
            "widthicon": 48,"",
            "description": "",
            "heighttheme": 48"/rest/api/space/TEST/theme",
            "history": "",
  "isDefault": true          "homepage": "/rest/api/content/13238386"
    },    },
        "displayName_links": "Anonymous",{
            "_expandablewebui": {
  "/spaces/TEST",
             "operationsself": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/space/TEST"
        }
    },
    "history": {
  },         "whenlatest": "2018-12-08T13:14:16.076Z"true,
        "friendlyWhencreatedBy": {
"just a moment ago",         "messagetype": "anonymous",
            "numberprofilePicture": 1,{
        "minorEdit": false,         "confRevpath": "confluence$content$13238405.2",/wiki/s/-1234050512/6452/df79d7c6182c8a1ae71bb90a94d2018702e70afa/_/images/icons/profilepics/anonymous.png",
                "width": 48,
   "_expandable": {             "collaboratorsheight": ""48,
                "contentisDefault": "/rest/api/content/13238405" true
            },
            "_linksdisplayName": {"Anonymous",
            "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405/version/1"
_expandable": {
       }     },    "operations": "ancestors": ["
            }
   {     },
        "idcreatedDate": "132383862018-12-08T13:14:16.076Z",
        "_expandable": {
    "type        "lastUpdated": "page",
            "statuspreviousVersion": "current",
            "titlecontributors": "test",
            "nextVersion": "macroRenderedOutput": {},"
        },
        "extensions_links": {
                "position": 1610612735"self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405/history"
        }
    },
    "version": {
        "_expandableby": {
                "childTypestype": "anonymous",
                "containerprofilePicture": "/rest/api/space/TEST",{
                "metadatapath": "/wiki/s/-1234050512/6452/df79d7c6182c8a1ae71bb90a94d2018702e70afa/_/images/icons/profilepics/anonymous.png",
                "operationswidth": ""48,
                "childrenheight": "/rest/api/content/13238386/child"48,
                "restrictionsisDefault": "/rest/api/content/13238386/restriction/byOperation",true
            },
            "historydisplayName": "/rest/api/content/13238386/historyAnonymous",
   
            "ancestors_expandable": "",{
                "bodyoperations": "",
            }
       "version": "" },
        "when": "2018-12-08T13:14:16.076Z",
        "descendantsfriendlyWhen": "/rest/api/content/13238386/descendantjust a moment ago",
        "message": "",
        "spacenumber": "/rest/api/space/TEST" 1,
        "minorEdit": false,
     },   "confRev": "confluence$content$13238405.2",
        "_linksexpandable": {
                "selfcollaborators": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238386",
   
            "tinyuicontent": "/x/cgDK",rest/api/content/13238405"
        },
        "editui_links": "/pages/resumedraft.action?draftId=13238386",
{
               "webuiself": "/spaces/TEST/overview"https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405/version/1"
        }
    },
    "ancestors":  [
 }     ],  {
  "container": {         "id": 13238319"13238386",
            "keytype": "TESTpage",
            "namestatus": "testcurrent",
            "typetitle": "globaltest",
            "statusmacroRenderedOutput": "current"{},
            "historyextensions": {
                "createdByposition": 1610612735
     {       },
            "type_expandable": "known",{
                "usernamechildTypes": "admin",
                "userKeycontainer": "8a7f808567194a3501671de3af320095/rest/api/space/TEST",
                "accountIdmetadata": "557058:df961624-d453-4a63-922a-c947135a743b",
                "profilePictureoperations": {"",
                    "path": "/wiki/aa-avatar/b9367cb79e7f68e074e75e375f80b718?s=48&d=https%3A%2F%2Fthefreetelecomuni.atlassian.net%2Fwiki%2Fimages%2Ficons%2Fprofilepics%2Fdefault.png%3FnoRedirect%3Dtrue",     "children": "/rest/api/content/13238386/child",
                "widthrestrictions": 48"/rest/api/content/13238386/restriction/byOperation",
                    "heighthistory": 48"/rest/api/content/13238386/history",
                    "isDefault": false"ancestors": "",
                 }"body": "",
                "displayNameversion": "Jean-luc KRIKER",
                "_expandabledescendants": {
"/rest/api/content/13238386/descendant",
                   "operationsspace": "",/rest/api/space/TEST"
            },
            "details_links": "",{
                    "personalSpace": """self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238386",
                 }"tinyui": "/x/cgDK",
                "_linkseditui": {
   "/pages/resumedraft.action?draftId=13238386",
                "selfwebui": "https:/spaces/thefreetelecomuni.atlassian.net/wiki/rest/api/user?accountId=557058:df961624-d453-4a63-922a-c947135a743b"
   TEST/overview"
            }

           },
    ],
       "createdDatecontainer": "2018-12-08T06:44:35.315Z" {
        "id": }13238319,
        "_expandablekey": {"TEST",
            "settingsname": "/rest/api/space/TEST/settingstest",
   
        "metadatatype": "global",
            "operationsstatus": "current",
   
        "lookAndFeelhistory": "/rest/api/settings/lookandfeel?spaceKey=TEST",{
            "permissionscreatedBy": "",{
                "icontype": "known",
                "descriptionusername": "admin",
                "themeuserKey": "/rest/api/space/TEST/theme8a7f808567194a3501671de3af320095",
            "homepage": "/rest/api/content/13238386"
    "accountId": "557058:df961624-d453-4a63-922a-c947135a743b",
       },         "_linksprofilePicture": {
            "webui": "/spaces/TEST",             "self"path": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/space/TEST"/wiki/aa-avatar/b9367cb79e7f68e074e75e375f80b718?s=48&d=https%3A%2F%2Fthefreetelecomuni.atlassian.net%2Fwiki%2Fimages%2Ficons%2Fprofilepics%2Fdefault.png%3FnoRedirect%3Dtrue",
          }     },     "macroRenderedOutputwidth": {}48,
    "body": {                "storageheight": { 48,
                    "valueisDefault": false
"<p>This is a new page from curl Linux<br /> a new page</p>",     },
       "representation": "storage",         "displayName": "Jean-luc KRIKER",
   "embeddedContent": [],             "_expandable": {
                    "contentoperations": "/rest/api/content/13238405"",
            }         }"details": "",
        "_expandable": {             "editorpersonalSpace": "",
               "atlas_doc_format": "" },
            "view": "",    "_links": {
                    "export_viewself": "",https://thefreetelecomuni.atlassian.net/wiki/rest/api/user?accountId=557058:df961624-d453-4a63-922a-c947135a743b"
              "styled_view": "", }
           "editor2": "" },
            "anonymous_export_viewcreatedDate": """2018-12-08T06:44:35.315Z"
        },
    },     "extensions_expandable": {
            "positionsettings": 2013265919 "/rest/api/space/TEST/settings",
       },     "_expandablemetadata": {"",
            "childTypesoperations": "",
            "metadatalookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=TEST",
            "operationspermissions": "",
            "childrenicon": "/rest/api/content/13238405/child",
            "restrictionsdescription": "/rest/api/content/13238405/restriction/byOperation",
            "descendantstheme": "/rest/api/contentspace/13238405TEST/descendant"
    }theme",
    "_links": {
        "edituihomepage": "/pages/resumedraft.action?draftId=13238405"rest/api/content/13238386"
        },
        "webui_links": "/spaces/TEST/pages/13238405/page4",{
            "contextwebui": "/wikispaces/TEST",
            "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/contentspace/13238405",TEST"
        }
    },
    "tinyuimacroRenderedOutput": {},
    "/x/hQDK",body": {
        "collectionstorage": "/rest/api/content", {
            "basevalue": "https://thefreetelecomuni.atlassian.net/wiki"
    }
}
Code Block
titleon Windows Powershell
collapsetrue
<p>This is a new page from curl Linux<br /> a new page</p>",
            "representation": "storage",
            "embeddedContent": [],
            "_expandable": {
                "content": "/rest/api/content/13238405"
            }
        },
     
:
 
200
 
StatusDescription
 "_expandable": 
OK
{
Content
           
:
 
{"id":"13172807","type":"page","status":"current","title":"page7","space":{"id":13238319,"key":"TEST","name":"test","type":"global","s
"editor": "",
            "atlas_doc_format": "",
            
tatus
"view": "
current
",
            "export_
expandable
view":
{
 "
settings":"/rest/api/space/TEST/s... RawContent
",
            "styled_view": "",
       
:
 
HTTP/1.1
 
200
 
OK
  "editor2": "",
            "anonymous_export_view": ""
   
Vary:
 
Accept-Encoding
    }
    },
    "extensions": {
     
Strict-Transport-Security:
 
max-age=315360000;
 
includeSubDomains; preload
 "position": 2013265919
    },
    "_expandable": {
        
ATL-TraceId
"childTypes": 
8f579c96f93fecd7
"",
        "metadata": "",
        
X-XSS-Protection: 1; mode=block
"operations": "",
        "children": "/rest/api/content/13238405/child",
        
Transfer-Encoding: chu... Forms
"restrictions": "/rest/api/content/13238405/restriction/byOperation",
        "descendants": "/rest/api/content/13238405/descendant"
   
:
 
{
},
Headers
    "_links": {
     
:
 
{[Vary,
 
Accept-Encoding], [Strict-Transport-Security, max-age=315360000; includeSubDomains; preload], [ATL-TraceId
 "editui": "/pages/resumedraft.action?draftId=13238405",
        "webui": "/spaces/TEST/pages/13238405/page4",
        "context": 
8f579c96f93fecd7], [X-XSS-Protection, 1; mode=block]...} Images
"/wiki",
        "self": "https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/13238405",
      
:
 
{} InputFields : {} Links
 "tinyui": "/x/hQDK",
        
: {} ParsedHtml
"collection": "/rest/api/content",
        "base": 
mshtml.HTMLDocumentClass RawContentLength : 4460
"https://thefreetelecomuni.atlassian.net/wiki"
    }
}