Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

serializeStateToUrlParam() function

serializeStateToUrlParam() function

Create an string that is used in URL to represent the Explore state. This is basically just a stringified json that is that used as a state of a single Explore pane so it does not represent full Explore URL.

Signature

typescript
export declare function serializeStateToUrlParam(urlState: ExploreUrlState, compact?: boolean): string;

Import

typescript
import { serializeStateToUrlParam } from '@grafana/data';

Parameters

ParameterTypeDescription
urlStateExploreUrlState
compactbooleanthis parameter is deprecated and will be removed in a future release.

Returns:

string