# ovok_sdk.resources.content

Canonical page: https://docs.ovok.com/python-sdk/reference/resources/content

Project-managed CMS content by content type and language.

## ContentResource [#contentresource]

```python
ContentResource(http: HttpClient)
```

Create, read, update and copy the project's CMS content entries.

Every entry is addressed by its content type, language and key.
Created by `Ovok`; access it as `ovok.content`.

### search() [#search]

```python
search(content_type: str, language: str, params: QueryParams | None = None) -> Resource
```

Search the entries of a content type in one language.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type, such as `"faq"`. |
| `language` | `str` |  | The language code, such as `"en"`. |
| `params` | `QueryParams \| None` | `None` | Optional query parameters passed to the API. |

**Returns**

- `Resource`: The search result.

### retrieve() [#retrieve]

```python
retrieve(content_type: str, language: str, key: str) -> Resource
```

Read one entry.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |
| `key` | `str` |  | The entry key. |

**Returns**

- `Resource`: The entry.

### create() [#create]

```python
create(content_type: str, language: str, body: Resource) -> Resource
```

Create an entry.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |
| `body` | `Resource` |  | The entry as the API takes it. |

**Returns**

- `Resource`: The created entry.

### update() [#update]

```python
update(content_type: str, language: str, key: str, body: Resource) -> Resource
```

Replace an entry.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |
| `key` | `str` |  | The entry key. |
| `body` | `Resource` |  | The new entry. |

**Returns**

- `Resource`: The updated entry.

### delete() [#delete]

```python
delete(content_type: str, language: str, key: str) -> None
```

Delete an entry.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |
| `key` | `str` |  | The entry key. |

### map() [#map]

```python
map(content_type: str, language: str, params: QueryParams | None = None) -> Resource
```

Read a content type's entries in one language as a key-to-entry map.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |
| `params` | `QueryParams \| None` | `None` | Optional query parameters passed to the API. |

**Returns**

- `Resource`: The map of entries by key.

### copy_from_parent() [#copy_from_parent]

```python
copy_from_parent(content_type: str, language: str, key: str) -> Resource
```

Copy one entry from the parent project into this project.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |
| `key` | `str` |  | The entry key. |

**Returns**

- `Resource`: The copied entry.

### copy_all_from_parent() [#copy_all_from_parent]

```python
copy_all_from_parent(content_type: str, language: str) -> Resource
```

Copy every entry of a content type and language from the parent project.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `content_type` | `str` |  | The content type. |
| `language` | `str` |  | The language code. |

**Returns**

- `Resource`: The API's copy result.
