n8n-nodes-proxmox
Version:
n8n community node for Proxmox Virtual Environment (VE) API integration with VM, container, storage, and cluster management capabilities
103 lines (100 loc) • 2.3 kB
text/typescript
import { ICredentialType, INodeProperties } from 'n8n-workflow';
export class ProxMoxApi implements ICredentialType {
name = 'proxMoxApi';
displayName = 'ProxMox VE API';
documentationUrl = 'https://pve.proxmox.com/wiki/Proxmox_VE_API';
properties: INodeProperties[] = [
{
displayName: 'Host',
name: 'host',
type: 'string',
default: '',
placeholder: 'proxmox.example.com',
required: true,
description: 'The hostname or IP address of your ProxMox VE server',
},
{
displayName: 'Port',
name: 'port',
type: 'number',
default: 8006,
required: true,
description: 'The port of your ProxMox VE server (default: 8006)',
},
{
displayName: 'Authentication Method',
name: 'authMethod',
type: 'options',
options: [
{
name: 'API Token',
value: 'apiToken',
description: 'Use API Token authentication (recommended)',
},
{
name: 'Username/Password',
value: 'userPass',
description: 'Use username and password authentication',
},
],
default: 'apiToken',
required: true,
},
{
displayName: 'User',
name: 'username',
type: 'string',
default: '',
placeholder: 'root@pam',
required: true,
displayOptions: {
show: {
authMethod: ['userPass'],
},
},
description: 'Username with realm (e.g., root@pam, user@pve)',
},
{
displayName: 'Password',
name: 'password',
type: 'string',
typeOptions: { password: true },
default: '',
required: true,
displayOptions: {
show: {
authMethod: ['userPass'],
},
},
description: 'Password for the user',
},
{
displayName: 'API Token ID',
name: 'tokenId',
type: 'string',
default: '',
placeholder: 'PVEAPIToken=user@realm!tokenid=uuid',
required: true,
displayOptions: {
show: {
authMethod: ['apiToken'],
},
},
description: 'Full API Token in format: PVEAPIToken=USER@REALM!TOKENID=UUID',
},
{
displayName: 'Skip SSL Verification',
name: 'skipSslVerify',
type: 'boolean',
default: false,
description: 'Whether to skip SSL certificate verification. Use with caution.',
},
{
displayName: 'Timeout',
name: 'timeout',
type: 'number',
default: 30000,
description: 'Request timeout in milliseconds',
},
];
}