KosmoKrator

productivity

Hostinger Lua API for KosmoKrator Agents

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

7 functions 7 read 0 write Bearer token auth

Lua Namespace

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

Hostinger — Lua API Reference

list_servers

List all VPS servers in the Hostinger account.

Parameters

None.

Example

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

for _, server in ipairs(result.servers) do
  print(server.name .. " (" .. server.status .. ") - " .. server.plan)
end

get_server

Get details for a specific VPS server.

Parameters

NameTypeRequiredDescription
server_idintegeryesThe VPS server ID

Example

local result = app.integrations.hostinger.get_server({ server_id = 12345678 })
local s = result.server
print(s.name .. " - " .. s.ip_address .. " - " .. s.status)

list_domains

List all domains in the Hostinger account.

Parameters

None.

Example

local result = app.integrations.hostinger.list_domains({})

for _, domain in ipairs(result.domains) do
  print(domain.name .. " (" .. domain.status .. ")")
end

get_domain

Get details for a specific domain.

Parameters

NameTypeRequiredDescription
domain_idintegeryesThe domain ID

Example

local result = app.integrations.hostinger.get_domain({ domain_id = 12345 })
print(result.domain.name .. " - " .. result.domain.status)

list_dns_records

List DNS records for a specific domain.

Parameters

NameTypeRequiredDescription
domain_idintegeryesThe domain ID to list DNS records for

Example

local result = app.integrations.hostinger.list_dns_records({ domain_id = 12345 })

for _, record in ipairs(result.records) do
  print(record.type .. " " .. record.name .. " -> " .. record.content .. " (TTL: " .. record.ttl .. ")")
end

list_ssl

List all SSL certificates in the Hostinger account.

Parameters

None.

Example

local result = app.integrations.hostinger.list_ssl({})

for _, cert in ipairs(result.ssl) do
  print(cert.domain .. " - " .. cert.status .. " - expires: " .. cert.expires_at)
end

get_current_user

Get the current authenticated account information.

Parameters

None.

Example

local result = app.integrations.hostinger.get_current_user({})
print("Account: " .. result.email)

Multi-Account Usage

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

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

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

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

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

Raw agent markdown
# Hostinger — Lua API Reference

## list_servers

List all VPS servers in the Hostinger account.

### Parameters

None.

### Example

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

for _, server in ipairs(result.servers) do
  print(server.name .. " (" .. server.status .. ") - " .. server.plan)
end
```

---

## get_server

Get details for a specific VPS server.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `server_id` | integer | yes | The VPS server ID |

### Example

```lua
local result = app.integrations.hostinger.get_server({ server_id = 12345678 })
local s = result.server
print(s.name .. " - " .. s.ip_address .. " - " .. s.status)
```

---

## list_domains

List all domains in the Hostinger account.

### Parameters

None.

### Example

```lua
local result = app.integrations.hostinger.list_domains({})

for _, domain in ipairs(result.domains) do
  print(domain.name .. " (" .. domain.status .. ")")
end
```

---

## get_domain

Get details for a specific domain.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `domain_id` | integer | yes | The domain ID |

### Example

```lua
local result = app.integrations.hostinger.get_domain({ domain_id = 12345 })
print(result.domain.name .. " - " .. result.domain.status)
```

---

## list_dns_records

List DNS records for a specific domain.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `domain_id` | integer | yes | The domain ID to list DNS records for |

### Example

```lua
local result = app.integrations.hostinger.list_dns_records({ domain_id = 12345 })

for _, record in ipairs(result.records) do
  print(record.type .. " " .. record.name .. " -> " .. record.content .. " (TTL: " .. record.ttl .. ")")
end
```

---

## list_ssl

List all SSL certificates in the Hostinger account.

### Parameters

None.

### Example

```lua
local result = app.integrations.hostinger.list_ssl({})

for _, cert in ipairs(result.ssl) do
  print(cert.domain .. " - " .. cert.status .. " - expires: " .. cert.expires_at)
end
```

---

## get_current_user

Get the current authenticated account information.

### Parameters

None.

### Example

```lua
local result = app.integrations.hostinger.get_current_user({})
print("Account: " .. result.email)
```

---

## Multi-Account Usage

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

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

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

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

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

Metadata-Derived Lua Example

local result = app.integrations.hostinger.hostinger_list_servers({})
print(result)

Functions

hostinger_list_servers

List all VPS servers in the Hostinger account. Returns server IDs, names, status, plan, and IP addresses.

Operation
Read read
Full name
hostinger.hostinger_list_servers
ParameterTypeRequiredDescription
No parameters.

hostinger_get_server

Get details for a specific Hostinger VPS server by ID. Returns full server information including IP addresses, plan, and status.

Operation
Read read
Full name
hostinger.hostinger_get_server
ParameterTypeRequiredDescription
server_id integer yes The VPS server ID.

hostinger_list_domains

List all domains in the Hostinger account. Returns domain IDs, names, and status.

Operation
Read read
Full name
hostinger.hostinger_list_domains
ParameterTypeRequiredDescription
No parameters.

hostinger_get_domain

Get details for a specific domain in Hostinger by domain ID. Returns full domain information.

Operation
Read read
Full name
hostinger.hostinger_get_domain
ParameterTypeRequiredDescription
domain_id integer yes The domain ID.

hostinger_list_dns_records

List DNS records for a specific domain in Hostinger. Returns all record types (A, AAAA, CNAME, MX, TXT, etc.).

Operation
Read read
Full name
hostinger.hostinger_list_dns_records
ParameterTypeRequiredDescription
domain_id integer yes The domain ID to list DNS records for.

hostinger_list_ssl

List all SSL certificates in the Hostinger account. Returns certificate details including domain, status, and expiry.

Operation
Read read
Full name
hostinger.hostinger_list_ssl
ParameterTypeRequiredDescription
No parameters.

hostinger_get_current_user

Get information about the current authenticated Hostinger account, including email and user details.

Operation
Read read
Full name
hostinger.hostinger_get_current_user
ParameterTypeRequiredDescription
No parameters.