# Instance

**Kind**: interface | **Module**: [Interop](https://docs.interop.io/desktop/reference/javascript/interop/index.md) | **Access**: `io.interop.instance`

**Source**: https://docs.interop.io/desktop/reference/javascript/interop/instance/index.html

Each Interop application is identified by its Interop instance, which is a set of known key/value pairs.

## Properties

- **`api`** (`string`, optional)
  API version
- **`application`** (`string`, optional)
  Unique application name.
- **`applicationName`** (`string`, optional)
  Application name
- **`environment`** (`string`, optional)
  Environment in which the application is running.
- **`instance`** (`string`, optional)
  (IOConnect Desktop) Unique string identifying the application.
- **`isLocal`** (`boolean`, optional)
  (IOConnect Desktop) A flag indicating whether the instance is running on a local machine or not. Taken into account when a Gateway mesh is present - local instances are preferred when invoking methods.
- **`machine`** (`string`, optional)
  Name of the machine the instance is running on.
- **`peerId`** (`string`, optional)
  (IOConnect Desktop) Gateway peer ID of the instance.
- **`pid`** (`number`, optional)
  Process ID of the instance.
- **`region`** (`string`, optional)
  Region in which the application is running.
- **`service`** (`string`, optional)
  Service string of the application.
- **`user`** (`string`, optional)
  Name of the user who has started the instance.
- **`windowId`** (`string`, optional)
  (IOConnect Desktop) Window ID of the instance. Only set if running in a IOConnect window.

## Methods

### getMethods

Returns all methods registered by that instance.

```ts
() => Method[]
```

**Returns**: `Method[]`

### getStreams

Returns all streams registered by that instance.

```ts
() => Method[]
```

**Returns**: `Method[]`

## Related types

- [Method](https://docs.interop.io/desktop/reference/javascript/interop/method/index.md)
