Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Eventhouses with KQL Databases provide a solution for handling and analyzing large volumes of data, particularly in scenarios requiring real-time analytics and exploration. They're designed to handle real-time data streams efficiently, which lets organizations ingest, process, and analyze data in near real-time.
Combining the Fabric APIs with the existing KQL APIs allows you to fully automate your deployment of Eventhouse with KQL Databases. With the Fabric APIs I’m able create/update/delete items in Fabric and with the KQL APIs I can access the data plane of a resource and do things like create tables, change policies, etc..
Below we'll utilize the Fabric APIs to create Eventhouse and KQL Database while using the KQL APIs to create a table and apply a few policies.
Request
POST https://api.fabric.microsoft.com/v1/workspaces/<workspaceId>/eventhouses
Body
{
displayName: "SampleEventhouse",
}{
"id": "<Item_Id>",
"type": "Eventhouse",
"displayName": "SampleEventhouse",
"description": "",
"workspaceId": "<Workspace_ID>"
}
Request
POST https://api.fabric.microsoft.com/v1/workspaces/<workspaceId>/kqlDatabases
{
"displayName": "SampleDB",
"creationPayload": {
"databaseType": "ReadWrite",
"parentEventhouseItemId": "<ItemID from Step1>"
}
Request
GET https://api.fabric.microsoft.com/v1/workspaces/<workspaceId>/eventhouses/<eventhouseId>
{
"id": "<Eventhouse_ID>",
"type": "Eventhouse",
"displayName": "SampleEventhouse",
"description": "",
"workspaceId": "<Workspace_ID>",
"properties": {
"queryServiceUri": "<Query URI>",
"ingestionServiceUri": "<Ingestion URI>",
"databasesItemIds": [
<Array of DBs>
],
"minimumConsumptionUnits": null
}
}Request
<queryServiceUri>/ v1/rest/mgmt.
{
'csl': '.execute database script with (ContinueOnErrors=true) <| .create-merge table T(a:string, b:string); .alter-merge table T policy retention softdelete = 10d; .alter table T policy caching hot = 3d',
'db': '<DB Name or Item ID>'
}<Results of each command being executed>
| Action | Document Link |
| Create Eventhouse | Items - Create Eventhouse - REST API (Eventhouse) | Microsoft Learn |
| Delete Eventhouse | Items - Delete Eventhouse - REST API (Eventhouse) | Microsoft Learn |
| Get Eventhouse | Items - Get Eventhouse - REST API (Eventhouse) | Microsoft Learn |
| Update Eventhouse | Items - Update Eventhouse - REST API (Eventhouse) | Microsoft Learn |
| List Items | Items - List Eventhouses - REST API (Eventhouse) | Microsoft Learn |
| Action | Document Link |
| Create KQL Database | Items - Create KQL Database - REST API (KQLDatabase) | Microsoft Learn |
| Delete KQL Database | Items - Delete KQL Database - REST API (KQLDatabase) | Microsoft Learn |
| Get KQL Database | Items - Get KQL Database - REST API (KQLDatabase) | Microsoft Learn |
| Update KQL Database | Items - Update KQL Database - REST API (KQLDatabase) | Microsoft Learn |
| List KQL Databases | Items - List KQL Databases - REST API (KQLDatabase) | Microsoft Learn |
| Action | Document Link |
| Delete KQL Queryset | Items - Delete KQL Querysets - REST API (KQLDatabase) | Microsoft Learn |
| Get KQL Queryset | Items - Get KQL Queryset - REST API (KQLQueryset) | Microsoft Learn |
| List KQL Queryset | Items - List KQL Querysets - REST API (KQLQueryset) | Microsoft Learn |
| Update KQL Queryset | Items - Update KQL Queryset - REST API (KQLQueryset) | Microsoft Learn |
| Create KQL Dashboard | Creates a KQL dashboard in the specified workspace. |
| Delete KQL Dashboard | Deletes the specified KQL dashboard. |
| Get KQL Dashboard | Returns properties of the specified KQL dashboard. |
| Get KQL Dashboard Definition | Returns the specified KQL dashboard public definition. |
| List KQL Dashboards | Returns a list of KQL dashboards from the specified workspace. |
| Update KQL Dashboard | Updates the properties of the specified KQL dashboard. |
| Update KQL Dashboard Definition | Overrides the definition for the specified KQL dashboard. |
| Action | Document Link |
| Query/Management | Query/management HTTP request - Azure Data Explorer & Real-Time Analytics | Microsoft Learn |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.