Versions Compared

Key

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

...



create an childĀ  in Python


Code Block
titlecreate an child
    # add ancestor ( parent_id)
    if parent_id != None:
                dpayload['ancestors'] = [{'type':"page",'id':parent_id}]


json for postman


Code Block
titlejson code
"ancestors":{"type":"page","id":108331009}

--- don't forget the commas "," at the end of the previous line:
--- don't forget the square bracket " [ "   &    " ] " 

,
"ancestors": [
  {
    "type":"page",
    "id":"108331009"
  }
],


Code Block
titlePOST with curl on windows Powershell
collapsetrue


curl -Method POST -ContentType 'application/json'  -Body '{"type":"page","title":"child_page7",
"space":{"key":"TEST"},"body":{"storage":{"value":"<p>This is a new page from curl Linux<br/> a new page</p>","representation":
"storage"}},"ancestors":[{"type":"page","id":"108331009"}]}' -user username:password -v https://thefreetelecomuni.atlassian.net/wiki/rest/api/content/