Hi there, we are using an external service for search and want to provide tons of meta-data info. One which includes the status of page content whether it is published or not. Since the service can't fetch the isActivated properties, we are creating a custom meta-data field that exposes the status of the page. Can this be done?
When you think of the AEM content architecture, the public-facing AEM environment, which is the publish instances, would only store activated resources. Therefore if your external service is reading data from an AEM publish instances, they will never be able to see these unpublished resources.
If however, your third party service is directly accessing your AEM author instance, then they will be able to retrieve every cq:Page node, and read the cq:lastReplicationAction attribute. Definetly I would review the external service API to understand what it is doing before thinking about using the AEM author as a data source, as in most cases are not best practice.
And why are you allowing users to search your un-publish web pages? Unpublished pages are unpublished for a reason?