# Interface HistoryApi

interface HistoryApi {
getContexts(query: TimeRangeParams): Promise<ContextsResponse>;
getPaths(query: TimeRangeParams): Promise<PathsResponse>;
getValues(query: ValuesRequest): Promise<ValuesResponse>;
}

- Defined in history.ts:151

##### Index

### Methods

getContexts
getPaths
getValues

## Methods

### getContexts

- getContexts(query: TimeRangeParams): Promise<ContextsResponse>

  Lists available contexts for which historical data can be queried.

  #### Parameters

  - query: TimeRangeParams

    The ContextsRequest specifying time range and filters.

  #### Returns Promise<ContextsResponse>

  A promise that resolves to a ContextsResponse array of available contexts.

  - Defined in history.ts:169

### getPaths

- getPaths(query: TimeRangeParams): Promise<PathsResponse>

  Lists available paths for historical data queries.

  #### Parameters

  - query: TimeRangeParams

    The PathsRequest specifying time range and filters.

  #### Returns Promise<PathsResponse>

  A promise that resolves to a PathsResponse array of available paths.

  - Defined in history.ts:177

### getValues

- getValues(query: ValuesRequest): Promise<ValuesResponse>

  Retrieves historical values for the specified query parameters.

  For aggregation methods that require parameters (sma, ema), implementations should use sensible defaults if the parameter array is empty in the PathSpec. For example: sma could default to 5 samples, ema could default to 0.2 alpha.

  #### Parameters

  - query: ValuesRequest

    The ValuesRequest containing context, time range, resolution, and path specifications.

  #### Returns Promise<ValuesResponse>

  A promise that resolves to a ValuesResponse containing the requested historical data.

  - Defined in history.ts:161