KosmoKrator

productivity

Contabo Lua API for KosmoKrator Agents

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

7 functions 7 read 0 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.contabo.*. Use lua_read_doc("integrations.contabo") 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.

Contabo — Lua API Reference

list_instances

List all compute instances (VPS) in the Contabo account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoItems per page (default: 20)

Example

local result = app.integrations.contabo.list_instances({
  per_page = 50
})

for _, instance in ipairs(result.data) do
  print(instance.name .. " (" .. instance.status .. ") - " .. instance.ipConfig.v4.ip)
end

get_instance

Get details for a specific compute instance (VPS).

Parameters

NameTypeRequiredDescription
idintegeryesThe instance ID

Example

local result = app.integrations.contabo.get_instance({ id = 12345 })
local inst = result.data
print(inst.name .. " - " .. inst.region .. " - " .. inst.ipConfig.v4.ip)

list_snapshots

List all snapshots in the Contabo account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoItems per page (default: 20)

Example

local result = app.integrations.contabo.list_snapshots({})

for _, snap in ipairs(result.data) do
  print(snap.name .. " - instance: " .. snap.instanceId .. " - " .. snap.createdDate)
end

list_images

List all custom images in the Contabo account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoItems per page (default: 20)

Example

local result = app.integrations.contabo.list_images({})

for _, image in ipairs(result.data) do
  print(image.name .. " - " .. image.osType .. " (" .. image.sizeMb .. " MB)")
end

list_networks

List all private networks in the Contabo account.

Parameters

NameTypeRequiredDescription
pageintegernoPage number for pagination (default: 1)
per_pageintegernoItems per page (default: 20)

Example

local result = app.integrations.contabo.list_networks({})

for _, network in ipairs(result.data) do
  print(network.name .. " - " .. network.region .. " - " .. network.cidr)
end

list_ssh_keys

List all registered SSH keys in the Contabo account.

Parameters

None.

Example

local result = app.integrations.contabo.list_ssh_keys({})

for _, key in ipairs(result.data) do
  print(key.name .. " - " .. key.fingerPrint)
end

get_current_user

Get the current authenticated Contabo account information.

Parameters

None.

Example

local result = app.integrations.contabo.get_current_user({})
local user = result.data
print("Account: " .. user.email .. " (tenant: " .. user.tenantId .. ")")

Multi-Account Usage

If you have multiple Contabo accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.contabo.list_instances({})

-- Explicit default (portable across setups)
app.integrations.contabo.default.list_instances({})

-- Named accounts
app.integrations.contabo.production.list_instances({})
app.integrations.contabo.staging.list_instances({})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Contabo — Lua API Reference

## list_instances

List all compute instances (VPS) in the Contabo account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Items per page (default: 20) |

### Example

```lua
local result = app.integrations.contabo.list_instances({
  per_page = 50
})

for _, instance in ipairs(result.data) do
  print(instance.name .. " (" .. instance.status .. ") - " .. instance.ipConfig.v4.ip)
end
```

---

## get_instance

Get details for a specific compute instance (VPS).

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | integer | yes | The instance ID |

### Example

```lua
local result = app.integrations.contabo.get_instance({ id = 12345 })
local inst = result.data
print(inst.name .. " - " .. inst.region .. " - " .. inst.ipConfig.v4.ip)
```

---

## list_snapshots

List all snapshots in the Contabo account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Items per page (default: 20) |

### Example

```lua
local result = app.integrations.contabo.list_snapshots({})

for _, snap in ipairs(result.data) do
  print(snap.name .. " - instance: " .. snap.instanceId .. " - " .. snap.createdDate)
end
```

---

## list_images

List all custom images in the Contabo account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Items per page (default: 20) |

### Example

```lua
local result = app.integrations.contabo.list_images({})

for _, image in ipairs(result.data) do
  print(image.name .. " - " .. image.osType .. " (" .. image.sizeMb .. " MB)")
end
```

---

## list_networks

List all private networks in the Contabo account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `per_page` | integer | no | Items per page (default: 20) |

### Example

```lua
local result = app.integrations.contabo.list_networks({})

for _, network in ipairs(result.data) do
  print(network.name .. " - " .. network.region .. " - " .. network.cidr)
end
```

---

## list_ssh_keys

List all registered SSH keys in the Contabo account.

### Parameters

None.

### Example

```lua
local result = app.integrations.contabo.list_ssh_keys({})

for _, key in ipairs(result.data) do
  print(key.name .. " - " .. key.fingerPrint)
end
```

---

## get_current_user

Get the current authenticated Contabo account information.

### Parameters

None.

### Example

```lua
local result = app.integrations.contabo.get_current_user({})
local user = result.data
print("Account: " .. user.email .. " (tenant: " .. user.tenantId .. ")")
```

---

## Multi-Account Usage

If you have multiple Contabo accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.contabo.list_instances({})

-- Explicit default (portable across setups)
app.integrations.contabo.default.list_instances({})

-- Named accounts
app.integrations.contabo.production.list_instances({})
app.integrations.contabo.staging.list_instances({})
```

All functions are identical across accounts — only the credentials differ.

Metadata-Derived Lua Example

local result = app.integrations.contabo.contabo_list_instances({
  page = 1,
  per_page = 1
})
print(result)

Functions

contabo_list_instances

List all compute instances (VPS) in the Contabo account. Returns IDs, names, status, region, and IP addresses.

Operation
Read read
Full name
contabo.contabo_list_instances
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of instances per page (default: 20).

contabo_get_instance

Get details for a specific Contabo compute instance (VPS) by ID. Returns full instance information including IP addresses, region, and configuration.

Operation
Read read
Full name
contabo.contabo_get_instance
ParameterTypeRequiredDescription
id integer yes The instance ID.

contabo_list_snapshots

List all snapshots in the Contabo account. Returns snapshot IDs, names, instance IDs, and creation dates.

Operation
Read read
Full name
contabo.contabo_list_snapshots
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of snapshots per page (default: 20).

contabo_list_images

List all custom images in the Contabo account. Returns image IDs, names, OS type, and size.

Operation
Read read
Full name
contabo.contabo_list_images
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of images per page (default: 20).

contabo_list_networks

List all private networks in the Contabo account. Returns network IDs, names, regions, and CIDR ranges.

Operation
Read read
Full name
contabo.contabo_list_networks
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of networks per page (default: 20).

contabo_list_ssh_keys

List all registered SSH keys in the Contabo account. Returns key IDs, names, and fingerprints.

Operation
Read read
Full name
contabo.contabo_list_ssh_keys
ParameterTypeRequiredDescription
No parameters.

contabo_get_current_user

Get information about the current authenticated Contabo account, including email, tenant, and user ID.

Operation
Read read
Full name
contabo.contabo_get_current_user
ParameterTypeRequiredDescription
No parameters.