How to access the system indices like .kibana* indices in the latest elasticsearch version

In our project, we have a service that takes the backup of different system indices like .kibana* indices. When I access them using the rest API, I am getting the following deprecation warning:

{"type": "deprecation.elasticsearch", "timestamp": "2022-02-17T10:04:04,446Z", "level": "DEPRECATION", "component": "o.e.d.c.m.IndexNameExpressionResolver", "": "project-1", "": "elasticsearch", "message": "this request accesses system indices: [.kibana_7.15.2_001], but in a future major version, direct access to system indices will be prevented by default", "key": "open_system_index_access", "cluster.uuid": "47qJK-ibTqS2U83rHQdWiQ", "": "rtXy8ASwQAGKO7pFmWZY9Q" }

I am using kibana 7.15.2 and Elasticsearch 7.15.2 but when we shall upgrade Elasticsearch to version 8 i shall not be able to access the system indices using this API:


Can anyone tell me how to solve this problem?

Read more here: Source link