KosmoKrator

productivity

Kamatera Lua API for KosmoKrator Agents

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

7 functions 6 read 1 write Bearer token auth

Lua Namespace

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

Kamatera — Lua API Reference

list_servers

List all cloud servers in the account.

Parameters

None.

Example

local result = app.integrations.kamatera.list_servers({})

for _, server in ipairs(result.servers) do
  print(server.name .. " (" .. server.status .. ") - " .. server.cpu .. " CPU / " .. server.ram .. " MB RAM")
end

get_server

Get details for a specific cloud server.

Parameters

NameTypeRequiredDescription
idstringyesThe server ID

Example

local result = app.integrations.kamatera.get_server({ id = "server-abc123" })
local s = result.server
print(s.name .. " - " .. s.datacenter .. " - " .. s.image .. " - " .. s.status)

create_server

Create a new cloud server.

Parameters

NameTypeRequiredDescription
namestringyesThe server name
datacenterstringyesThe datacenter ID (e.g. “IL-JER”)
imagestringyesThe image ID or OS name
cpuintegeryesNumber of vCPUs
ramintegeryesRAM in MB
diskintegeryesDisk size in GB
passwordstringnoRoot password (auto-generated if omitted)
networkstringnoNetwork ID to attach the server to
quantityintegernoNumber of servers to create

Example

local result = app.integrations.kamatera.create_server({
  name = "web-server-01",
  datacenter = "IL-JER",
  image = "ubuntu_22.04",
  cpu = 2,
  ram = 4096,
  disk = 50,
})

print("Server created: " .. result.id)

list_networks

List all networks in the account.

Parameters

None.

Example

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

for _, network in ipairs(result.networks) do
  print(network.id .. " - " .. network.name .. " - " .. network.cidr .. " (" .. network.datacenter .. ")")
end

list_images

List all available images for server creation.

Parameters

None.

Example

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

for _, image in ipairs(result.images) do
  print(image.id .. " - " .. image.name .. " - " .. image.os)
end

list_datacenters

List all available datacenter locations.

Parameters

None.

Example

local result = app.integrations.kamatera.list_datacenters({})

for _, dc in ipairs(result.datacenters) do
  print(dc.id .. " - " .. dc.name .. ", " .. dc.country)
end

get_current_user

Get the current authenticated account information.

Parameters

None.

Example

local result = app.integrations.kamatera.get_current_user({})
print("Account: " .. (result.account.email or result.user.email))

Multi-Account Usage

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

-- Default account (always works)
app.integrations.kamatera.list_servers({})

-- Explicit default (portable across setups)
app.integrations.kamatera.default.list_servers({})

-- Named accounts
app.integrations.kamatera.production.list_servers({})
app.integrations.kamatera.staging.list_servers({})

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

Raw agent markdown
# Kamatera — Lua API Reference

## list_servers

List all cloud servers in the account.

### Parameters

None.

### Example

```lua
local result = app.integrations.kamatera.list_servers({})

for _, server in ipairs(result.servers) do
  print(server.name .. " (" .. server.status .. ") - " .. server.cpu .. " CPU / " .. server.ram .. " MB RAM")
end
```

---

## get_server

Get details for a specific cloud server.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The server ID |

### Example

```lua
local result = app.integrations.kamatera.get_server({ id = "server-abc123" })
local s = result.server
print(s.name .. " - " .. s.datacenter .. " - " .. s.image .. " - " .. s.status)
```

---

## create_server

Create a new cloud server.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | The server name |
| `datacenter` | string | yes | The datacenter ID (e.g. "IL-JER") |
| `image` | string | yes | The image ID or OS name |
| `cpu` | integer | yes | Number of vCPUs |
| `ram` | integer | yes | RAM in MB |
| `disk` | integer | yes | Disk size in GB |
| `password` | string | no | Root password (auto-generated if omitted) |
| `network` | string | no | Network ID to attach the server to |
| `quantity` | integer | no | Number of servers to create |

### Example

```lua
local result = app.integrations.kamatera.create_server({
  name = "web-server-01",
  datacenter = "IL-JER",
  image = "ubuntu_22.04",
  cpu = 2,
  ram = 4096,
  disk = 50,
})

print("Server created: " .. result.id)
```

---

## list_networks

List all networks in the account.

### Parameters

None.

### Example

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

for _, network in ipairs(result.networks) do
  print(network.id .. " - " .. network.name .. " - " .. network.cidr .. " (" .. network.datacenter .. ")")
end
```

---

## list_images

List all available images for server creation.

### Parameters

None.

### Example

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

for _, image in ipairs(result.images) do
  print(image.id .. " - " .. image.name .. " - " .. image.os)
end
```

---

## list_datacenters

List all available datacenter locations.

### Parameters

None.

### Example

```lua
local result = app.integrations.kamatera.list_datacenters({})

for _, dc in ipairs(result.datacenters) do
  print(dc.id .. " - " .. dc.name .. ", " .. dc.country)
end
```

---

## get_current_user

Get the current authenticated account information.

### Parameters

None.

### Example

```lua
local result = app.integrations.kamatera.get_current_user({})
print("Account: " .. (result.account.email or result.user.email))
```

---

## Multi-Account Usage

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

```lua
-- Default account (always works)
app.integrations.kamatera.list_servers({})

-- Explicit default (portable across setups)
app.integrations.kamatera.default.list_servers({})

-- Named accounts
app.integrations.kamatera.production.list_servers({})
app.integrations.kamatera.staging.list_servers({})
```

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

Metadata-Derived Lua Example

local result = app.integrations.kamatera.kamatera_list_servers({})
print(result)

Functions

kamatera_list_servers

List all cloud servers in the Kamatera account. Returns IDs, names, status, and configuration details.

Operation
Read read
Full name
kamatera.kamatera_list_servers
ParameterTypeRequiredDescription
No parameters.

kamatera_get_server

Get details for a specific Kamatera cloud server by ID. Returns full server information including status, CPU, RAM, disk, and IP addresses.

Operation
Read read
Full name
kamatera.kamatera_get_server
ParameterTypeRequiredDescription
id string yes The server ID.

kamatera_create_server

Create a new cloud server in Kamatera. Requires a name, datacenter, image, CPU count, RAM, and disk size.

Operation
Write write
Full name
kamatera.kamatera_create_server
ParameterTypeRequiredDescription
name string yes The server name.
datacenter string yes The datacenter ID (e.g. "IL-JER").
image string yes The image ID or name for the OS to install.
cpu integer yes Number of vCPUs.
ram integer yes RAM in MB.
disk integer yes Disk size in GB.
password string no Root password for the server. Auto-generated if omitted.
network string no Network ID to attach the server to.
quantity integer no Number of servers to create with this configuration.

kamatera_list_networks

List all networks in the Kamatera account. Returns network IDs, names, datacenter, and CIDR details.

Operation
Read read
Full name
kamatera.kamatera_list_networks
ParameterTypeRequiredDescription
No parameters.

kamatera_list_images

List all available images for server creation in Kamatera. Returns image IDs, names, OS type, and sizes.

Operation
Read read
Full name
kamatera.kamatera_list_images
ParameterTypeRequiredDescription
No parameters.

kamatera_list_datacenters

List all available Kamatera datacenter locations. Returns datacenter IDs, names, city, and country.

Operation
Read read
Full name
kamatera.kamatera_list_datacenters
ParameterTypeRequiredDescription
No parameters.

kamatera_get_current_user

Get information about the current authenticated Kamatera account, including email, name, and account details.

Operation
Read read
Full name
kamatera.kamatera_get_current_user
ParameterTypeRequiredDescription
No parameters.