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 8 Current »

1- create the child

2- list the child




create an child  in Python
create an child
    # add ancestor ( parent_id)
    if parent_id != None:
                dpayload['ancestors'] = [{'type':"page",'id':parent_id}]
json for postman


json 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"
  }
],


POST with curl on windows Powershell
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/













  • No labels