Copy as Markdown[View as Markdown](/docs/sdk/functions/getChangelog.md)

***

# Function: getChangelog()

> **getChangelog**(`catalogDir`): (`id`, `options`) => `Promise`<`Changelog`>

Defined in: changelogs.ts:153

Returns the changelog for a resource in EventCatalog.

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter    | Type     |
| ------------ | -------- |
| `catalogDir` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter          | Type                     |
| ------------------ | ------------------------ |
| `id`               | `string`                 |
| `options`          | { `version`: `string`; } |
| `options.version`? | `string`                 |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`Changelog`>

## Example[​](#example "Direct link to Example")

```
import utils from '@eventcatalog/utils';

const { getChangelog } = utils('/path/to/eventcatalog');

// Get the changelog for a resource
const changelog = await getChangelog('OrderCreated');

// Get the changelog for a specific version
const changelog = await getChangelog('OrderCreated', { version: '1.0.0' });
```
