> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pads4.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NDS.Services.Cms

## Overview

The Content Management Service manages PADS4 messages, playlists, and templates. Supports full CRUD for CMS messages, thumbnail generation, scheduling, and playlist management. Core service for all content authoring workflows.

| Field           | Value                                                                |
| --------------- | -------------------------------------------------------------------- |
| Swagger UI      | `https://<your-server>/rdx/NDS.Services.Cms/swagger/index.html`      |
| OpenAPI spec    | `https://<your-server>/rdx/NDS.Services.Cms/swagger/v1/swagger.json` |
| Base URL        | `https://<your-server>/rdx/NDS.Services.Cms`                         |
| Total endpoints | 38                                                                   |

***

## Authentication

All endpoints use the standard PADS4 session cookie. Obtain it once and reuse:

```bash theme={null}
# Log in and save the session cookie
curl -c cookies.txt -X POST 'https://<your-server>/api/v1/Account/Logon' \
  -H 'Content-Type: application/json' \
  -d '{"UserName": "admin", "Password": "yourpassword", "Domain": "yourdomain"}'

# Use the cookie on all subsequent requests
curl -b cookies.txt -X GET 'https://<your-server>/rdx/<ServiceName>/...'
```

> Replace `https://<your-server>` with your PADS4 server address and `<ServiceName>` with the service path shown above.

***

## Endpoint Reference

| Method   | Path                                                         | Description                      |
| -------- | ------------------------------------------------------------ | -------------------------------- |
| `GET`    | `/api/v1/cms/message/thumbnail/{messageId}`                  | Get Thumbnail                    |
| `GET`    | `/api/v1/cms/message/{messageId}`                            | Get Message                      |
| `DELETE` | `/api/v1/cms/message/{messageId}`                            | Delete Message                   |
| `POST`   | `/api/v1/cms/message`                                        | Get Messages                     |
| `POST`   | `/api/v1/cms/message/store`                                  | Store Message                    |
| `POST`   | `/api/v1/cms/message/order`                                  | Order Messages                   |
| `POST`   | `/api/v1/cms/message/messages/delete`                        | Delete Messages                  |
| `POST`   | `/api/v1/cms/permissions/getHierarchyPermissions`            | Get Hierarchy Permissions        |
| `POST`   | `/api/v1/cms/templatecategory`                               | Get Template Categories          |
| `POST`   | `/api/v1/cms/templatecategory/store`                         | Store Template Category          |
| `DELETE` | `/api/v1/cms/templatecategory/{templateCategoryId}`          | Delete Template Category         |
| `POST`   | `/api/v1/cms/templatecategory/permission`                    | Get Permissions                  |
| `POST`   | `/api/v1/cms/templatecategory/setpermission`                 | Set Permissions                  |
| `GET`    | `/api/v1/cms/template/{templateId}`                          | Get Template                     |
| `DELETE` | `/api/v1/cms/template/{templateId}`                          | Delete Template                  |
| `GET`    | `/api/v1/cms/template/thumbnail/{templateId}`                | Get Thumbnail                    |
| `POST`   | `/api/v1/cms/template`                                       | Get Templates                    |
| `POST`   | `/api/v1/cms/template/order`                                 | Order Template                   |
| `POST`   | `/api/v1/cms/template/store`                                 | Store Template                   |
| `DELETE` | `/api/v1/cms/template/{templateId}/keep-messages`            | Delete Template Keeping Messages |
| `POST`   | `/api/v1/cms/template/permission`                            | Get Permissions                  |
| `POST`   | `/api/v1/cms/template/setpermission`                         | Set Permissions                  |
| `GET`    | `/api/v1/ReplicationClient/Diagnostics/contentTransferState` | Get Content Transfer State       |
| `GET`    | `/api/v1/ReplicationClient/Diagnostics/busDiagnostics`       | Get Bus Diagnostics              |
| `GET`    | `/api/v1/diagnostics/toggles`                                | Get Toggles                      |
| `GET`    | `/api/v1/diagnostics/configuration`                          | Get Config Section               |
| `GET`    | `/api/v1/diagnostics/configurationex`                        | Get Configuration                |
| `GET`    | `/api/v1/diagnostics/circuitbreakers`                        | Get Circuit Breakers             |
| `GET`    | `/api/v1/diagnostics/circuitbreakers/reset`                  | Reset Circuit Breaker            |
| `GET`    | `/api/v1/diagnostics/circuitbreakers/isolate`                | Isolate Circuit Breaker          |
| `POST`   | `/api/v1/diagnostics/events`                                 | Get Events                       |
| `GET`    | `/api/v1/health`                                             | Get                              |
| `GET`    | `/api/v1/health/clean`                                       | Get Clean                        |
| `POST`   | `/api/v1/Management/RequeueErrorMessages`                    | Requeue Error Messages           |
| `POST`   | `/api/v1/Management/PurgeErrorMessages`                      | Purge Error Messages             |
| `GET`    | `/migration`                                                 | Get Migrations                   |
| `POST`   | `/migration`                                                 | Execute Migration                |
| `GET`    | `/version`                                                   | Get                              |

