|
| 1 | +--- |
| 2 | +title: "Credentials" |
| 3 | +description: "Credentials API for managing authentication credentials in ChangeTracker" |
| 4 | +sidebar_position: 10 |
| 5 | +--- |
| 6 | + |
| 7 | +# Credentials |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +The Credentials API allows you to manage authentication credentials used by ChangeTracker to connect to various systems and services. This API provides endpoints for creating, retrieving, updating, and deleting credentials for different credential types including Shell, Database, FTP, Cloud, ESX, ITSM, and Splunk. |
| 12 | + |
| 13 | +Credentials are identified by a unique key and include various parameters specific to the credential type. The API requires authentication and the `CredentialsManage` permission to perform operations. |
| 14 | + |
| 15 | +## Endpoints |
| 16 | + |
| 17 | +### Get Credentials |
| 18 | + |
| 19 | +Retrieves credentials for a specified type and key. |
| 20 | + |
| 21 | +**HTTP Request** |
| 22 | +``` |
| 23 | +GET /credentials |
| 24 | +``` |
| 25 | + |
| 26 | +**Query Parameters** |
| 27 | +| Parameter | Type | Required | Description | |
| 28 | +|-----------|------|----------|-------------| |
| 29 | +| key | string | Yes | Unique identifier for the credentials | |
| 30 | +| type | string | Yes | Type of credentials (Shell, Database, FTP, Cloud, ESX, ITSM, Splunk) | |
| 31 | + |
| 32 | +**Response** |
| 33 | +Returns a Credentials object with the following properties: |
| 34 | + |
| 35 | +```json |
| 36 | +{ |
| 37 | + "Version": 0, |
| 38 | + "CredentialType": "Shell", |
| 39 | + "DeviceOnlineDetection": "None", |
| 40 | + "Key": "example-key", |
| 41 | + "PublicKeys": ["string"], |
| 42 | + "Parameters": {"username": "user", "password": "***"}, |
| 43 | + "Prompts": ["string"], |
| 44 | + "LastModifiedDateUtc": "2025-08-21T10:23:32.0000000Z", |
| 45 | + "IsTrusted": true, |
| 46 | + "NotTrustedReason": "", |
| 47 | + "DiscoveryTaskId": 0, |
| 48 | + "DiscoveryStatusMessage": "", |
| 49 | + "DiscoveryTaskStatus": "Complete" |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +### Create Credentials |
| 54 | + |
| 55 | +Adds new credentials for a specified type and key. |
| 56 | + |
| 57 | +**HTTP Request** |
| 58 | +``` |
| 59 | +POST /credentials/add |
| 60 | +``` |
| 61 | + |
| 62 | +**Authentication** |
| 63 | +Requires authentication and the `CredentialsManage` permission. |
| 64 | + |
| 65 | +**Request Body** |
| 66 | +```json |
| 67 | +{ |
| 68 | + "Credentials": { |
| 69 | + "CredentialType": "Shell", |
| 70 | + "DeviceOnlineDetection": "None", |
| 71 | + "Key": "example-key", |
| 72 | + "PublicKeys": ["string"], |
| 73 | + "Parameters": {"username": "user", "password": "secret"}, |
| 74 | + "Prompts": ["string"], |
| 75 | + "DecryptionErrors": {}, |
| 76 | + "LastModifiedDateUtc": "2025-08-21T10:23:32.0000000Z", |
| 77 | + "IsTrusted": false, |
| 78 | + "NotTrustedReason": "", |
| 79 | + "DiscoveryTaskId": 0, |
| 80 | + "DiscoveryStatusMessage": "", |
| 81 | + "DiscoveryTaskStatus": "AwaitingPickup" |
| 82 | + } |
| 83 | +} |
| 84 | +``` |
| 85 | + |
| 86 | +**Parameters** |
| 87 | +| Parameter | Type | Required | Description | |
| 88 | +|-----------|------|----------|-------------| |
| 89 | +| CredentialType | enum | Yes | Type of credential (Unknown, Shell, Database, FTP, Cloud, ESX, ITSM, Splunk) | |
| 90 | +| DeviceOnlineDetection | enum | No | Method for detecting if device is online (None, Ping, TcpConnect) | |
| 91 | +| Key | string | Yes | Unique identifier for the credentials | |
| 92 | +| PublicKeys | array | No | List of public keys | |
| 93 | +| Parameters | object | Yes | Dictionary of credential parameters (e.g., username, password) | |
| 94 | +| Prompts | array | No | List of prompts | |
| 95 | +| IsTrusted | boolean | No | Whether the credential is trusted | |
| 96 | + |
| 97 | +**Response** |
| 98 | +Returns the created Credentials object. |
| 99 | + |
| 100 | +### Update Credentials |
| 101 | + |
| 102 | +Updates existing credentials for a specified type and key. |
| 103 | + |
| 104 | +**HTTP Request** |
| 105 | +``` |
| 106 | +POST /credentials/update |
| 107 | +``` |
| 108 | + |
| 109 | +**Authentication** |
| 110 | +Requires authentication and the `CredentialsManage` permission. |
| 111 | + |
| 112 | +**Request Body** |
| 113 | +Similar to the Create Credentials endpoint, but updates an existing credential. |
| 114 | + |
| 115 | +**Response** |
| 116 | +Returns the updated Credentials object. |
| 117 | + |
| 118 | +### Delete Credentials |
| 119 | + |
| 120 | +Deletes credentials for a specified type and key. |
| 121 | + |
| 122 | +**HTTP Request** |
| 123 | +``` |
| 124 | +POST /credentials/delete |
| 125 | +``` |
| 126 | + |
| 127 | +**Authentication** |
| 128 | +Requires authentication and the `CredentialsManage` permission. |
| 129 | + |
| 130 | +**Query Parameters** |
| 131 | +| Parameter | Type | Required | Description | |
| 132 | +|-----------|------|----------|-------------| |
| 133 | +| key | string | Yes | Unique identifier for the credentials to delete | |
| 134 | +| type | string | Yes | Type of credentials to delete | |
| 135 | + |
| 136 | +**Response** |
| 137 | +Returns a success status code (200) if the credentials were successfully deleted. |
| 138 | + |
| 139 | +## Credential Types |
| 140 | + |
| 141 | +The following credential types are supported: |
| 142 | + |
| 143 | +| Type | Description | |
| 144 | +|------|-------------| |
| 145 | +| Shell | Command-line shell credentials | |
| 146 | +| Database | Database connection credentials | |
| 147 | +| FTP | File Transfer Protocol credentials | |
| 148 | +| Cloud | Cloud service credentials | |
| 149 | +| ESX | VMware ESX/ESXi credentials | |
| 150 | +| ITSM | IT Service Management credentials | |
| 151 | +| Splunk | Splunk credentials | |
| 152 | + |
| 153 | +## Online Detection Methods |
| 154 | + |
| 155 | +The following online detection methods are available: |
| 156 | + |
| 157 | +| Method | Description | |
| 158 | +|--------|-------------| |
| 159 | +| None | No online detection | |
| 160 | +| Ping | Use ICMP ping to detect if device is online | |
| 161 | +| TcpConnect | Use TCP connection to detect if device is online | |
0 commit comments