Home > kibana-plugin-core-server > ScopedClusterClient
Serves the same purpose as "normal" ClusterClient
but exposes additional callAsCurrentUser
method that doesn't use credentials of the Kibana internal user (as callAsInternalUser
does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.
See ScopedClusterClient.
Signature:
export declare class ScopedClusterClient implements IScopedClusterClient
Constructor | Modifiers | Description |
---|---|---|
(constructor)(internalAPICaller, scopedAPICaller, headers) | Constructs a new instance of the ScopedClusterClient class |
Method | Modifiers | Description |
---|---|---|
callAsCurrentUser(endpoint, clientParams, options) | Calls specified endpoint with provided clientParams on behalf of the user initiated request to the Kibana server (via HTTP request headers). See APICaller. |
|
callAsInternalUser(endpoint, clientParams, options) | Calls specified endpoint with provided clientParams on behalf of the Kibana internal user. See APICaller. |