5. Search Restrictions
Log in as a Confluence administrator, click "Confluence Administration"> "Page and Attachment Security Enhancer"> "Global Configuration", and select "Search Restrictions".
“Allow searching for attachments via web browsers and Rest Api“ default: on.