KosmoKrator

productivity

Atlassian Statuspage Lua API for KosmoKrator Agents

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

Lua Namespace

Agents call this integration through app.integrations.statuspage.*. Use lua_read_doc("integrations.statuspage") 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 Atlassian Statuspage workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.statuspage.get_current_user({}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("statuspage"))' --json
kosmo integrations:lua --eval 'print(docs.read("statuspage.get_current_user"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local statuspage = app.integrations.statuspage
local result = statuspage.get_current_user({})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.statuspage, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.statuspage.default.* or app.integrations.statuspage.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Atlassian Statuspage, use the narrower mcp:lua command.

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.

Atlassian Statuspage

Lua API reference for the statuspage integration package. These tools use the Statuspage Manage API and require an API key plus a default page_id.

Use statuspage_list_pages first when you need to discover the correct page ID. Page-scoped tools then operate on the configured page unless a tool explicitly accepts page_id.

Pages and User

statuspage_get_current_user

Verify the API key and inspect the authenticated user.

local user = statuspage_get_current_user()
print(user.email)

statuspage_list_pages

List pages visible to the API key.

local pages = statuspage_list_pages({ per_page = 25 })
for _, page in ipairs(pages) do
  print(page.id, page.name)
end

statuspage_get_page

Get details for the configured page or another visible page.

local page = statuspage_get_page()
print(page.name)

local other = statuspage_get_page({ page_id = "page-test" })
print(other.id)

Incidents

statuspage_list_incidents

List incidents for the configured page. The Statuspage API may include resolved, active, and scheduled incidents.

local incidents = statuspage_list_incidents({ limit = 10, page = 1 })
for _, incident in ipairs(incidents) do
  print(incident.id, incident.name, incident.status)
end

statuspage_list_unresolved_incidents

List incidents that are still unresolved.

local open_incidents = statuspage_list_unresolved_incidents({ limit = 10 })

statuspage_list_upcoming_incidents

List upcoming scheduled maintenance incidents.

local upcoming = statuspage_list_upcoming_incidents({ limit = 10 })

statuspage_create_incident

Create a new incident or scheduled maintenance entry. status should match Statuspage values such as investigating, identified, monitoring, resolved, scheduled, in_progress, verifying, or completed.

local incident = statuspage_create_incident({
  name = "Example API latency",
  status = "investigating",
  impact = "minor",
  body = "We are investigating elevated latency.",
  component_ids = { "component-test" },
})
print(incident.id)

For scheduled maintenance:

local maintenance = statuspage_create_incident({
  name = "Example database maintenance",
  status = "scheduled",
  impact = "none",
  body = "A maintenance window is scheduled.",
  scheduled_for = "2026-06-01T10:00:00Z",
  scheduled_until = "2026-06-01T11:00:00Z",
})

statuspage_update_incident

Update only the fields you provide. To resolve a live incident, update status to resolved.

local updated = statuspage_update_incident({
  id = "incident-test",
  status = "monitoring",
  body = "Latency has returned to normal and we are monitoring.",
})

statuspage_delete_incident

Delete an incident from the configured page. Prefer resolving real incidents instead of deleting them when preserving history matters.

local result = statuspage_delete_incident({ id = "incident-test" })
print(result.deleted)

Components

statuspage_list_components

List components on the configured page.

local components = statuspage_list_components({ per_page = 100 })
for _, component in ipairs(components) do
  print(component.id, component.name, component.status)
end

statuspage_get_component

Get one component by ID.

local component = statuspage_get_component({ id = "component-test" })
print(component.name)

statuspage_create_component

Create a component. Supported statuses include operational, degraded_performance, partial_outage, major_outage, and under_maintenance.

local component = statuspage_create_component({
  name = "Example API",
  status = "operational",
  description = "Primary public API.",
})
print(component.id)

statuspage_update_component

Update component metadata or status. Only provided fields are sent.

local component = statuspage_update_component({
  id = "component-test",
  status = "degraded_performance",
})

statuspage_delete_component

Delete a component from the configured page.

local result = statuspage_delete_component({ id = "component-test" })
print(result.deleted)

Return Shapes

Most tools return Statuspage API objects with fields such as id, name, status, impact, created_at, and updated_at. Delete tools return a small confirmation object:

{ deleted = true, id = "incident-test" }

Multi-Account Usage

Use the namespace prefix assigned by the host:

local incidents = ns_statuspage_ops.statuspage_list_incidents({ limit = 5 })
Raw agent markdown
# Atlassian Statuspage

Lua API reference for the `statuspage` integration package. These tools use the Statuspage Manage API and require an API key plus a default `page_id`.

Use `statuspage_list_pages` first when you need to discover the correct page ID. Page-scoped tools then operate on the configured page unless a tool explicitly accepts `page_id`.

