Initial setup: Fabric API helper scripts and project config
- CLAUDE.md with API reference, auth setup, and workspace details - scripts/fabric-api.sh: helper functions for Fabric REST API - scripts/refresh-token.sh: token refresh and .env writer - .gitignore: protect .env and .omc/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
9ce0527ac5
4 changed files with 166 additions and 0 deletions
64
CLAUDE.md
Normal file
64
CLAUDE.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Microsoft Fabric Environment Documentation
|
||||
|
||||
## Project Goal
|
||||
Document and analyze Microsoft Fabric environments via the Fabric REST API.
|
||||
|
||||
## Authentication
|
||||
- **Tenant ID:** `2bbd7e41-02c9-4b4e-8168-339f900c4319`
|
||||
- **Account:** `matthias.gessenay@corporatesoftware.ch`
|
||||
- **Subscription:** Microsoft Azure Sponsorship
|
||||
|
||||
### Getting a fresh token
|
||||
```bash
|
||||
# Refresh token (writes to .env):
|
||||
bash scripts/refresh-token.sh
|
||||
|
||||
# Or inline:
|
||||
FABRIC_TOKEN=$(az account get-access-token --resource "https://api.fabric.microsoft.com" --query accessToken -o tsv)
|
||||
```
|
||||
|
||||
### Using the Fabric API
|
||||
```bash
|
||||
# Source the helper:
|
||||
source scripts/fabric-api.sh
|
||||
|
||||
# List workspaces:
|
||||
list_workspaces
|
||||
|
||||
# List items in a workspace:
|
||||
list_workspace_items <workspace-id>
|
||||
|
||||
# Document a workspace:
|
||||
document_workspace <workspace-id>
|
||||
```
|
||||
|
||||
## Fabric REST API Reference
|
||||
- **Base URL:** `https://api.fabric.microsoft.com/v1`
|
||||
- **Auth Header:** `Authorization: Bearer $FABRIC_TOKEN`
|
||||
|
||||
### Key Endpoints
|
||||
| Endpoint | Description |
|
||||
|----------|-------------|
|
||||
| `GET /workspaces` | List all workspaces |
|
||||
| `GET /workspaces/{id}` | Get workspace details |
|
||||
| `GET /workspaces/{id}/items` | List items in a workspace |
|
||||
| `GET /capacities` | List capacities |
|
||||
| `GET /workspaces/{id}/lakehouses/{id}` | Get lakehouse details |
|
||||
| `GET /workspaces/{id}/lakehouses/{id}/tables` | List lakehouse tables |
|
||||
| `GET /workspaces/{id}/semanticmodels/{id}` | Get semantic model details |
|
||||
| `GET /workspaces/{id}/notebooks/{id}` | Get notebook details |
|
||||
| `GET /workspaces/{id}/reports/{id}` | Get report details |
|
||||
|
||||
### Item Types
|
||||
Lakehouse, SQLEndpoint, SemanticModel, Report, Notebook, DataPipeline, Dataflow, Warehouse, Environment, SparkJobDefinition, MirroredDatabase, Eventstream, KQLDatabase, KQLQueryset, MLModel, MLExperiment
|
||||
|
||||
## Key Workspaces
|
||||
| Workspace | ID |
|
||||
|-----------|-----|
|
||||
| mf-202603-smstack | `feb90cd8-3d10-4429-8a97-fc53b4b47a8b` |
|
||||
|
||||
## Conventions
|
||||
- Always refresh token before API calls: `FABRIC_TOKEN=$(az account get-access-token --resource "https://api.fabric.microsoft.com" --query accessToken -o tsv)`
|
||||
- Use `jq` for JSON parsing
|
||||
- Output documentation as Markdown
|
||||
- Never commit `.env` files (contains tokens)
|
||||
Loading…
Add table
Add a link
Reference in a new issue