api-n8n-node/nodes/MozOutMz/descriptions/ServersDescription.ts
2026-11-28 15:28:09 +02:00

973 lines
24 KiB
TypeScript

// Generated from the OpenAPI specification. Do not edit by hand: regenerate.
import type { INodeProperties } from 'n8n-workflow';
export const serversOperations: INodeProperties[] = [{
"displayName": "Operation",
"name": "operation",
"type": "options",
"noDataExpression": true,
"displayOptions": {
"show": {
"resource": [
"server"
]
}
},
"options": [
{
"name": "List the servers",
"value": "list",
"description": "Needs `vps:read`. The active and suspended servers of the account, the newest first. The state comes from a recent copy; `state_checked_at` says when it was read, and is null if it has not been read...",
"action": "List the servers",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "See a server",
"value": "get",
"description": "Needs `vps:read`. The state comes from a copy up to 60 seconds old. If it cannot be read now, `state_stale` is true and the last known state is shown. The states of `power_state` are `running`,...",
"action": "See a server",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}"
}
}
},
{
"name": "See the traffic of the month",
"value": "trafficGet",
"description": "Needs `vps:read`. Traffic this month, per day and in total, in GB. Comes from a copy up to 5 minutes old.",
"action": "See the traffic of the month",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/traffic"
}
}
},
{
"name": "List the systems to reinstall",
"value": "operatingSystemsList",
"description": "Needs `vps:read`. The systems this server can install. Use the `id` in the reinstall operation.",
"action": "List the systems to reinstall",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/operating-systems"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "List the backups",
"value": "backupsList",
"description": "Needs `vps:read`. `kind` is `automatic` or `on_demand`. A server has at most 4 backups, counting the automatic ones. The `id` changes when the backup changes. Comes from a copy up to 2 minutes old.",
"action": "List the backups",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/backups"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "Make a backup",
"value": "backupsCreate",
"description": "Needs `vps:write`. Answers `202`; the backup can take up to 50 minutes to appear. With 4 backups it answers `409` with `backup_limit_reached`.",
"action": "Make a backup",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/backups",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "Start a server",
"value": "start",
"description": "Needs `vps:write`. Answers `202`. It takes about 2 minutes. If it is already running, `409` with `already_running`.",
"action": "Start a server",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/start",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "Stop a server",
"value": "stop",
"description": "Needs `vps:write`. Answers `202`. It can take about 6 minutes. If it is already stopped, `409` with `already_stopped`.",
"action": "Stop a server",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/stop",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "Restart a server",
"value": "restart",
"description": "Needs `vps:write`. Answers `202`. If it is stopped, `409` with `server_stopped`.",
"action": "Restart a server",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/restart",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "Generate a new root password",
"value": "passwordChange",
"description": "Needs `vps:password`. This permission is separate from `vps:write` and off by default, because the answer brings the root password. Needs the name of the server in `confirm`. The server restarts to...",
"action": "Generate a new root password",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/password",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "See the reverse DNS",
"value": "reverseDnsGet",
"description": "Needs `vps:read`. The name of each IP of the server. `hostname` is null while it is the default one. Comes from a copy up to 5 minutes old.",
"action": "See the reverse DNS",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/reverse-dns"
}
}
},
{
"name": "Change the reverse DNS",
"value": "reverseDnsUpdate",
"description": "Needs `vps:write`. If the list of IPs of the server cannot be read, it answers `502` and nothing changes. Only the IPs of this server, up to 64. An empty `hostname` clears it. `changed` says how many...",
"action": "Change the reverse DNS",
"routing": {
"request": {
"method": "PUT",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/reverse-dns"
}
}
},
{
"name": "See the time zone",
"value": "timezoneGet",
"description": "Needs `vps:read`. The last time zone saved, and the ones you can choose. `timezone` is null if none was chosen yet.",
"action": "See the time zone",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/timezone"
}
}
},
{
"name": "Change the time zone",
"value": "timezoneUpdate",
"description": "Needs `vps:write`. Answers `202`. The action ends after about 2 minutes, without a check on the server.",
"action": "Change the time zone",
"routing": {
"request": {
"method": "PUT",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/timezone"
}
}
},
{
"name": "Reinstall a server",
"value": "reinstall",
"description": "Needs `vps:reinstall`. Deletes everything on the server. Needs `Idempotency-Key`, the name of the server in `confirm`, and `backup_first`. With `backup_first` true, it first makes a backup and...",
"action": "Reinstall a server",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/reinstall",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "Restore a backup",
"value": "restore",
"description": "Needs `vps:restore`. The server goes back to the state of the backup: everything changed after it is lost. Needs `Idempotency-Key` and the name of the server in `confirm`. Up to 3 per hour, counting...",
"action": "Restore a backup",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/restore",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "Server extras",
"value": "extrasGet",
"description": "Needs `vps:read`. What an additional IP and extra disk cost on this server: `monthly_amount` is added to each renewal and `amount_today` is paid now, from today to the next renewal. Without tax...",
"action": "Server extras",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/extras"
}
}
},
{
"name": "Buy a server extra",
"value": "extrasPurchase",
"description": "Needs `billing:purchase`. Also needs `vps:write`. `type` is `ip` or `disk`; a disk takes `size_gb` (10, 20, 50 or 100, up to 100 GB extra). `expected_amount` is optional: if sent and the price...",
"action": "Buy a server extra",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/servers/{{encodeURIComponent(String($parameter[\"id\"]))}}/extras",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
}
],
"default": "list"
}];
export const serversFields: INodeProperties[] = [
{
"displayName": "Query Parameters",
"name": "queryParameters",
"type": "collection",
"placeholder": "Add Parameter",
"default": {},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"list"
]
}
},
"options": [
{
"displayName": "Page",
"name": "page",
"type": "number",
"default": 1,
"typeOptions": {
"numberPrecision": 0
},
"description": "The page number. The first is 1.",
"routing": {
"send": {
"type": "query",
"property": "page"
}
}
},
{
"displayName": "Per Page",
"name": "per_page",
"type": "number",
"default": 10,
"typeOptions": {
"numberPrecision": 0
},
"description": "Results per page, from 1 to 100. The default is 10.",
"routing": {
"send": {
"type": "query",
"property": "per_page"
}
}
},
{
"displayName": "Status",
"name": "status",
"type": "string",
"default": "",
"description": "Filter by `active` or `suspended`.",
"routing": {
"send": {
"type": "query",
"property": "status"
}
}
}
]
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"get"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"trafficGet"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"operatingSystemsList"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"backupsList"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"backupsCreate"
]
}
}
},
{
"displayName": "Name",
"name": "name",
"type": "string",
"default": "",
"required": true,
"description": "Letters, digits, dot, hyphen and underscore, up to 30.",
"routing": {
"send": {
"type": "body",
"property": "name"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"backupsCreate"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"start"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"stop"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"restart"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"passwordChange"
]
}
}
},
{
"displayName": "Confirm",
"name": "confirm",
"type": "string",
"default": "",
"required": true,
"description": "The `name` of the server, to confirm.",
"routing": {
"send": {
"type": "body",
"property": "confirm"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"passwordChange"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reverseDnsGet"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reverseDnsUpdate"
]
}
}
},
{
"displayName": "Records",
"name": "records",
"type": "json",
"default": "[]",
"required": true,
"routing": {
"send": {
"type": "body",
"property": "records",
"value": "={{ typeof $value === \"string\" ? ($value.trim() === \"\" ? undefined : JSON.parse($value)) : $value }}"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reverseDnsUpdate"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"timezoneGet"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"timezoneUpdate"
]
}
}
},
{
"displayName": "Timezone",
"name": "timezone",
"type": "string",
"default": "",
"required": true,
"routing": {
"send": {
"type": "body",
"property": "timezone"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"timezoneUpdate"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reinstall"
]
}
}
},
{
"displayName": "Confirm",
"name": "confirm",
"type": "string",
"default": "",
"required": true,
"description": "The `name` of the server, to confirm.",
"routing": {
"send": {
"type": "body",
"property": "confirm"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reinstall"
]
}
}
},
{
"displayName": "Operating System",
"name": "operating_system",
"type": "string",
"default": "",
"required": true,
"description": "The `id` of the system, from the list.",
"routing": {
"send": {
"type": "body",
"property": "operating_system"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reinstall"
]
}
}
},
{
"displayName": "Backup First",
"name": "backup_first",
"type": "boolean",
"default": false,
"required": true,
"description": "Make a backup before reinstalling.",
"routing": {
"send": {
"type": "body",
"property": "backup_first"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"reinstall"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the server, the same as the `id` of its service.",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"restore"
]
}
}
},
{
"displayName": "Confirm",
"name": "confirm",
"type": "string",
"default": "",
"required": true,
"description": "The `name` of the server, to confirm.",
"routing": {
"send": {
"type": "body",
"property": "confirm"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"restore"
]
}
}
},
{
"displayName": "Backup",
"name": "backup",
"type": "string",
"default": "",
"required": true,
"description": "The `id` of the backup, from the list.",
"routing": {
"send": {
"type": "body",
"property": "backup"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"restore"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The server `id` (the service).",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"extrasGet"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The server `id` (the service).",
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"extrasPurchase"
]
}
}
},
{
"displayName": "Type",
"name": "type",
"type": "options",
"options": [
{
"name": "ip",
"value": "ip"
},
{
"name": "disk",
"value": "disk"
}
],
"default": "ip",
"required": true,
"routing": {
"send": {
"type": "body",
"property": "type"
}
},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"extrasPurchase"
]
}
}
},
{
"displayName": "Additional Fields",
"name": "additionalFields",
"type": "collection",
"placeholder": "Add Field",
"default": {},
"displayOptions": {
"show": {
"resource": [
"server"
],
"operation": [
"extrasPurchase"
]
}
},
"options": [
{
"displayName": "Expected Amount",
"name": "expected_amount",
"type": "number",
"default": 0,
"description": "Optional: the `amount_today` you checked.",
"routing": {
"send": {
"type": "body",
"property": "expected_amount"
}
}
},
{
"displayName": "Size Gb",
"name": "size_gb",
"type": "options",
"options": [
{
"name": "10",
"value": 10
},
{
"name": "20",
"value": 20
},
{
"name": "50",
"value": 50
},
{
"name": "100",
"value": 100
}
],
"default": 10,
"description": "Disk only.",
"routing": {
"send": {
"type": "body",
"property": "size_gb"
}
}
}
]
}
];