---
title: "Studio API Reference"
framework: angular
version: "2.1.2"
---

# Studio API Reference

To access the API, see [Studio API](https://www.ag-grid.com/studio/angular/studio-interface#studio-api).

## Data

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `reload` | `Function` |  | Reload all data from the data sources. See [Reloading Data](https://www.ag-grid.com/studio/angular/sync-data#reloading-data). |

## Lifecycle

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `destroy` | `Function` |  | Will destroy the Studio instance and release resources. If you are using a framework you do not need to call this, as Studio links in with the framework lifecycle. However if you are using native JavaScript, you need to call this to avoid a memory leak in your application. |
| `getStudioId` | `Function` |  | Returns the `studioId` for the current Studio instance as specified via the Studio property `studioId` or the auto assigned Studio ID if none was provided. |

## Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `getProperty` | `Function` |  | Returns the Studio properties value for a provided key. See [Studio Properties](https://www.ag-grid.com/studio/angular/studio-properties/). |
| `setProperty` | `Function` |  | Updates a single Studio property to the new value provided. (Cannot be used on `Initial` properties.) If updating multiple options, it is recommended to instead use `api.updateProperties()` which batches update logic. See [Studio Properties](https://www.ag-grid.com/studio/angular/studio-properties/). |
| `updateProperties` | `Function` |  | Updates the provided subset of Studio properties with the provided values. (Cannot be used on `Initial` properties.) See [Studio Properties](https://www.ag-grid.com/studio/angular/studio-properties/). |

## State

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `getState` | `Function` |  | Get the current state of Studio. Can be used in conjunction with the `initialState` Studio property or `api.setState()` to save and restore Studio state. See [Saving and Restoring State](https://www.ag-grid.com/studio/angular/state/). |
| `setState` | `Function` |  | Set the current state of Studio. Can be used in conjunction with `api.getState()` or `onStateUpdated` to save and restore Studio state. The state is expected to be a full state object, not a partial state object. State must be updated immutably as Studio uses reference equality to determine which parts of state have changed. See [Saving and Restoring State](https://www.ag-grid.com/studio/angular/state/). |

## Widgets

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `performWidgetAction` | `Function` |  | Execute an action for a widget. Action can be one of the default actions (`'duplicate'` or `'delete'`), or an action specific to that widget. See [Widget Toolbar Actions](https://www.ag-grid.com/studio/angular/widget-configuration#widget-toolbar-actions). |
