> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/writer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/writer/6.3.4/api-reference/writerapi/api.md).

# Api

Top level api object from which all other api modules are available.

### Properties

| Name          | Type            | Description                                                                      |
| ------------- | --------------- | -------------------------------------------------------------------------------- |
| article       | `Article`       | **Required** - See [Article](/writer/6.3.4/api-reference/writerapi/article.md)   |
| document      | `Document`      | **Required** - See [Document](/writer/6.3.4/api-reference/writerapi/document.md) |
| newsItem      | `NewsItem`      | **Required** - See [NewsItem](/writer/6.3.4/api-reference/writerapi/newsitem.md) |
| events        | `Events`        | **Required** - See [Events](/writer/6.3.4/api-reference/writerapi/events.md)     |
| router        | `Router`        | **Required** - See [Router](/writer/6.3.4/api-reference/writerapi/router.md)     |
| browser       | `Browser`       | **Required** - See [Browser](/writer/6.3.4/api-reference/writerapi/browser.md)   |
| ui            | `Ui`            | **Required** - See [Ui](/writer/6.3.4/api-reference/writerapi/ui.md)             |
| upload        | `Upload`        | **Required** - See [Upload](/writer/6.3.4/api-reference/writerapi/upload.md)     |
| settings      | `Settings`      | **Required** - See [Settings](/writer/6.3.4/api-reference/writerapi/settings.md) |
| user          | `User`          | **Required** - See [User](/writer/6.3.4/api-reference/writerapi/user.md)         |
| history       | `History`       | **Required** -                                                                   |
| stateHandler  | `StateHandler`  | **Required** - Reference to a StateHandler                                       |
| editorSession | `EditorSession` | **Required** - Substance editorSession                                           |
| doc           | `Doc`           | **Required** - The editorSession document                                        |

## getVersion() ⇒ `string` <a href="#getversion" id="getversion"></a>

Get current version of the Writer

**Returns**: `string` - Version tag

## getConfigValue(id, path, defaultValue) ⇒ `*` <a href="#getconfigvalue" id="getconfigvalue"></a>

Get configuration value in a plugins local configuration data section. If no path is given the full configuration object for the plugin instance is returned.

**Returns**: `*` - The value of the wanted configuration path or default value

### Parameters

| Param        | Type     | Description                                                    |
| ------------ | -------- | -------------------------------------------------------------- |
| id           | `string` | **Required -** Plugin id to fetch configuration value for      |
| path         | `string` | **Required -** Optional configuration path in the data section |
| defaultValue | `*`      | **Required -** Optional default value if no value is found     |

### Example

```javascript
{
   "vendor": "vendor.tld",
   "name": "myplugin",
   "enabled": true,
   "data": {
     "mykey": "Configuration value"
   }
 },
```

### Example

```javascript
import {api} from 'writer'
var apiEndpoint = api.getConfigValue('myplugin', 'mykey');`
```

## hasLocalConfiguration() ⇒ `Boolean` <a href="#haslocalconfiguration" id="haslocalconfiguration"></a>

Check if the configuration has been overridden with local configuration

## getPluginModule(moduleId) ⇒ `Object` <a href="#getpluginmodule" id="getpluginmodule"></a>

Return a fresh instance of a specific plugin provided module

### Parameters

| Param    | Type     | Description              |
| -------- | -------- | ------------------------ |
| moduleId | `string` | **Required -** Module id |

## getPluginModulesForTarget(targetId) <a href="#getpluginmodulesfortarget" id="getpluginmodulesfortarget"></a>

Get modules targeted at a specific consumer

### Parameters

| Param    | Type     | Description                              |
| -------- | -------- | ---------------------------------------- |
| targetId | `string` | **Required -** Target id of the consumer |
