# getApi

Accesses the current Grid's typed API and app context. Read from a fully initialized element.

Canonical: https://grid.syidax.com/docs/methods/getApi/

<a id="meaning"></a>

## What does this API do?

Accesses the current Grid's typed API and app context. Read from a fully initialized element.

<a id="contract"></a>

## Exact input and result types

```typescript
getApi<TData = GridData, TContext = unknown, TValue = unknown, TFilterModel = unknown>(): Promise<SyGridApi<TData, TContext, TValue, TFilterModel>>
```

| Arguments | Required | Type |
| --- | --- | --- |

The return type is `Promise<SyGridApi<TData, TContext, TValue, TFilterModel>>`.

<a id="usage"></a>

## Usage flow

After registering and initializing the Grid element, call grid.getApi(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<a id="types"></a>

## Read related types

- [GridData](https://grid.syidax.com/docs/types/GridData.md)
- [SyGridApi](https://grid.syidax.com/docs/types/SyGridApi.md)

<a id="recipes"></a>

## Feature explanations and examples

- [Data and events](https://grid.syidax.com/docs/guides/data-event-access.md) — Grid APIs read or change the current state; events report the results of user interactions or data changes. Combine them to build save buttons, detail panels, and change histories.
