I want to find a way to update the comment of a old version attachment of a confluence page. I've tried the rest api /rest/api/content/{id}/child/attachment/{attachmentId}, but it seems that this rest api can only update the comment of the latest version of the attachment of a confluence page. If I tried to update old version one, the confluence log will throw an exception:
java.lang.IllegalArgumentException: The attachment to be moved must be the latest version.
at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.moveAttachment(AbstractHibernateAttachmentDao.java:392)
at com.atlassian.confluence.pages.attachments.CachingAttachmentDao.moveAttachment(CachingAttachmentDao.java:208)
at com.atlassian.confluence.pages.DefaultAttachmentManager.moveAttachment(DefaultAttachmentManager.java:408)
at com.atlassian.confluence.pages.DefaultAttachmentManager.moveAttachment(DefaultAttachmentManager.java:419)
at com.atlassian.confluence.pages.DelegatorAttachmentManager.moveAttachment(DelegatorAttachmentManager.java:181)
at com.atlassian.confluence.pages.CachingAttachmentManager.moveAttachment(CachingAttachmentManager.java:143)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.