productivity
IONOS Cloud Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the IONOS Cloud KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.ionos.*.
Use lua_read_doc("integrations.ionos") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
IONOS Cloud workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.ionos.list_servers({}))' --json kosmo integrations:lua --eval 'print(docs.read("ionos"))' --json
kosmo integrations:lua --eval 'print(docs.read("ionos.list_servers"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local ionos = app.integrations.ionos
local result = ionos.list_servers({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.ionos, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.ionos.default.* or app.integrations.ionos.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need IONOS Cloud, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
IONOS Cloud — Lua API Reference
list_servers
List all servers in the IONOS Cloud account.
Parameters
None.
Example
local result = app.integrations.ionos.list_servers({})
for _, server in ipairs(result.servers) do
print(server.properties.name .. " (" .. server.properties.vmState .. ") - " .. server.properties.cores .. " cores")
end
get_server
Get details for a specific server.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
server_id | string | yes | The server ID |
Example
local result = app.integrations.ionos.get_server({ server_id = "abc123-def456" })
local s = result.properties
print(s.name .. " - " .. s.cores .. " cores, " .. s.ram .. " MB RAM, state: " .. s.vmState)
list_volumes
List all block storage volumes.
Parameters
None.
Example
local result = app.integrations.ionos.list_volumes({})
for _, vol in ipairs(result.volumes) do
print(vol.properties.name .. " - " .. vol.properties.size .. " GB (" .. vol.properties.type .. ")")
end
list_lans
List all local area networks (LANs).
Parameters
None.
Example
local result = app.integrations.ionos.list_lans({})
for _, lan in ipairs(result.lans) do
print(lan.properties.name .. " - public: " .. tostring(lan.properties.public))
end
list_nics
List all network interface cards (NICs).
Parameters
None.
Example
local result = app.integrations.ionos.list_nics({})
for _, nic in ipairs(result.nics) do
print(nic.properties.name .. " - MAC: " .. nic.properties.mac .. ", IPs: " .. table.concat(nic.properties.ips, ", "))
end
list_images
List all available images.
Parameters
None.
Example
local result = app.integrations.ionos.list_images({})
for _, img in ipairs(result.images) do
print(img.properties.name .. " - " .. (img.properties.osType or "unknown") .. " (" .. img.properties.location .. ")")
end
get_current_user
Get the current authenticated user information.
Parameters
None.
Example
local result = app.integrations.ionos.get_current_user({})
local user = result.properties
print("User: " .. (user.firstname or "") .. " " .. (user.lastname or "") .. " <" .. (user.email or "") .. ">")
Multi-Account Usage
If you have multiple IONOS Cloud accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.ionos.list_servers({})
-- Explicit default (portable across setups)
app.integrations.ionos.default.list_servers({})
-- Named accounts
app.integrations.ionos.production.list_servers({})
app.integrations.ionos.staging.list_servers({})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# IONOS Cloud — Lua API Reference
## list_servers
List all servers in the IONOS Cloud account.
### Parameters
None.
### Example
```lua
local result = app.integrations.ionos.list_servers({})
for _, server in ipairs(result.servers) do
print(server.properties.name .. " (" .. server.properties.vmState .. ") - " .. server.properties.cores .. " cores")
end
```
---
## get_server
Get details for a specific server.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_id` | string | yes | The server ID |
### Example
```lua
local result = app.integrations.ionos.get_server({ server_id = "abc123-def456" })
local s = result.properties
print(s.name .. " - " .. s.cores .. " cores, " .. s.ram .. " MB RAM, state: " .. s.vmState)
```
---
## list_volumes
List all block storage volumes.
### Parameters
None.
### Example
```lua
local result = app.integrations.ionos.list_volumes({})
for _, vol in ipairs(result.volumes) do
print(vol.properties.name .. " - " .. vol.properties.size .. " GB (" .. vol.properties.type .. ")")
end
```
---
## list_lans
List all local area networks (LANs).
### Parameters
None.
### Example
```lua
local result = app.integrations.ionos.list_lans({})
for _, lan in ipairs(result.lans) do
print(lan.properties.name .. " - public: " .. tostring(lan.properties.public))
end
```
---
## list_nics
List all network interface cards (NICs).
### Parameters
None.
### Example
```lua
local result = app.integrations.ionos.list_nics({})
for _, nic in ipairs(result.nics) do
print(nic.properties.name .. " - MAC: " .. nic.properties.mac .. ", IPs: " .. table.concat(nic.properties.ips, ", "))
end
```
---
## list_images
List all available images.
### Parameters
None.
### Example
```lua
local result = app.integrations.ionos.list_images({})
for _, img in ipairs(result.images) do
print(img.properties.name .. " - " .. (img.properties.osType or "unknown") .. " (" .. img.properties.location .. ")")
end
```
---
## get_current_user
Get the current authenticated user information.
### Parameters
None.
### Example
```lua
local result = app.integrations.ionos.get_current_user({})
local user = result.properties
print("User: " .. (user.firstname or "") .. " " .. (user.lastname or "") .. " <" .. (user.email or "") .. ">")
```
---
## Multi-Account Usage
If you have multiple IONOS Cloud accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.ionos.list_servers({})
-- Explicit default (portable across setups)
app.integrations.ionos.default.list_servers({})
-- Named accounts
app.integrations.ionos.production.list_servers({})
app.integrations.ionos.staging.list_servers({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.ionos.list_servers({})
print(result) Functions
list_servers Read
List all servers in the IONOS Cloud account. Returns IDs, names, cores, RAM, VM state, and boot volume information.
- Lua path
app.integrations.ionos.list_servers- Full name
ionos.ionos_list_servers
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_server Read
Get details for a specific IONOS Cloud server by ID. Returns full server information including cores, RAM, VM state, volumes, and NICs.
- Lua path
app.integrations.ionos.get_server- Full name
ionos.ionos_get_server
| Parameter | Type | Required | Description |
|---|---|---|---|
server_id | string | yes | The server ID. |
list_volumes Read
List all block storage volumes in the IONOS Cloud account. Returns IDs, names, size, type, zone, and state.
- Lua path
app.integrations.ionos.list_volumes- Full name
ionos.ionos_list_volumes
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_lans Read
List all local area networks (LANs) in the IONOS Cloud account. Returns IDs, names, public flag, and connected servers.
- Lua path
app.integrations.ionos.list_lans- Full name
ionos.ionos_list_lans
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_nics Read
List all network interface cards (NICs) in the IONOS Cloud account. Returns IDs, names, MAC addresses, IPs, and LAN associations.
- Lua path
app.integrations.ionos.list_nics- Full name
ionos.ionos_list_nics
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_images Read
List all available images in the IONOS Cloud account. Returns IDs, names, size, OS type, location, and public status.
- Lua path
app.integrations.ionos.list_images- Full name
ionos.ionos_list_images
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_current_user Read
Get information about the current authenticated IONOS Cloud user, including email, name, and account status.
- Lua path
app.integrations.ionos.get_current_user- Full name
ionos.ionos_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||