Forums

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

What does matchIndex and numMatches stand for inline comment?

Parth June 29, 2022

I have two questions and would be happy if someone is able to answer it.

 

1.  What does the following properties mean?

"inlineProperties": {
"originalSelection": "dog",
"markerRef": "72afba78-2932-4d46-a600-263b33f0793d",
"numMatches": 1, <--------- What is this for??
"matchIndex": 0, <--------- What is this for??
"serializedHighlights": "dog",
"lastFetchTime": "1234567890" <--------- What is this for??
},

2. How can I add an inline comment when the word I am targeting appears multiple time in my content body? 

I am trying to create an inline comment to a word that appears multiple times on the page.

The word dog appears 7 times, I am trying to add inline comment to 5th one with markref set to "72afba78-2932-4d46-a600-263b33f0793d"

 

The error that I am getting:

Screen Shot 2022-06-29 at 1.31.18 PM.png

 

Page which I am trying to recreate:

Screen Shot 2022-06-29 at 10.25.39 AM.png

 

1 answer

0 votes
Rodrigo C
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!
July 6, 2022

Hi @Parth

As I haven't found an official description for each of these attributes yet, the following definitions are based only on my tests, but please keep in mind that these definitions are not official, not documented and may change over time.

Always consider the Confluence Cloud REST API the ultimate source of truth when it comes to API documentation.

  • markerRef:
    Arbitrary marker.
    String
    Not required
  • numMatches:
    Number of matches of the selected text. Has to be 1.
    Required
    Integer
  • matchIndex:
    Index of the matching text. Has to be 0.
    Required
    Integer
  • serializedHighlights:
    I could not determine its purpose. It accepts multiple data types.
    Required
    String
  • lastFetchTime:
    UNIX epoch timestamp of when the comment was last fetched.
    Required
    Integer

This post might also be useful to your use case How do we add an in-line comment to Confluence content using the REST API?  

 

Hope this helps! :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events