# IPushPullApi

Canonical page: https://www.adaptabletools.com/docs/reference/ipushpullapi

The ipushpull plugin: login, the current report, and sending a snapshot or live data.

```ts title="TypeScript"
export interface IPushPullApi 
```

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [addNewIPushPullPage(folder, page)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#addnewipushpullpage) | `void` | Adds a new page to ipushpull using given name in the supplied folder |
| [getAutoLogin()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getautologin) | `boolean` | Retrieves `AutoLogin` from ipushpull options; if `true` AdapTable will automatically log user in to ipushpull at start-up |
| [getCurrentIPushPullPassword()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getcurrentipushpullpassword) | `string \| undefined` | Retrieves `Password` from ipushpull state -- AFTER someone logs in |
| [getCurrentIPushPullUsername()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getcurrentipushpullusername) | `string \| undefined` | Retrieves `Username` from ipushpull state - AFTER someone logs in |
| [getCurrentLiveIPushPullReport()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getcurrentliveipushpullreport) | [`IPushPullReport`](https://www.adaptabletools.com/docs/reference/ipushpullreport.md)` \| undefined` | Retrieves current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page |
| [getFolderIdForName(folderName)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getfolderidforname) | `number` | Gets the Id of the ipushpull folder / Domain with the given name |
| [getIPushPullDomains()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getipushpulldomains) | [`IPushPullDomain`](https://www.adaptabletools.com/docs/reference/ipushpulldomain.md)`[]` | Retrieves all the ipushpull domain to which the current user has access<br/><br/>An `IPushPullDomain` contains 3 properties:<br/><br/>- **Name**: the name of the Domain / Folder<br/><br/>- **FolderId**: the number of the Domain / Folder<br/><br/>- **Pages**: a string array containing the names of all the Pages in the Folder |
| [getIPushPullInstance()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getipushpullinstance) | `any` | Retrieves the current ipushpull instance (if one has been provided by the User at design time in ipushpull state) |
| [getIPushPullPassword()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getipushpullpassword) | `string \| undefined` | Retrieves `Password` from ipushpull options (if provided) |
| [getIPushPullThrottleTime()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getipushpullthrottletime) | `number \| undefined` | Retrieves Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes) |
| [getIPushPullUsername()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getipushpullusername) | `string \| undefined` | Retrieves `Username` from ipushpull options (if provided) |
| [getPagesForIPushPullDomain(domain)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#getpagesforipushpulldomain) | `string[]` | Retrieves all pages in given ipushpull domain |
| [includeSystemReports()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#includesystemreports) | `boolean` | Whether to display System Reports in ipushpull toolbar |
| [isIPushPullAvailable()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#isipushpullavailable) | `boolean \| undefined` | Checks if an ipushpull instance has been provided by the user |
| [isIPushPullLiveDataRunning()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#isipushpulllivedatarunning) | `boolean \| undefined` | Checks if a report is sending Live Data to ipushpull |
| [isIPushPullReportLive(report)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#isipushpullreportlive) | `boolean` | Checks if given report is currently &#39;live&#39; (i.e. sending updates as data changes) |
| [isIPushPullRunning()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#isipushpullrunning) | `boolean \| undefined` | Checks to see if ipushpull is running (i.e. a user has successfully logged in) |
| [loginToIPushPull(userName, password)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#logintoipushpull) | `void` | Logins in user to ipushpull with given credentials; if successful ipushpull toolbar will display full set of controls |
| [logoutFromIPushPull()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#logoutfromipushpull) | `void` | Logs out the current user from ipushpull (changes ipushpull toolbar to show Login button) |
| [sendSnapshot(iPushPullReport)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#sendsnapshot) | `void` | Publishes an ipushpull Report as a one-off export (i.e. with no live data) |
| [setIPushPullDomains(IPushPullDomains)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#setipushpulldomains) | `void` | Sets given Domains as those for the current User |
| [setIPushPullInstance(ippInstance)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#setipushpullinstance) | `void` | Replaces the ipushpull instance AdapTable is using. Prefer the login methods. |
| [setIPushPullThrottleTime(throttleTime)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#setipushpullthrottletime) | `void` | Sets Throttle time for ipushpull; how often a Live report will update ipushpull (if data changes) |
| [showIPushPullPopup()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#showipushpullpopup) | `void` | Opens iPushPullPopup (though its currently empty!) |
| [startLiveData(iPushPullReport)](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#startlivedata) | `void` | Publishes ipushpull Report as Live Data; any changes to underlying data in report will be sent to ipushpull<br/><br/>When this happens the &#39;play&#39; button in the ipushpull toolbar changes to a red &#39;pause&#39; button |
| [stopLiveData()](https://www.adaptabletools.com/docs/reference/ipushpullapi.md#stoplivedata) | `void` | Pauses current Live Data report<br/><br/>When this happens the &#39;pause&#39; button in the ipushpull toolbar changes back to a &#39;play&#39; button |

## Method Details

### addNewIPushPullPage

Adds a new page to ipushpull using given name in the supplied folder

```ts title="TypeScript"
addNewIPushPullPage(folder: string, page: string): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| folder | `string` | the name of the folder where the page will be added |
| page | `string` | tbe name of the page to add |

###### Returns

`void`

### getAutoLogin

Retrieves `AutoLogin` from ipushpull options; if `true` AdapTable will automatically log user in to ipushpull at start-up

```ts title="TypeScript"
getAutoLogin(): boolean;
```

###### Returns

 `AutoLogin` from ipushpull options; if `true` AdapTable will automatically log user in to ipushpull at start-up

`boolean`

### getCurrentIPushPullPassword

Retrieves `Password` from ipushpull state -- AFTER someone logs in

```ts title="TypeScript"
getCurrentIPushPullPassword(): string | undefined;
```

###### Returns

 `Password` from ipushpull state -- AFTER someone logs in

`string | undefined`

### getCurrentIPushPullUsername

Retrieves `Username` from ipushpull state - AFTER someone logs in

```ts title="TypeScript"
getCurrentIPushPullUsername(): string | undefined;
```

###### Returns

 `Username` from ipushpull state - AFTER someone logs in

`string | undefined`

### getCurrentLiveIPushPullReport

Retrieves current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page

```ts title="TypeScript"
getCurrentLiveIPushPullReport(): IPushPullReport | undefined;
```

###### Returns

 Current ipushpull Report from ipushpull state; A Report contains Name, Folder and ipushpull Page

[`IPushPullReport`](https://www.adaptabletools.com/docs/reference/ipushpullreport.md)` | undefined`

### getFolderIdForName

Gets the Id of the ipushpull folder / Domain with the given name

```ts title="TypeScript"
getFolderIdForName(folderName: string): number;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| folderName | `string` | the ipushpull folder name |

###### Returns

 The Id of the ipushpull folder / Domain with the given name

`number`

### getIPushPullDomains

Retrieves all the ipushpull domain to which the current user has access

An `IPushPullDomain` contains 3 properties:

- **Name**: the name of the Domain / Folder

- **FolderId**: the number of the Domain / Folder

- **Pages**: a string array containing the names of all the Pages in the Folder

```ts title="TypeScript"
getIPushPullDomains(): IPushPullDomain[];
```

###### Returns

 All the ipushpull domain to which the current user has access An `IPushPullDomain` contains 3 properties: - **Name**: the name of the Domain / Folder - **FolderId**: the number of the Domain / Folder - **Pages**: a string array containing the names of all the Pages in the Folder

[`IPushPullDomain`](https://www.adaptabletools.com/docs/reference/ipushpulldomain.md)`[]`

### getIPushPullInstance

Retrieves the current ipushpull instance (if one has been provided by the User at design time in ipushpull state)

```ts title="TypeScript"
getIPushPullInstance(): any;
```

###### Returns

 The current ipushpull instance (if one has been provided by the User at design time in ipushpull state)

`any`

### getIPushPullPassword

Retrieves `Password` from ipushpull options (if provided)

```ts title="TypeScript"
getIPushPullPassword(): string | undefined;
```

###### Returns

 `Password` from ipushpull options (if provided)

`string | undefined`

### getIPushPullThrottleTime

Retrieves Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes)

```ts title="TypeScript"
getIPushPullThrottleTime(): number | undefined;
```

###### Returns

 Throttle Time from ipushpull State; how often a Live report will update ipushpull (if data changes)

`number | undefined`

### getIPushPullUsername

Retrieves `Username` from ipushpull options (if provided)

```ts title="TypeScript"
getIPushPullUsername(): string | undefined;
```

###### Returns

 `Username` from ipushpull options (if provided)

`string | undefined`

### getPagesForIPushPullDomain

Retrieves all pages in given ipushpull domain

```ts title="TypeScript"
getPagesForIPushPullDomain(domain: string): string[];
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| domain | `string` | ipushpull folder which contains the pages |

###### Returns

 All pages in given ipushpull domain

`string[]`

### includeSystemReports

Whether to display System Reports in ipushpull toolbar

```ts title="TypeScript"
includeSystemReports(): boolean;
```

###### Returns

 `true` when to display System Reports in ipushpull toolbar

`boolean`

### isIPushPullAvailable

Checks if an ipushpull instance has been provided by the user

```ts title="TypeScript"
isIPushPullAvailable(): boolean | undefined;
```

###### Returns

 `true` when an ipushpull instance has been provided by the user

`boolean | undefined`

### isIPushPullLiveDataRunning

Checks if a report is sending Live Data to ipushpull

```ts title="TypeScript"
isIPushPullLiveDataRunning(): boolean | undefined;
```

###### Returns

 `true` when a report is sending Live Data to ipushpull

`boolean | undefined`

### isIPushPullReportLive

Checks if given report is currently &#39;live&#39; (i.e. sending updates as data changes)

```ts title="TypeScript"
isIPushPullReportLive(report: IPushPullReport): boolean;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| report | [`IPushPullReport`](https://www.adaptabletools.com/docs/reference/ipushpullreport.md) | the report to check |

###### Returns

 `true` when given report is currently &#39;live&#39; (i.e. sending updates as data changes)

`boolean`

### isIPushPullRunning

Checks to see if ipushpull is running (i.e. a user has successfully logged in)

```ts title="TypeScript"
isIPushPullRunning(): boolean | undefined;
```

###### Returns

 `true` when a user is logged in to ipushpull

`boolean | undefined`

### loginToIPushPull

Logins in user to ipushpull with given credentials; if successful ipushpull toolbar will display full set of controls

```ts title="TypeScript"
loginToIPushPull(userName: string, password: string): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| userName | `string` | userName to send to ipushpull |
| password | `string` | password to send to ipushpull |

###### Returns

`void`

### logoutFromIPushPull

Logs out the current user from ipushpull (changes ipushpull toolbar to show Login button)

```ts title="TypeScript"
logoutFromIPushPull(): void;
```

###### Returns

`void`

### sendSnapshot

Publishes an ipushpull Report as a one-off export (i.e. with no live data)

```ts title="TypeScript"
sendSnapshot(iPushPullReport: IPushPullReport): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| iPushPullReport | [`IPushPullReport`](https://www.adaptabletools.com/docs/reference/ipushpullreport.md) | the report to publish |

###### Returns

`void`

### setIPushPullDomains

Sets given Domains as those for the current User

```ts title="TypeScript"
setIPushPullDomains(IPushPullDomains: IPushPullDomain[]): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| IPushPullDomains | [`IPushPullDomain`](https://www.adaptabletools.com/docs/reference/ipushpulldomain.md)`[]` | the ipushpull Domains to set |

###### Returns

`void`

### setIPushPullInstance

Replaces the ipushpull instance AdapTable is using. Prefer the login methods.

```ts title="TypeScript"
setIPushPullInstance(ippInstance: any): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| ippInstance | `any` | ipushpull instance to use |

###### Returns

`void`

### setIPushPullThrottleTime

Sets Throttle time for ipushpull; how often a Live report will update ipushpull (if data changes)

```ts title="TypeScript"
setIPushPullThrottleTime(throttleTime: number): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| throttleTime | `number` | new throttle time to use |

###### Returns

`void`

### showIPushPullPopup

Opens iPushPullPopup (though its currently empty!)

```ts title="TypeScript"
showIPushPullPopup(): void;
```

###### Returns

`void`

### startLiveData

Publishes ipushpull Report as Live Data; any changes to underlying data in report will be sent to ipushpull

When this happens the &#39;play&#39; button in the ipushpull toolbar changes to a red &#39;pause&#39; button

```ts title="TypeScript"
startLiveData(iPushPullReport: IPushPullReport): void;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| iPushPullReport | [`IPushPullReport`](https://www.adaptabletools.com/docs/reference/ipushpullreport.md) | the report to publish |

###### Returns

`void`

### stopLiveData

Pauses current Live Data report

When this happens the &#39;pause&#39; button in the ipushpull toolbar changes back to a &#39;play&#39; button

```ts title="TypeScript"
stopLiveData(): void;
```

###### Returns

`void`
