Not converted to markdown format when creating page using API

Tomiyama Yuichi _SQEX_
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2024

As shown in the API below, I am specifying "representation": "wiki", but I am having trouble because it is not converted.

Please tell me how to solve it.

 

 api

body_value=$(cat textfile)

curl POST "https://${DOMAIN}/wiki/api/v2/pages" \
--user "${USER}:${TOKEN}" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data @- <​<EOS
{
"spaceId": "xxx",
"status": "current",
"title": "markdown test",
"parentId": "xxx"
"body": {
"representation": "wiki",
"value": "${body_value}"
}
}

 

textfile

markdown_text.png

 

result

markdown_failure.png

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 22, 2024

Hi @Tomiyama Yuichi _SQEX_  - Welcome to the Atlassian Community!

See if this article helps any:

https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events