analytics
Google Admin Reports Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Google Admin Reports KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.google_admin_reports.*.
Use lua_read_doc("integrations.google-admin-reports") 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
Google Admin Reports workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.google_admin_reports.user_usage_get({}))' --json kosmo integrations:lua --eval 'print(docs.read("google-admin-reports"))' --json
kosmo integrations:lua --eval 'print(docs.read("google-admin-reports.user_usage_get"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local google_admin_reports = app.integrations.google_admin_reports
local result = google_admin_reports.user_usage_get({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.google_admin_reports, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.google_admin_reports.default.* or app.integrations.google_admin_reports.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Google Admin Reports, use the narrower 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.
Google Admin Reports
Google Admin Reports tools are exposed under app.integrations.google_admin_reports. This package is generated from Google’s official Admin SDK Reports API Discovery document and exposes 6 REST methods.
Use it for Workspace audit and reporting workflows: activity logs, user usage reports, customer usage reports, entity usage reports, activity watch channels, and channel stop.
Examples
local activity = app.integrations.google_admin_reports.google_admin_reports_activities_list({
userKey = "all",
applicationName = "login",
maxResults = 10
})
local usage = app.integrations.google_admin_reports.google_admin_reports_customer_usage_reports_get({
date = "2026-05-01"
})
Returned data is the parsed JSON response from the Admin SDK Reports API. Reports access requires administrator privileges and the appropriate readonly or audit scopes.
Raw agent markdown
# Google Admin Reports
Google Admin Reports tools are exposed under `app.integrations.google_admin_reports`. This package is generated from Google's official Admin SDK Reports API Discovery document and exposes 6 REST methods.
Use it for Workspace audit and reporting workflows: activity logs, user usage reports, customer usage reports, entity usage reports, activity watch channels, and channel stop.
## Examples
```lua
local activity = app.integrations.google_admin_reports.google_admin_reports_activities_list({
userKey = "all",
applicationName = "login",
maxResults = 10
})
local usage = app.integrations.google_admin_reports.google_admin_reports_customer_usage_reports_get({
date = "2026-05-01"
})
```
Returned data is the parsed JSON response from the Admin SDK Reports API. Reports access requires administrator privileges and the appropriate readonly or audit scopes. local result = app.integrations.google_admin_reports.user_usage_get({})
print(result) Functions
user_usage_get Read
User Usage Report Get (GET /admin/reports/v1/usage/users/{userKey}/dates/{date}).
- Lua path
app.integrations.google_admin_reports.user_usage_get- Full name
google-admin-reports.google_admin_reports_user_usage_report_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
customer_usage_get Read
Customer Usage Reports Get (GET /admin/reports/v1/usage/dates/{date}).
- Lua path
app.integrations.google_admin_reports.customer_usage_get- Full name
google-admin-reports.google_admin_reports_customer_usage_reports_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
entity_usage_get Read
Entity Usage Reports Get (GET /admin/reports/v1/usage/{entityType}/{entityKey}/dates/{date}).
- Lua path
app.integrations.google_admin_reports.entity_usage_get- Full name
google-admin-reports.google_admin_reports_entity_usage_reports_get
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
channels_stop Write
Channels Stop (POST /admin/reports_v1/channels/stop).
- Lua path
app.integrations.google_admin_reports.channels_stop- Full name
google-admin-reports.google_admin_reports_channels_stop
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
activities_list Read
Activities List (GET /admin/reports/v1/activity/users/{userKey}/applications/{applicationName}).
- Lua path
app.integrations.google_admin_reports.activities_list- Full name
google-admin-reports.google_admin_reports_activities_list
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
activities_watch Write
Activities Watch (POST /admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch).
- Lua path
app.integrations.google_admin_reports.activities_watch- Full name
google-admin-reports.google_admin_reports_activities_watch
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||