---
title: Overview
sidebar_position: 0
toc_min_heading_level: 2
toc_max_heading_level: 3
---

import { Tabs, TabItem } from '@astrojs/starlight/components';

TypeSpec REST protocol binding

## Install

<Tabs>
<TabItem  label="In a spec" default>

```bash
npm install @typespec/rest
```

</TabItem>
<TabItem  label="In a library" default>

```bash
npm install --save-peer @typespec/rest
```

</TabItem>
</Tabs>

## TypeSpec.Rest

### Decorators

- [`@action`](./decorators.md#@TypeSpec.Rest.action)
- [`@actionSeparator`](./decorators.md#@TypeSpec.Rest.actionSeparator)
- [`@autoRoute`](./decorators.md#@TypeSpec.Rest.autoRoute)
- [`@collectionAction`](./decorators.md#@TypeSpec.Rest.collectionAction)
- [`@copyResourceKeyParameters`](./decorators.md#@TypeSpec.Rest.copyResourceKeyParameters)
- [`@createsOrReplacesResource`](./decorators.md#@TypeSpec.Rest.createsOrReplacesResource)
- [`@createsOrUpdatesResource`](./decorators.md#@TypeSpec.Rest.createsOrUpdatesResource)
- [`@createsResource`](./decorators.md#@TypeSpec.Rest.createsResource)
- [`@deletesResource`](./decorators.md#@TypeSpec.Rest.deletesResource)
- [`@listsResource`](./decorators.md#@TypeSpec.Rest.listsResource)
- [`@parentResource`](./decorators.md#@TypeSpec.Rest.parentResource)
- [`@readsResource`](./decorators.md#@TypeSpec.Rest.readsResource)
- [`@resource`](./decorators.md#@TypeSpec.Rest.resource)
- [`@segment`](./decorators.md#@TypeSpec.Rest.segment)
- [`@segmentOf`](./decorators.md#@TypeSpec.Rest.segmentOf)
- [`@updatesResource`](./decorators.md#@TypeSpec.Rest.updatesResource)

## TypeSpec.Rest.Resource

### Interfaces

- [`ExtensionResourceCollectionOperations`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceCollectionOperations)
- [`ExtensionResourceCreate`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceCreate)
- [`ExtensionResourceCreateOrUpdate`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceCreateOrUpdate)
- [`ExtensionResourceDelete`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceDelete)
- [`ExtensionResourceInstanceOperations`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceInstanceOperations)
- [`ExtensionResourceList`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceList)
- [`ExtensionResourceOperations`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceOperations)
- [`ExtensionResourceRead`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceRead)
- [`ExtensionResourceUpdate`](./interfaces.md#TypeSpec.Rest.Resource.ExtensionResourceUpdate)
- [`ResourceCollectionOperations`](./interfaces.md#TypeSpec.Rest.Resource.ResourceCollectionOperations)
- [`ResourceCreate`](./interfaces.md#TypeSpec.Rest.Resource.ResourceCreate)
- [`ResourceCreateOrReplace`](./interfaces.md#TypeSpec.Rest.Resource.ResourceCreateOrReplace)
- [`ResourceCreateOrUpdate`](./interfaces.md#TypeSpec.Rest.Resource.ResourceCreateOrUpdate)
- [`ResourceDelete`](./interfaces.md#TypeSpec.Rest.Resource.ResourceDelete)
- [`ResourceInstanceOperations`](./interfaces.md#TypeSpec.Rest.Resource.ResourceInstanceOperations)
- [`ResourceList`](./interfaces.md#TypeSpec.Rest.Resource.ResourceList)
- [`ResourceOperations`](./interfaces.md#TypeSpec.Rest.Resource.ResourceOperations)
- [`ResourceRead`](./interfaces.md#TypeSpec.Rest.Resource.ResourceRead)
- [`ResourceUpdate`](./interfaces.md#TypeSpec.Rest.Resource.ResourceUpdate)
- [`SingletonResourceOperations`](./interfaces.md#TypeSpec.Rest.Resource.SingletonResourceOperations)
- [`SingletonResourceRead`](./interfaces.md#TypeSpec.Rest.Resource.SingletonResourceRead)
- [`SingletonResourceUpdate`](./interfaces.md#TypeSpec.Rest.Resource.SingletonResourceUpdate)

### Models

- [`CollectionWithNextLink`](./data-types.md#TypeSpec.Rest.Resource.CollectionWithNextLink)
- [`KeysOf`](./data-types.md#TypeSpec.Rest.Resource.KeysOf)
- [`ParentKeysOf`](./data-types.md#TypeSpec.Rest.Resource.ParentKeysOf)
- [`ResourceCollectionParameters`](./data-types.md#TypeSpec.Rest.Resource.ResourceCollectionParameters)
- [`ResourceCreatedResponse`](./data-types.md#TypeSpec.Rest.Resource.ResourceCreatedResponse)
- [`ResourceCreateModel`](./data-types.md#TypeSpec.Rest.Resource.ResourceCreateModel)
- [`ResourceCreateOrUpdateModel`](./data-types.md#TypeSpec.Rest.Resource.ResourceCreateOrUpdateModel)
- [`ResourceDeletedResponse`](./data-types.md#TypeSpec.Rest.Resource.ResourceDeletedResponse)
- [`ResourceError`](./data-types.md#TypeSpec.Rest.Resource.ResourceError)
- [`ResourceParameters`](./data-types.md#TypeSpec.Rest.Resource.ResourceParameters)
