---
url: /nestjs-odata/api/generated/functions/getKeyProperties.md
---
# Function: getKeyProperties()

> **getKeyProperties**(`target`): `string`\[]

Defined in: [decorators/odata-key.decorator.ts:21](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/decorators/odata-key.decorator.ts#L21)

Read all key property names registered via @ODataKey() on a class

## Parameters

### target

`object`

## Returns

`string`\[]
