KosmoKrator

analytics

Microsoft Power BI Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Microsoft Power BI KosmoKrator integration.

7 functions 7 read 0 write Manual OAuth token auth

Lua Namespace

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

Microsoft Power BI Integration

Tools for interacting with the Microsoft Power BI REST API.

Tools

powerbi_list_workspaces

List Power BI workspaces (groups) the authenticated user has access to.

Parameters:

  • top (integer, optional): Maximum number of workspaces to return. Default: 100.

Returns: Array of workspace objects with id, name, isReadOnly, isOnDedicatedCapacity, etc.


powerbi_get_workspace

Get details for a specific Power BI workspace by its ID.

Parameters:

  • id (string, required): The workspace (group) ID (a GUID).

Returns: Workspace object with full metadata.


powerbi_list_datasets

List datasets within a Power BI workspace.

Parameters:

  • workspace_id (string, required): The workspace (group) ID (a GUID).

Returns: Array of dataset objects with id, name, webUrl, addRowsAPIEnabled, isRefreshable, etc.


powerbi_get_dataset

Get details for a specific dataset within a workspace.

Parameters:

  • workspace_id (string, required): The workspace (group) ID (a GUID).
  • dataset_id (string, required): The dataset ID (a GUID).

Returns: Dataset object with schema and configuration details.


powerbi_list_reports

List reports within a Power BI workspace.

Parameters:

  • workspace_id (string, required): The workspace (group) ID (a GUID).

Returns: Array of report objects with id, name, webUrl, embedUrl, datasetId, etc.


powerbi_get_report

Get details for a specific report within a workspace.

Parameters:

  • workspace_id (string, required): The workspace (group) ID (a GUID).
  • report_id (string, required): The report ID (a GUID).

Returns: Report object with embed URL, description, and associated dataset.


powerbi_get_current_user

Get the authenticated user’s Power BI profile.

Parameters: None.

Returns: User profile with id, displayName, email, etc.

Raw agent markdown
# Microsoft Power BI Integration

Tools for interacting with the Microsoft Power BI REST API.

## Tools

### powerbi_list_workspaces
List Power BI workspaces (groups) the authenticated user has access to.

**Parameters:**
- `top` (integer, optional): Maximum number of workspaces to return. Default: 100.

**Returns:** Array of workspace objects with `id`, `name`, `isReadOnly`, `isOnDedicatedCapacity`, etc.

---

### powerbi_get_workspace
Get details for a specific Power BI workspace by its ID.

**Parameters:**
- `id` (string, required): The workspace (group) ID (a GUID).

**Returns:** Workspace object with full metadata.

---

### powerbi_list_datasets
List datasets within a Power BI workspace.

**Parameters:**
- `workspace_id` (string, required): The workspace (group) ID (a GUID).

**Returns:** Array of dataset objects with `id`, `name`, `webUrl`, `addRowsAPIEnabled`, `isRefreshable`, etc.

---

### powerbi_get_dataset
Get details for a specific dataset within a workspace.

**Parameters:**
- `workspace_id` (string, required): The workspace (group) ID (a GUID).
- `dataset_id` (string, required): The dataset ID (a GUID).

**Returns:** Dataset object with schema and configuration details.

---

### powerbi_list_reports
List reports within a Power BI workspace.

**Parameters:**
- `workspace_id` (string, required): The workspace (group) ID (a GUID).

**Returns:** Array of report objects with `id`, `name`, `webUrl`, `embedUrl`, `datasetId`, etc.

---

### powerbi_get_report
Get details for a specific report within a workspace.

**Parameters:**
- `workspace_id` (string, required): The workspace (group) ID (a GUID).
- `report_id` (string, required): The report ID (a GUID).

**Returns:** Report object with embed URL, description, and associated dataset.

---

### powerbi_get_current_user
Get the authenticated user's Power BI profile.

**Parameters:** None.

**Returns:** User profile with `id`, `displayName`, `email`, etc.

Metadata-Derived Lua Example

local result = app.integrations.powerbi.powerbi_list_workspaces({
  top = 1
})
print(result)

Functions

powerbi_list_workspaces

List Power BI workspaces (groups) the authenticated user has access to. Returns workspace IDs and names that can be used to query datasets and reports.

Operation
Read read
Full name
powerbi.powerbi_list_workspaces
ParameterTypeRequiredDescription
top integer no Maximum number of workspaces to return (default: 100).

powerbi_get_workspace

Get details for a specific Power BI workspace (group) by its ID.

Operation
Read read
Full name
powerbi.powerbi_get_workspace
ParameterTypeRequiredDescription
id string yes The workspace (group) ID (a GUID).

powerbi_list_datasets

List datasets within a Power BI workspace. Returns dataset IDs, names, and configuration details.

Operation
Read read
Full name
powerbi.powerbi_list_datasets
ParameterTypeRequiredDescription
workspace_id string yes The workspace (group) ID containing the datasets (a GUID).

powerbi_get_dataset

Get details for a specific Power BI dataset within a workspace, including schema and refresh configuration.

Operation
Read read
Full name
powerbi.powerbi_get_dataset
ParameterTypeRequiredDescription
workspace_id string yes The workspace (group) ID (a GUID).
dataset_id string yes The dataset ID (a GUID).

powerbi_list_reports

List reports within a Power BI workspace. Returns report IDs, names, embed URLs, and associated dataset IDs.

Operation
Read read
Full name
powerbi.powerbi_list_reports
ParameterTypeRequiredDescription
workspace_id string yes The workspace (group) ID containing the reports (a GUID).

powerbi_get_report

Get details for a specific Power BI report within a workspace, including embed URL and associated dataset.

Operation
Read read
Full name
powerbi.powerbi_get_report
ParameterTypeRequiredDescription
workspace_id string yes The workspace (group) ID (a GUID).
report_id string yes The report ID (a GUID).

powerbi_get_current_user

Get the authenticated user's Power BI profile, including display name and email address.

Operation
Read read
Full name
powerbi.powerbi_get_current_user
ParameterTypeRequiredDescription
No parameters.