Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,465,224
Community Members
 
Community Events
176
Community Groups

Create Inline commands in Confluence

Hi all,

I try to transfer some confluence spaces from one instance to another via Rest API in a python script.
With this I try to transfer the inline commands and could not found any current API documentation for that topic.

I found an old question:

https://community.atlassian.com/t5/Answers-Developer-Questions/How-do-we-add-an-in-line-comment-to-Confluence-content-using-the/qaq-p/493729

In this post is described to set the properties:

  • numMatches
  • matchIndex
  • serializedHighlights

But if I check the original JSON from my source comment, I could not found this properties. There is only a property "markerRef".

Have anyone any hints for this problem or a current API doc?

Regards
Daniel

 

1 answer

Here is my code snippet:

 

        body_dict = {
            "type": comment['type'],
            "mode": "create",
            "container":
            {
                "id": page_id,
                "type": comment['container']['type'],
                "status": comment['container']['status']      
            },
            "body": {
                "storage": {
                    "value": comment['body']['storage']['value'],
                    "representation": comment['body']['storage']['representation']
                }
            },
            "extensions": {      
                "location": comment['extensions']['location'],
                "inlineProperties": {
                    #"numMatches": 1,
                    "originalSelection": comment['extensions']['inlineProperties']['originalSelection'],
                    "lastFetchTime":"1487711412"
                    #"matchIndex": 0,
                    #"markerRef": comment['extensions']['inlineProperties']['markerRef'],
                    #"serializedHighlights" : "[[\"Hello From me\"]]"
                }              
            }
        }
       

        body = json.dumps(body_dict)

Daniel Klein Did you find the answer for your question? I am running into 405 making the similar call ?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events