***

## Request & Response Examples

### GET `/api/v1/cms/message/thumbnail/{messageId}`

**Request:**

```bash theme={null}
curl -b cookies.txt -X GET 'https://<your-server>/rdx/NDS.Services.Cms/api/v1/cms/message/thumbnail/{messageId}'
```

**Response `200 OK`:**

```json theme={null}
{"Id": 1, "Name": "Example Item", "IsActive": true, "Code": "OK", "Succeeded": true}
```

***

### GET `/api/v1/cms/message/{messageId}`

**Request:**

```bash theme={null}
curl -b cookies.txt -X GET 'https://<your-server>/rdx/NDS.Services.Cms/api/v1/cms/message/{messageId}'
```

**Response `200 OK`:**

```json theme={null}
{"Id": 1, "Name": "Example Item", "IsActive": true, "Code": "OK", "Succeeded": true}
```

***

### DELETE `/api/v1/cms/message/{messageId}`

**Request:**

```bash theme={null}
curl -b cookies.txt -X DELETE 'https://<your-server>/rdx/NDS.Services.Cms/api/v1/cms/message/{messageId}'
```

**Response `200 OK`:**

```json theme={null}
{"Code": "OK", "Succeeded": true, "Message": null}
```

***

### POST `/api/v1/cms/message`

**Request:**

```bash theme={null}
curl -b cookies.txt -X POST 'https://<your-server>/rdx/NDS.Services.Cms/api/v1/cms/message' \
  -H 'Content-Type: application/json' \
  -d '{"PageIndex": 0, "PageSize": 20}'
```

**Response `200 OK`:**

```json theme={null}
{"Items": [], "TotalCount": 0, "PageIndex": 0, "PageSize": 20, "Code": "OK", "Succeeded": true}
```

***

### POST `/api/v1/cms/message/store`

**Request:**

```bash theme={null}
curl -b cookies.txt -X POST 'https://<your-server>/rdx/NDS.Services.Cms/api/v1/cms/message/store' \
  -H 'Content-Type: application/json' \
  -d '{"Id": null, "Name": "Example", "IsActive": true}'
```

**Response `200 OK`:**

```json theme={null}
{"Id": 42, "Code": "OK", "Succeeded": true, "Message": null}
```

***

### POST `/api/v1/cms/message/order`

**Request:**

```bash theme={null}
curl -b cookies.txt -X POST 'https://<your-server>/rdx/NDS.Services.Cms/api/v1/cms/message/order' \
  -H 'Content-Type: application/json' \
  -d '{"PageIndex": 0, "PageSize": 20}'
```

**Response `200 OK`:**

```json theme={null}
{"Items": [], "TotalCount": 0, "PageIndex": 0, "PageSize": 20, "Code": "OK", "Succeeded": true}
```

***

> Additional endpoints follow the same patterns shown above. See the Swagger UI for full parameter schemas.
