
Rest Api Automation
- 73 installs
- 50 repo stars
- Updated June 18, 2026
- josiahsiegel/claude-plugin-marketplace
Helps with backend & apis tasks.
About
rest-api-automation is a Claude Code skill for backend & apis. It helps solo builders move faster with AI-assisted development.
- rest-api-automation
- Backend & APIs
- AI-coding skill
Rest Api Automation by the numbers
- 73 all-time installs (skills.sh)
- +4 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #3,071 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill rest-api-automationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 73 |
|---|---|
| repo stars | ★ 50 |
| Last updated | June 18, 2026 |
| Repository | josiahsiegel/claude-plugin-marketplace ↗ |
What it does
Helps with backend & apis tasks.
Files
Power BI REST API and Automation
Overview
The Power BI REST API provides programmatic access for embedding, administration, dataset management, and automation. The base URL is https://api.powerbi.com/v1.0/myorg/ for user context or https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/ for workspace context.
Authentication
Service Principal (Recommended for Automation)
1. Register app in Azure AD: Azure Portal > App registrations > New registration 2. Create client secret: Certificates & secrets > New client secret 3. Grant Power BI permissions: API permissions > Add > Power BI Service 4. Enable in Power BI Admin: Tenant settings > Allow service principals to use APIs > add security group 5. Add SP to workspace: Workspace > Access > Add the app as Member or Contributor
Get access token:
curl -X POST "https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id={clientId}&client_secret={secret}&scope=https://analysis.windows.net/powerbi/api/.default"PowerShell:
$body = @{
grant_type = "client_credentials"
client_id = $clientId
client_secret = $clientSecret
scope = "https://analysis.windows.net/powerbi/api/.default"
}
$token = (Invoke-RestMethod -Uri "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token" `
-Method Post -Body $body).access_tokenMaster User (Legacy, Not Recommended)
Uses a real user account with username/password grant. Requires Pro/PPU license. Subject to MFA and Conditional Access issues. Avoid for production.
API Operation Groups
| Group | Base Path | Purpose |
|---|---|---|
| Datasets | /datasets | Manage semantic models, refresh, parameters |
| Reports | /reports | Get, clone, export, rebind reports |
| Dashboards | /dashboards | Get dashboards and tiles |
| Groups (Workspaces) | /groups | Workspace CRUD, membership |
| Imports | /imports | Upload PBIX/XLSX files |
| Pipelines | /pipelines | Deployment pipeline automation |
| Admin | /admin | Tenant-wide operations (scanner, activity) |
| EmbedToken | /GenerateToken | Create embed tokens |
| Gateways | /gateways | Gateway and data source management |
| Dataflows | /dataflows | Dataflow management |
| Apps | /apps | App management |
| Capacities | /capacities | Capacity management |
| Goals | /goals | Scorecards and goals |
Common API Operations
Refresh a Semantic Model
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/refreshes
Authorization: Bearer {token}
Content-Type: application/json
{
"notifyOption": "MailOnFailure",
"retryCount": 2,
"type": "Full",
"commitMode": "transactional",
"applyRefreshPolicy": true
}Enhanced refresh (selective tables/partitions):
{
"type": "Full",
"commitMode": "transactional",
"objects": [
{ "table": "Sales", "partition": "Sales_Current" },
{ "table": "Products" }
]
}Get Refresh History
GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/refreshes?$top=10Import a PBIX File
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/imports?datasetDisplayName=SalesReport&nameConflict=CreateOrOverwrite
Authorization: Bearer {token}
Content-Type: multipart/form-data
[PBIX file as form data]Python:
import requests
url = f"https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/imports"
params = {"datasetDisplayName": "SalesReport", "nameConflict": "CreateOrOverwrite"}
headers = {"Authorization": f"Bearer {token}"}
with open("SalesReport.pbix", "rb") as f:
response = requests.post(url, params=params, headers=headers,
files={"file": ("SalesReport.pbix", f, "application/octet-stream")})Export Report to File
# Initiate export
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/ExportTo
{
"format": "PDF",
"powerBIReportConfiguration": {
"pages": [
{ "pageName": "ReportSection1" }
],
"defaultBookmark": { "name": "BookmarkName" }
}
}
# Poll for completion
GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/exports/{exportId}
# Download when status is "Succeeded"
GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/exports/{exportId}/fileSupported formats: PDF, PPTX, PNG, XLSX, CSV, XML, MHTML, IMAGE, ACCESSIBLEPDF
Update Dataset Parameters
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/Default.UpdateParameters
{
"updateDetails": [
{ "name": "ServerName", "newValue": "prod-server.database.windows.net" },
{ "name": "DatabaseName", "newValue": "ProdDB" }
]
}Take Over a Dataset
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/Default.TakeOverUpdate Data Source Credentials
PATCH https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}
{
"credentialDetails": {
"credentialType": "OAuth2",
"credentials": "{\"credentialData\":[{\"name\":\"accessToken\",\"value\":\"...\"}]}",
"encryptedConnection": "Encrypted",
"encryptionAlgorithm": "None",
"privacyLevel": "Organizational"
}
}Push Datasets (Real-Time)
Create and push data to datasets via API for real-time dashboards:
# Create push dataset
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets
{
"name": "RealTimeMetrics",
"defaultMode": "Push",
"tables": [
{
"name": "Metrics",
"columns": [
{ "name": "Timestamp", "dataType": "DateTime" },
{ "name": "Sensor", "dataType": "String" },
{ "name": "Value", "dataType": "Double" },
{ "name": "Status", "dataType": "String" }
]
}
]
}
# Push rows
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/tables/Metrics/rows
{
"rows": [
{ "Timestamp": "2026-04-03T10:30:00Z", "Sensor": "Temp-01", "Value": 23.5, "Status": "Normal" },
{ "Timestamp": "2026-04-03T10:30:00Z", "Sensor": "Temp-02", "Value": 45.2, "Status": "Warning" }
]
}
# Clear table
DELETE https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/tables/Metrics/rowsEmbed Tokens (Power BI Embedded)
Generate Embed Token for Report
POST https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/reports/{reportId}/GenerateToken
{
"accessLevel": "View",
"identities": [
{
"username": "user@domain.com",
"roles": ["RegionManager"],
"datasets": ["{datasetId}"]
}
]
}Generate Token for Multiple Items
POST https://api.powerbi.com/v1.0/myorg/GenerateToken
{
"datasets": [
{ "id": "{datasetId}" }
],
"reports": [
{ "id": "{reportId}", "allowEdit": false }
],
"targetWorkspaces": [
{ "id": "{workspaceId}" }
],
"identities": [
{
"username": "user@domain.com",
"roles": ["ViewerRole"],
"datasets": ["{datasetId}"]
}
]
}JavaScript SDK Embedding
<div id="reportContainer" style="height:600px;"></div>
<script src="https://cdn.jsdelivr.net/npm/powerbi-client/dist/powerbi.min.js"></script>
<script>
const embedConfig = {
type: 'report',
id: reportId,
embedUrl: embedUrl,
accessToken: embedToken,
tokenType: models.TokenType.Embed, // Use Embed for app-owns-data
settings: {
panes: {
filters: { visible: false },
pageNavigation: { visible: true }
},
bars: { statusBar: { visible: false } }
}
};
const container = document.getElementById('reportContainer');
const report = powerbi.embed(container, embedConfig);
// Token refresh handler
report.on('tokenExpired', async () => {
const newToken = await fetchNewToken(); // Call your backend
await report.setAccessToken(newToken);
});
// Event handlers
report.on('loaded', () => console.log('Report loaded'));
report.on('rendered', () => console.log('Report rendered'));
report.on('error', (event) => console.error(event.detail));
</script>Admin APIs
Scan Workspaces (Inventory)
# Initiate scan
POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo
{
"workspaces": ["{workspaceId1}", "{workspaceId2}"],
"datasetExpressions": true,
"datasetSchema": true,
"datasourceDetails": true,
"getArtifactUsers": true
}
# Get scan results
GET https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/{scanId}Activity Events (Audit)
GET https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='2026-04-01T00:00:00Z'&endDateTime='2026-04-02T00:00:00Z'&$filter=Activity eq 'ViewReport'List All Datasets in Tenant
GET https://api.powerbi.com/v1.0/myorg/admin/datasets?$top=100Additional Resources
Reference Files
- `references/api-endpoints-complete.md` -- Complete API endpoint reference with all parameters, response schemas, and error codes
Power BI REST API - Complete Endpoint Reference
Base URLs
| Context | Base URL |
|---|---|
| User (My Workspace) | https://api.powerbi.com/v1.0/myorg/ |
| Group (Workspace) | https://api.powerbi.com/v1.0/myorg/groups/{groupId}/ |
| Admin | https://api.powerbi.com/v1.0/myorg/admin/ |
Required header for all requests:
Authorization: Bearer {access_token}
Content-Type: application/jsonDatasets (Semantic Models)
| Method | Endpoint | Description |
|---|---|---|
| GET | /datasets | List datasets |
| GET | /datasets/{id} | Get dataset |
| DELETE | /datasets/{id} | Delete dataset |
| GET | /datasets/{id}/datasources | Get data sources |
| POST | /datasets/{id}/refreshes | Trigger refresh |
| GET | /datasets/{id}/refreshes | Get refresh history |
| POST | /datasets/{id}/Default.UpdateParameters | Update parameters |
| POST | /datasets/{id}/Default.TakeOver | Take ownership |
| POST | /datasets/{id}/Default.SetAllConnections | Update connections |
| GET | /datasets/{id}/Default.GetBoundGatewayDatasources | Get gateway sources |
| POST | /datasets/{id}/Default.BindToGateway | Bind to gateway |
| PATCH | /datasets/{id} | Update dataset properties |
| POST | /datasets/{id}/users | Add dataset user |
| GET | /datasets/{id}/users | Get dataset users |
| POST | /datasets | Create push dataset |
| POST | /datasets/{id}/tables/{tableName}/rows | Push rows |
| DELETE | /datasets/{id}/tables/{tableName}/rows | Clear table rows |
| GET | /datasets/{id}/tables | Get tables in push dataset |
| PUT | /datasets/{id}/tables/{tableName} | Update table schema |
Refresh Request Body
{
"notifyOption": "MailOnFailure",
"retryCount": 2,
"type": "Full",
"commitMode": "transactional",
"maxParallelism": 5,
"objects": [
{ "table": "TableName" },
{ "table": "TableName", "partition": "PartitionName" }
],
"applyRefreshPolicy": false
}notifyOption values: NoNotification, MailOnFailure, MailOnComplete
type values: Full, ClearValues, Calculate, DataOnly, Automatic, Defragment
Reports
| Method | Endpoint | Description |
|---|---|---|
| GET | /reports | List reports |
| GET | /reports/{id} | Get report |
| DELETE | /reports/{id} | Delete report |
| POST | /reports/{id}/Clone | Clone report |
| POST | /reports/{id}/Rebind | Rebind to different dataset |
| POST | /reports/{id}/ExportTo | Start export to file |
| GET | /reports/{id}/exports/{exportId} | Get export status |
| GET | /reports/{id}/exports/{exportId}/file | Download exported file |
| GET | /reports/{id}/pages | Get report pages |
| GET | /reports/{id}/pages/{pageName}/visuals | Get page visuals |
| POST | /reports/{id}/GenerateToken | Generate embed token |
| PATCH | /reports/{id} | Update report (name, description) |
Clone Request Body
{
"name": "Cloned Report Name",
"targetWorkspaceId": "{workspaceId}",
"targetModelId": "{datasetId}"
}Export Request Body
{
"format": "PDF",
"powerBIReportConfiguration": {
"pages": [
{
"pageName": "ReportSection1",
"visualName": "visual123"
}
],
"reportLevelFilters": [
{
"filter": "..."
}
],
"defaultBookmark": {
"name": "BookmarkName",
"state": "bookmarkStateBase64"
},
"locale": "en-US"
},
"paginatedReportConfiguration": {
"parameterValues": [
{ "name": "ParamName", "value": "ParamValue" }
]
}
}Groups (Workspaces)
| Method | Endpoint | Description |
|---|---|---|
| GET | /groups | List workspaces user has access to |
| POST | /groups | Create workspace |
| DELETE | /groups/{id} | Delete workspace |
| GET | /groups/{id}/users | Get workspace users |
| POST | /groups/{id}/users | Add user to workspace |
| PUT | /groups/{id}/users | Update user role |
| DELETE | /groups/{id}/users/{userId} | Remove user |
| POST | /groups/{id}/AssignToCapacity | Assign to capacity |
| POST | /groups/{id}/RestoreDeletedGroup | Restore deleted workspace |
Create Workspace
{
"name": "Sales Analytics Prod"
}Add User
{
"emailAddress": "user@domain.com",
"groupUserAccessRight": "Member"
}Access rights: Admin, Member, Contributor, Viewer
Imports
| Method | Endpoint | Description |
|---|---|---|
| POST | /imports?datasetDisplayName={name}&nameConflict={action} | Upload PBIX |
| GET | /imports/{id} | Get import status |
| GET | /imports | List imports |
nameConflict values: Abort, CreateOrOverwrite, GenerateUniqueName, Overwrite, Ignore
Deployment Pipelines
| Method | Endpoint | Description |
|---|---|---|
| GET | /pipelines | List pipelines |
| POST | /pipelines | Create pipeline |
| DELETE | /pipelines/{id} | Delete pipeline |
| GET | /pipelines/{id}/stages | Get stages |
| POST | /pipelines/{id}/stages/{stageOrder}/assignWorkspace | Assign workspace to stage |
| POST | /pipelines/{id}/deployAll | Deploy all items |
| POST | /pipelines/{id}/deploy | Deploy selective items |
| GET | /pipelines/{id}/operations/{operationId} | Get deploy status |
Deploy All
{
"sourceStageOrder": 0,
"isBackwardDeployment": false,
"newWorkspace": null,
"options": {
"allowOverwriteArtifact": true,
"allowCreateArtifact": true,
"allowOverwriteTargetArtifactLabel": true,
"allowPurgeData": false,
"allowTakeOver": true,
"allowSkipTilesWithMissingPrerequisites": true
},
"note": "Release v2.1.0"
}Deploy Selective
{
"sourceStageOrder": 0,
"datasets": [{ "sourceId": "{datasetId}" }],
"reports": [{ "sourceId": "{reportId}" }],
"dashboards": [{ "sourceId": "{dashboardId}" }],
"options": { "allowOverwriteArtifact": true }
}Embed Tokens
| Method | Endpoint | Description |
|---|---|---|
| POST | /reports/{id}/GenerateToken | Token for single report |
| POST | /dashboards/{id}/GenerateToken | Token for dashboard |
| POST | /datasets/{id}/GenerateToken | Token for dataset (Q&A, create report) |
| POST | /GenerateToken | Multi-resource token |
Multi-Resource Token
{
"datasets": [
{ "id": "{datasetId}", "xmlaPermissions": "ReadOnly" }
],
"reports": [
{ "id": "{reportId}", "allowEdit": true }
],
"targetWorkspaces": [
{ "id": "{workspaceId}" }
],
"identities": [
{
"username": "user@domain.com",
"roles": ["ReaderRole"],
"datasets": ["{datasetId}"]
}
],
"lifetimeInMinutes": 60
}Admin APIs
| Method | Endpoint | Description |
|---|---|---|
| GET | /admin/groups | List all workspaces in tenant |
| GET | /admin/groups/{id}/users | Get workspace users |
| POST | /admin/groups/{id}/users | Add user to any workspace |
| GET | /admin/datasets | List all datasets in tenant |
| GET | /admin/reports | List all reports in tenant |
| GET | /admin/dashboards | List all dashboards in tenant |
| GET | /admin/imports | List all imports |
| GET | /admin/activityevents | Get activity events (audit) |
| POST | /admin/workspaces/getInfo | Initiate workspace scan |
| GET | /admin/workspaces/scanResult/{scanId} | Get scan results |
| GET | /admin/capacities | List all capacities |
| POST | /admin/groups/{id}/AssignToCapacity | Assign workspace to capacity |
| GET | /admin/tenantSettings | Get tenant settings |
Gateways
| Method | Endpoint | Description |
|---|---|---|
| GET | /gateways | List gateways |
| GET | /gateways/{id} | Get gateway |
| GET | /gateways/{id}/datasources | List data sources |
| POST | /gateways/{id}/datasources | Create data source |
| DELETE | /gateways/{id}/datasources/{dsId} | Delete data source |
| PATCH | /gateways/{id}/datasources/{dsId} | Update credentials |
| GET | /gateways/{id}/datasources/{dsId}/status | Check source status |
Error Codes
| HTTP Status | Error Code | Meaning |
|---|---|---|
| 400 | BadRequest | Invalid request body |
| 401 | Unauthorized | Invalid or expired token |
| 403 | Forbidden | Insufficient permissions |
| 404 | NotFound | Resource not found |
| 409 | Conflict | Name conflict during import |
| 429 | TooManyRequests | Rate limit exceeded (retry after header) |
| 500 | InternalServerError | Service error (retry) |
Rate Limits
| Operation | Limit |
|---|---|
| General API calls | 200 requests per minute per user |
| Admin APIs | 200 requests per minute per tenant |
| Refresh (Pro) | 8 per day per dataset |
| Refresh (Premium/PPU) | 48 per day per dataset |
| Embed token generation | 600 per hour per workspace |
| Export to file | 5 concurrent per user |
| Import PBIX | 50 MB for shared capacity, 1 GB for Premium |
SDK Libraries
| Language | Package | Install |
|---|---|---|
| .NET | Microsoft.PowerBI.Api | dotnet add package Microsoft.PowerBI.Api |
| Python | azure-mgmt-powerbiembedded | pip install azure-mgmt-powerbiembedded |
| JavaScript | powerbi-client | npm install powerbi-client |
| PowerShell | MicrosoftPowerBIMgmt | Install-Module MicrosoftPowerBIMgmt |