## Pages and User

### `statuspage_get_current_user`

Verify the API key and inspect the authenticated user.

```lua
local user = statuspage_get_current_user()
print(user.email)
```

### `statuspage_list_pages`

List pages visible to the API key.

```lua
local pages = statuspage_list_pages({ per_page = 25 })
for _, page in ipairs(pages) do
  print(page.id, page.name)
end
```

### `statuspage_get_page`

Get details for the configured page or another visible page.

```lua
local page = statuspage_get_page()
print(page.name)

local other = statuspage_get_page({ page_id = "page-test" })
print(other.id)
```

## Incidents

### `statuspage_list_incidents`

List incidents for the configured page. The Statuspage API may include resolved, active, and scheduled incidents.

```lua
local incidents = statuspage_list_incidents({ limit = 10, page = 1 })
for _, incident in ipairs(incidents) do
  print(incident.id, incident.name, incident.status)
end
```

### `statuspage_list_unresolved_incidents`

List incidents that are still unresolved.

```lua
local open_incidents = statuspage_list_unresolved_incidents({ limit = 10 })
```

### `statuspage_list_upcoming_incidents`

List upcoming scheduled maintenance incidents.

```lua
local upcoming = statuspage_list_upcoming_incidents({ limit = 10 })
```

### `statuspage_create_incident`

Create a new incident or scheduled maintenance entry. `status` should match Statuspage values such as `investigating`, `identified`, `monitoring`, `resolved`, `scheduled`, `in_progress`, `verifying`, or `completed`.

```lua
local incident = statuspage_create_incident({
  name = "Example API latency",
  status = "investigating",
  impact = "minor",
  body = "We are investigating elevated latency.",
  component_ids = { "component-test" },
})
print(incident.id)
```

For scheduled maintenance:

```lua
local maintenance = statuspage_create_incident({
  name = "Example database maintenance",
  status = "scheduled",
  impact = "none",
  body = "A maintenance window is scheduled.",
  scheduled_for = "2026-06-01T10:00:00Z",
  scheduled_until = "2026-06-01T11:00:00Z",
})
```

### `statuspage_update_incident`

Update only the fields you provide. To resolve a live incident, update `status` to `resolved`.

```lua
local updated = statuspage_update_incident({
  id = "incident-test",
  status = "monitoring",
  body = "Latency has returned to normal and we are monitoring.",
})
```

### `statuspage_delete_incident`

Delete an incident from the configured page. Prefer resolving real incidents instead of deleting them when preserving history matters.

```lua
local result = statuspage_delete_incident({ id = "incident-test" })
print(result.deleted)
```

## Components

### `statuspage_list_components`

List components on the configured page.

```lua
local components = statuspage_list_components({ per_page = 100 })
for _, component in ipairs(components) do
  print(component.id, component.name, component.status)
end
```

### `statuspage_get_component`

Get one component by ID.

```lua
local component = statuspage_get_component({ id = "component-test" })
print(component.name)
```

### `statuspage_create_component`

Create a component. Supported statuses include `operational`, `degraded_performance`, `partial_outage`, `major_outage`, and `under_maintenance`.

```lua
local component = statuspage_create_component({
  name = "Example API",
  status = "operational",
  description = "Primary public API.",
})
print(component.id)
```

### `statuspage_update_component`

Update component metadata or status. Only provided fields are sent.

```lua
local component = statuspage_update_component({
  id = "component-test",
  status = "degraded_performance",
})
```

### `statuspage_delete_component`

Delete a component from the configured page.

```lua
local result = statuspage_delete_component({ id = "component-test" })
print(result.deleted)
```

## Return Shapes

Most tools return Statuspage API objects with fields such as `id`, `name`, `status`, `impact`, `created_at`, and `updated_at`. Delete tools return a small confirmation object:

```lua
{ deleted = true, id = "incident-test" }
```

## Multi-Account Usage

Use the namespace prefix assigned by the host:

```lua
local incidents = ns_statuspage_ops.statuspage_list_incidents({ limit = 5 })
```
Metadata-derived Lua example
local result = app.integrations.statuspage.get_current_user({})
print(result)

Functions

get_current_user Read

Get the currently authenticated Atlassian Statuspage user. Useful for verifying API credentials and checking user permissions.

Lua path
app.integrations.statuspage.get_current_user
Full name
statuspage.statuspage_get_current_user
ParameterTypeRequiredDescription
No parameters.
list Read

List Atlassian Statuspage pages available to the authenticated API key. Use this to discover page IDs.

Lua path
app.integrations.statuspage.list
Full name
statuspage.statuspage_list_pages
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
per_page integer no Number of pages to return per page.
get Read

Get details for the configured Atlassian Statuspage page, or a supplied page ID visible to the API key.

