---
url: "https://vueda.dev/v3/reference/api/js/router/getCrud/functions/getCRUDForTo.md"
title: "getCRUDForTo"
---

# getCRUDForTo

## Overview

Get the route configuration for a CRUD operation.

## Signature

`getCRUDForTo(params)`

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-params">params</span> | `object` | yes | The parameters. |

#### params Properties

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="param-params-app">app</span> | `string` |  |  | The app name. |
| <span id="param-params-model">model</span> | `string` |  |  | The model name. |
| <span id="param-params-pk">pk</span> | `string \| string[]` |  |  | One primary key, which targets the detail route, or an array     of keys, which targets the list route with one repeated `pk` query value per key. An empty array     is no selection. |
| <span id="param-params-query">query</span> | `any` |  |  | Other query values for the target. Pass keys through `pk`; a     `pk` entry here throws. |
| <span id="param-params-view">view</span> | `string` |  |  | The view name. |

### Returns

`Promise`

The route configuration.

### Throws

- When `query` has a `pk` entry.

## Source

`client/lib/router/getCrud.js:28`
