How add a new property to an page on Confluence via REST API?

Rafael Costa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2022

I need update the classification of some pages, then I found it at https://developer.atlassian.com/cloud/confluence/rest/api-group-content-properties/#api-wiki-rest-api-content-id-property-key-post:

curl --request POST \ --url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "value": [ "<string>" ] }'

 

But there is something wrong in my curl that returns error 500:

curl \
-X POST \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"value":{
"name":{
"value":"Interno",
"search":"Interno",
"index":2
},
"icon":{
"url":"/images/blue.png"
}
}
"version":{
"number":null
}
}' \
-u $user:$password \
"https://your-domain.atlassian.net/rest/api/content/111578749/property/classification"

 

someone could help me to fix it??

4 answers

0 votes
animal learns
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!
January 7, 2024

I also have a question about photo editing api but no one is responding..

Regard

Tiger

0 votes
animal learns
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!
January 3, 2024

How can my website use an auto-ai photo-editing API?

Regarded

Tiger

0 votes
areeqa
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!
January 1, 2024

i also have a question how can i use API on my website? 
philodendron

0 votes
Discord fonts June 19, 2022

i am also looking for my answer. Thanks

Alexander Michael October 19, 2022

how can i use auto ai photo editing API on my website? please help

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events