# Get contents

_Cms / Contents_

`GET /v2/cms/contents/{projectId}`

## Parameters

- `contentId` (number, optional) — Filter by specific content ID
- `pageId` (number, optional) — Filter by page ID
- `type` (number, optional) — Filter by content type ID
- `slug` (string, optional) — Filter by content slug (supports base64 encoding)
- `q` (string, optional) — Search query for content
- `category` (number, optional) — Filter by category ID
- `isPublished` (boolean, optional) — Filter by published status
- `isLatest` (boolean, optional) — Filter for latest content only
- `sort` (number, optional) — Sort order (0-4, representing different sorting types)
- `from` (number, optional) — Starting index for pagination (default: 0)
- `to` (number, optional) — Ending index for pagination (default: 1)

## Responses

### `200` — Contents retrieved successfully

Type: `PagedResponse<ContentDto>`



## Code Examples

### curl

```curl
curl --request GET \
 --url 'https://apis-spb.konso.io/v2/cms/contents/{projectId}?category=1&isPublished=true&from=0&to=10' \
 --header 'x-api-key: {your-api-key}'
```

### javascript

```js
const options = {
 method: 'GET',
 headers: {
 'x-api-key': '{your-api-key}'
 }
};

fetch('https://apis-spb.konso.io/v2/cms/contents/{projectId}?category=1&isPublished=true&from=0&to=10', options)
 .then(response => response.json())
 .then(response => console.log(response))
 .catch(err => console.error(err));
```

### Response Example (200)

```json
{
 "list": [
  {
   "id": 1,
   "title": "My Article",
   "slug": "my-article",
   "summary": "Brief summary",
   "isPublished": true,
   "categoryId": 1
  }
 ],
 "total": 25
}
```
