This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-5b563fe2-dd10-4e75-ac10-6d94b3bbef22 XWIKI-22297 Open

Mage attachment rest endpoints return a count

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-06a6563c-dae3-4fc4-bd65-b7c525d037b3 Manuel Leduc created this issue on 24/Jun/24 16:00
 
Summary: Mage attachment rest endpoints return a count
Issue Type: cid:jira-generated-image-avatar-5b563fe2-dd10-4e75-ac10-6d94b3bbef22 Improvement
Affects Versions: 4.3-milestone-2
Assignee: Unassigned
Components: REST
Created: 24/Jun/24 16:00
Priority: cid:jira-generated-image-static-major-6b258553-fb0a-4456-9b4f-b747672642f8 Major
Reporter: Manuel Leduc
Description:

Currently, there is no easy way to get the attachment count of a page (see https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiRESTfulAPI#HAttachmentsresources)

  • no explicit count is ever returned
  • with the default parameters, the full list of attachments is returned, so it's possible to have the total count from the length of the attachments array, at the price of a possibly very large response body
  • a number parameter exists, but only truncate the size of the returned attachments array, without providing the total count

Note: this issue is about attachments count, but the same is true for other resource kinds (e.g., xobjects).