Lua path
app.integrations.statuspage.get
Full name
statuspage.statuspage_get_page
ParameterTypeRequiredDescription
page_id string no Optional page ID. Defaults to the configured Page ID.
list_incidents Read

List all incidents for your Atlassian Statuspage. Returns scheduled, ongoing, and resolved incidents with their current status and impact.

Lua path
app.integrations.statuspage.list_incidents
Full name
statuspage.statuspage_list_incidents
ParameterTypeRequiredDescription
limit integer no Maximum number of incidents to return per page.
page integer no Page number for pagination (1-based).
q string no Optional search query supported by the Statuspage API.
list_unresolved_incidents Read

List unresolved incidents for the configured Atlassian Statuspage page.

Lua path
app.integrations.statuspage.list_unresolved_incidents
Full name
statuspage.statuspage_list_unresolved_incidents
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
limit integer no Maximum number of incidents to return per page.
list_upcoming_incidents Read

List upcoming scheduled incidents and maintenance windows for the configured Atlassian Statuspage page.

Lua path
app.integrations.statuspage.list_upcoming_incidents
Full name
statuspage.statuspage_list_upcoming_incidents
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
limit integer no Maximum number of incidents to return per page.
create_incident Write

Create a new incident on your Atlassian Statuspage. Specify the incident name, status, impact level, and an optional body describing the issue.

Lua path
app.integrations.statuspage.create_incident
Full name
statuspage.statuspage_create_incident
ParameterTypeRequiredDescription
name string yes A short title for the incident (e.g. "API Latency in EU Region").
status string yes Incident status. One of: "investigating", "identified", "monitoring", "resolved", "scheduled", "in_progress", "verifying", "completed".
impact string yes The impact level of the incident. One of: "none", "minor", "major", "critical".
body string no A detailed description of the incident and current status.
component_ids array no Array of component IDs affected by this incident.
scheduled_for string no Optional ISO-8601 start time for scheduled maintenance.
scheduled_until string no Optional ISO-8601 end time for scheduled maintenance.
update_incident Write

Update an existing incident on your Atlassian Statuspage. Change the status, add updates to the body, or modify impact level.

Lua path
app.integrations.statuspage.update_incident
Full name
statuspage.statuspage_update_incident
ParameterTypeRequiredDescription
id string yes The incident ID to update.
name string no Updated incident title.
status string no Updated incident status. One of: "investigating", "identified", "monitoring", "resolved", "scheduled", "in_progress", "verifying", "completed".
impact string no Updated impact level. One of: "none", "minor", "major", "critical".
body string no Updated incident body describing the latest status.
component_ids array no Updated array of component IDs affected by this incident.
scheduled_for string no Updated ISO-8601 start time for scheduled maintenance.
scheduled_until string no Updated ISO-8601 end time for scheduled maintenance.
delete_incident Write

Delete an incident from the configured Atlassian Statuspage page. Resolving is usually preferable for real incidents.

Lua path
app.integrations.statuspage.delete_incident
Full name
statuspage.statuspage_delete_incident
ParameterTypeRequiredDescription
id string yes The incident ID to delete.
list_components Read

List all components on your Atlassian Statuspage. Returns component names, current status, and group information.

Lua path
app.integrations.statuspage.list_components
Full name
statuspage.statuspage_list_components
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
per_page integer no Number of components to return per page.
get_component Read

Get a single component from the configured Atlassian Statuspage page by component ID.

Lua path
app.integrations.statuspage.get_component
Full name
statuspage.statuspage_get_component
ParameterTypeRequiredDescription
id string yes The component ID to fetch.
create_component Write

Create a component on the configured Atlassian Statuspage page.

Lua path
app.integrations.statuspage.create_component
Full name
statuspage.statuspage_create_component
ParameterTypeRequiredDescription
name string yes Component name shown on the status page.
status string no Initial component status.
description string no Optional component description.
group_id string no Optional component group ID.
only_show_if_degraded boolean no Whether to hide the component unless degraded.
showcase boolean no Whether to show this component prominently.
update_component Write

Update an existing component on the configured Atlassian Statuspage page.

Lua path
app.integrations.statuspage.update_component
Full name
statuspage.statuspage_update_component
ParameterTypeRequiredDescription
id string yes The component ID to update.
name string no Updated component name.
status string no Updated component status.
description string no Updated component description.
group_id string no Updated component group ID.
only_show_if_degraded boolean no Whether to hide the component unless degraded.
showcase boolean no Whether to show this component prominently.
delete_component Write

Delete a component from the configured Atlassian Statuspage page.

Lua path
app.integrations.statuspage.delete_component
Full name
statuspage.statuspage_delete_component
ParameterTypeRequiredDescription
id string yes The component ID to delete.