KosmoKrator

productivity

IONOS Cloud Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the IONOS Cloud KosmoKrator integration.

7 functions 7 read 0 write Bearer token auth

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.

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

NameTypeRequiredDescription
server_idstringyesThe 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.

Metadata-Derived Lua Example

local result = app.integrations.ionos.ionos_list_servers({})
print(result)

Functions

ionos_list_servers

List all servers in the IONOS Cloud account. Returns IDs, names, cores, RAM, VM state, and boot volume information.

Operation
Read read
Full name
ionos.ionos_list_servers
ParameterTypeRequiredDescription
No parameters.

ionos_get_server

Get details for a specific IONOS Cloud server by ID. Returns full server information including cores, RAM, VM state, volumes, and NICs.

Operation
Read read
Full name
ionos.ionos_get_server
ParameterTypeRequiredDescription
server_id string yes The server ID.

ionos_list_volumes

List all block storage volumes in the IONOS Cloud account. Returns IDs, names, size, type, zone, and state.

Operation
Read read
Full name
ionos.ionos_list_volumes
ParameterTypeRequiredDescription
No parameters.

ionos_list_lans

List all local area networks (LANs) in the IONOS Cloud account. Returns IDs, names, public flag, and connected servers.

Operation
Read read
Full name
ionos.ionos_list_lans
ParameterTypeRequiredDescription
No parameters.

ionos_list_nics

List all network interface cards (NICs) in the IONOS Cloud account. Returns IDs, names, MAC addresses, IPs, and LAN associations.

Operation
Read read
Full name
ionos.ionos_list_nics
ParameterTypeRequiredDescription
No parameters.

ionos_list_images

List all available images in the IONOS Cloud account. Returns IDs, names, size, OS type, location, and public status.

Operation
Read read
Full name
ionos.ionos_list_images
ParameterTypeRequiredDescription
No parameters.

ionos_get_current_user

Get information about the current authenticated IONOS Cloud user, including email, name, and account status.

Operation
Read read
Full name
ionos.ionos_get_current_user
ParameterTypeRequiredDescription
No parameters.