cloudways_list_servers
List all servers in the Cloudways account.
- Operation
- Read
read - Full name
cloudways.cloudways_list_servers
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
productivity
Agent-facing Lua documentation and function reference for the Cloudways KosmoKrator integration.
Agents call this integration through app.integrations.cloudways.*.
Use lua_read_doc("integrations.cloudways") inside KosmoKrator to discover the same reference at runtime.
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
List all servers in the Cloudways account.
None.
local result = app.integrations.cloudways.list_servers({})
for _, server in ipairs(result.servers) do
print(server.label .. " (" .. server.status .. ") - " .. server.server_ips[1])
end
Get details for a specific Cloudways server.
| Name | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The server ID to look up |
local result = app.integrations.cloudways.get_server({ server_id = 12345 })
local s = result.server
print(s.label .. " - " .. s.server_ips[1] .. " - " .. s.os)
List all applications across all servers in the Cloudways account.
None.
local result = app.integrations.cloudways.list_apps({})
for _, app in ipairs(result.apps) do
print(app.label .. " (" .. app.application .. ") on server " .. app.server_id)
end
Get details for a specific Cloudways application.
| Name | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The server ID the application belongs to |
app_id | integer | yes | The application ID to look up |
local result = app.integrations.cloudways.get_app({ server_id = 12345, app_id = 67890 })
local a = result.app
print(a.label .. " - " .. a.application .. " - " .. a.app_fqdn)
List domains for a specific Cloudways application.
| Name | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The server ID the application belongs to |
app_id | integer | yes | The application ID to list domains for |
local result = app.integrations.cloudways.list_domains({ server_id = 12345, app_id = 67890 })
for _, domain in ipairs(result.domains) do
print(domain.fqdn .. " - primary: " .. tostring(domain.is_primary))
end
List all projects in the Cloudways account.
None.
local result = app.integrations.cloudways.list_projects({})
for _, project in ipairs(result.projects) do
print(project.name .. " (ID: " .. project.id .. ")")
end
Get the current authenticated Cloudways account information.
None.
local result = app.integrations.cloudways.get_current_user({})
print("Account: " .. result.me.email .. " (" .. result.me.name .. ")")
If you have multiple Cloudways accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.cloudways.list_servers({})
-- Explicit default (portable across setups)
app.integrations.cloudways.default.list_servers({})
-- Named accounts
app.integrations.cloudways.production.list_servers({})
app.integrations.cloudways.staging.list_servers({})
All functions are identical across accounts — only the credentials differ.
# Cloudways — Lua API Reference
## list_servers
List all servers in the Cloudways account.
### Parameters
None.
### Example
```lua
local result = app.integrations.cloudways.list_servers({})
for _, server in ipairs(result.servers) do
print(server.label .. " (" .. server.status .. ") - " .. server.server_ips[1])
end
```
---
## get_server
Get details for a specific Cloudways server.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_id` | integer | yes | The server ID to look up |
### Example
```lua
local result = app.integrations.cloudways.get_server({ server_id = 12345 })
local s = result.server
print(s.label .. " - " .. s.server_ips[1] .. " - " .. s.os)
```
---
## list_apps
List all applications across all servers in the Cloudways account.
### Parameters
None.
### Example
```lua
local result = app.integrations.cloudways.list_apps({})
for _, app in ipairs(result.apps) do
print(app.label .. " (" .. app.application .. ") on server " .. app.server_id)
end
```
---
## get_app
Get details for a specific Cloudways application.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_id` | integer | yes | The server ID the application belongs to |
| `app_id` | integer | yes | The application ID to look up |
### Example
```lua
local result = app.integrations.cloudways.get_app({ server_id = 12345, app_id = 67890 })
local a = result.app
print(a.label .. " - " .. a.application .. " - " .. a.app_fqdn)
```
---
## list_domains
List domains for a specific Cloudways application.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_id` | integer | yes | The server ID the application belongs to |
| `app_id` | integer | yes | The application ID to list domains for |
### Example
```lua
local result = app.integrations.cloudways.list_domains({ server_id = 12345, app_id = 67890 })
for _, domain in ipairs(result.domains) do
print(domain.fqdn .. " - primary: " .. tostring(domain.is_primary))
end
```
---
## list_projects
List all projects in the Cloudways account.
### Parameters
None.
### Example
```lua
local result = app.integrations.cloudways.list_projects({})
for _, project in ipairs(result.projects) do
print(project.name .. " (ID: " .. project.id .. ")")
end
```
---
## get_current_user
Get the current authenticated Cloudways account information.
### Parameters
None.
### Example
```lua
local result = app.integrations.cloudways.get_current_user({})
print("Account: " .. result.me.email .. " (" .. result.me.name .. ")")
```
---
## Multi-Account Usage
If you have multiple Cloudways accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.cloudways.list_servers({})
-- Explicit default (portable across setups)
app.integrations.cloudways.default.list_servers({})
-- Named accounts
app.integrations.cloudways.production.list_servers({})
app.integrations.cloudways.staging.list_servers({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.cloudways.cloudways_list_servers({})
print(result) cloudways_list_serversList all servers in the Cloudways account.
readcloudways.cloudways_list_servers| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
cloudways_get_serverGet details for a specific Cloudways server.
readcloudways.cloudways_get_server| Parameter | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The server ID to look up. |
cloudways_list_appsList all applications across all servers in the Cloudways account.
readcloudways.cloudways_list_apps| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
cloudways_get_appGet details for a specific Cloudways application.
readcloudways.cloudways_get_app| Parameter | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The server ID the application belongs to. |
app_id | integer | yes | The application ID to look up. |
cloudways_list_domainsList domains for a specific Cloudways application.
readcloudways.cloudways_list_domains| Parameter | Type | Required | Description |
|---|---|---|---|
server_id | integer | yes | The server ID the application belongs to. |
app_id | integer | yes | The application ID to list domains for. |
cloudways_list_projectsList all projects in the Cloudways account.
readcloudways.cloudways_list_projects| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
cloudways_get_current_userGet the current authenticated Cloudways account information.
readcloudways.cloudways_get_current_user| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||