Opensearch dashboards.legacyscopedclusterclient
Home > opensearch-dashboards > LegacyScopedClusterClient
LegacyScopedClusterClient class
Warning: This API is now obsolete.
Serves the same purpose as the normal cluster client but exposes an additional asCurrentUser
method that doesn't use credentials of the OpenSearch Dashboards internal user (as asInternalUser
does) to request OpenSearch API, but rather passes HTTP headers extracted from the current user request to the API instead.
Signature:
export declare class LegacyScopedClusterClient implements ILegacyScopedClusterClient
Implements: ILegacyScopedClusterClient
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(internalAPICaller, scopedAPICaller, headers, auditor) | Constructs a new instance of the LegacyScopedClusterClient class |
Methods
Method | Modifiers | Description |
---|---|---|
callAsCurrentUser(endpoint, clientParams, options) | Calls specified endpoint with provided clientParams on behalf of the user initiated request to the OpenSearch Dashboards server (via HTTP request headers). See LegacyAPICaller. |
|
callAsInternalUser(endpoint, clientParams, options) | Calls specified endpoint with provided clientParams on behalf of the OpenSearch Dashboards internal user. See LegacyAPICaller. |