0

I'm trying to create new content page from confluence REST api.

Any page created with REST API show up in old editor view. I have tried editor2 option instead of storage and also i tried with metadata(Example), but no luck.

Is there any solution by which i can create page in new editor (v2) from REST API of confluence.

1 Answer 1

1

Found this example on Atlassian.net and it works for me:

curl -u 'user:apitoken' -H 'content-type: application/json' \
  'https://hello.atlassian.net/wiki/rest/api/content' \
  -d '{
  "type": "page",
  "title": "Page created via API",
  "space": {
    "key": "TEST"
  },
  "body": {
    "storage": {
      "value": "<h1>Test page</h1>",
      "representation": "storage"
    }
  },
  "metadata": {
    "properties": {
      "editor": {
        "value": "v2"
      }
    }
  }
}'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.