> ## 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.Credentials

## Overview

Encrypted credential store for datasource access. Manages app registrations (Canva, OAuth providers), user-scoped credential mappings, and generic credentials used by data connectors and integrations.

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

***

## 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/credentials/app-registration`                       | Get App Registrations                         |
| `GET`    | `/api/v1/credentials/app-registration/currentUser`           | Get App Registrations By Current User         |
| `GET`    | `/api/v1/credentials/app-registration/{appRegistrationId}`   | Get App Registration                          |
| `DELETE` | `/api/v1/credentials/app-registration/{appRegistrationId}`   | Delete App Registration                       |
| `POST`   | `/api/v1/credentials/app-registration/store`                 | Store App Registration                        |
| `GET`    | `/api/v1/credentials/app-registration/types`                 | Get Credential Provider Types                 |
| `POST`   | `/api/v1/credentials/app-registration/store/canva`           | Store Canva App Registrations By Current User |
| `GET`    | `/api/v1/credentials/{provider}/auth/init`                   | Init Auth                                     |
| `GET`    | `/api/v1/credentials/{provider}/auth/callback`               | Callback                                      |
| `GET`    | `/api/v1/credentials/pads/apiurl/{type}`                     | Get Api Url                                   |
| `POST`   | `/api/v1/credentials/pads/getaccesstoken`                    | Get Access Token P O S T                      |
| `GET`    | `/api/v1/credentials/pads/accesstoken/{tokenid}`             | Get Access Token G E T                        |
| `POST`   | `/api/v1/credentials/pads/tokens`                            | Get Tokens                                    |
| `GET`    | `/api/v1/credentials/token`                                  | Get Tokens                                    |
| `POST`   | `/api/v1/credentials/token/store`                            | Store Tokens                                  |
| `DELETE` | `/api/v1/credentials/token/{tokenId}`                        | Delete Token                                  |
| `POST`   | `/api/v1/credentials/token/getToken`                         | Get Access Token                              |
| `POST`   | `/api/v1/credentials/token/oauth`                            | Get O Auth Token                              |
| `GET`    | `/api/v1/credentials/user-registration`                      | Get User Registrations                        |
| `GET`    | `/api/v1/credentials/user-registration/{azureAdUserId}`      | Get User Registration                         |
| `DELETE` | `/api/v1/credentials/user-registration/{azureAdUserId}`      | Delete Azure Ad Token                         |
| `POST`   | `/api/v1/credentials/user-registration/store`                | Store User Registration                       |
| `GET`    | `/api/v1/credentials/config`                                 | Get Configs                                   |
| `GET`    | `/api/v1/credentials/config/{type}`                          | Get Config                                    |
| `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/credentials/app-registration`

**Request:**

```bash theme={null}
curl -b cookies.txt -X GET 'https://<your-server>/rdx/NDS.Services.Credentials/api/v1/credentials/app-registration'
```

**Response `200 OK`:**

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

***

### GET `/api/v1/credentials/app-registration/currentUser`

**Request:**

```bash theme={null}
curl -b cookies.txt -X GET 'https://<your-server>/rdx/NDS.Services.Credentials/api/v1/credentials/app-registration/currentUser'
```

**Response `200 OK`:**

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

***

### GET `/api/v1/credentials/app-registration/{appRegistrationId}`

**Request:**

```bash theme={null}
curl -b cookies.txt -X GET 'https://<your-server>/rdx/NDS.Services.Credentials/api/v1/credentials/app-registration/{appRegistrationId}'
```

**Response `200 OK`:**

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

***

### DELETE `/api/v1/credentials/app-registration/{appRegistrationId}`

**Request:**

```bash theme={null}
curl -b cookies.txt -X DELETE 'https://<your-server>/rdx/NDS.Services.Credentials/api/v1/credentials/app-registration/{appRegistrationId}'
```

**Response `200 OK`:**

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

***

### POST `/api/v1/credentials/app-registration/store`

**Request:**

```bash theme={null}
curl -b cookies.txt -X POST 'https://<your-server>/rdx/NDS.Services.Credentials/api/v1/credentials/app-registration/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}
```

***

### GET `/api/v1/credentials/app-registration/types`

**Request:**

```bash theme={null}
curl -b cookies.txt -X GET 'https://<your-server>/rdx/NDS.Services.Credentials/api/v1/credentials/app-registration/types'
```

**Response `200 OK`:**

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

***

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