The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
John Funk
Community Champion
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/

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events