Power BI Dataflow REST API Reference
Power BI Dataflow REST API Reference
reference
Dataflow operations
1. Import Dataflow (Preview)
The Import Dataflow operation creates a new Dataflow from a JSON schema definition and returns
the Dataflow ID and the properties of the Dataflow created. A Dataflow can be created in a Group.
Request
POST
/v1.0/myorg/groups/{groupId}/import?datasetDisplayName=<name>.json
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Response
Status code
Code Description
202 Accepted
Location header
N/A
Content-Type
Body schema
{
"id":"<guid>"
}
Body example
{
"id":"51e47fc5-48fd-4826-89f0-021bd3a80ab "
}
2. Export Dataflow Definition (Preview)
The Export Dataflow Definition operation retrieves a Dataflow definition as a JSON file (.DPLX) based
on its ID
Request
GET
/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Response
A json containing the dataflow definition file
Status code
Code Description
200 OK
Location header
N/A
3. Delete Dataflow (Preview)
The Delete Dataflow operation deletes a dataflow from the CDS for Analytics storage, including its
definition file and actual model.
Request
DELETE /v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Response
Status code
Code Description
401 Unauthorized.
The Get All Dataflows operation retrieves a list of all dataflows in the user's group (workspace)
Request
GET
/v1.0/myorg/groups/{groupId}/dataflows/
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
groupId The group guid to retrieve the dataflow definition files from string
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Response
A json containing the metadata of the dataflows in the group
Status code
Code Description
200 OK
Location header
N/A
Content-Type
application/json
Body schema
{
"odata.context": "string",
"value": [
{
"objectId": "string",
"name": "string",
"description": "string"
}
]
}
Body example
{
"@odata.context": "https://api.powerbi.com/v1.0/myorg/$metadata#
dataflows",
"value": [
{
"objectId": "bd32e5c0-363f-430b-a03b-5535a4804b9b",
"name": "AdventureWorks",
"description": "Our Adventure Works "
}
]
}
5. Available features (Preview)
The Available Features operation indicates the capabilities open in the tenant for the current user
Request
GET
/v1.0/myorg/availableFeatures
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
None.
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Response
A json containing the list of features and their state
Status code
Code Description
200 OK
Location header
N/A
Content-Type
application/json
Body schema
{
"@odata.context":"https://api.powerbi.com/v1.0/myorg/$metadata#AvailableFeat
ures",
"name":"string",
"state":"string",
"extendedState":"string",
"additionalInfo":
{
"usage":"int"
}
}
Body example
{
"@odata.context": "
https://api.powerbi.com/v1.0/myorg/$metadata#Microsoft.PowerBI.ServiceContra
cts.Api.AvailableFeatures",
"features": [
{
"name": "cdsa",
"state": "Enabled | Disabled",
"extendedState": "Enabled | DisabledByAdmin | UserNotLicensed",
"additionalInfo": null
},
{
"name": "embedTrial",
"state": "Enabled | Disabled",
"extendedState": "Enabled | DisabledByAdmin | UserNotLicensed",
"additionalInfo": {
"usage": 0
}
}
}
6. Get Dataflow Data Sources (Preview)
The Get Dataflows Data Sources retrieves a list of all of the Data Sources defined in the dataflow
definition file for a given dataflow.
Request
GET
/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/datasources
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Header
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Response
A list of data sources.
Status code
Code Description
200 OK
Location header
N/A
Content-Type
application/json
Body schema
{
"datasourceId" : "<Guid>",
"gatewayId": "<Guid>",
"datasourceType":"Sql",
"connectionDetails":
{
"server":"MyServer",
"database":"MyDatabase"
}
}
Body example
{
"datasourceId" : "51e47fc5-48fd-4826-89f0-021bd3a80abd",
"gatewayId": "51e47fc5-48fd-4826-89f0-021bd3a80abd",
"datasourceType":"Sql",
"connectionDetails":
{
"server":"MyServer",
"database":"MyDatabase"
}
}
7. Create Dataflow Reference to external storage (Preview)
The Create Dataflow Reference operation creates a new dataflow artifact in the Power BI service that is
referencing a dataflow hosted in an external storage. The external storage includes both the dataflow
definition file and the dataflow data.
Request
POST
/v1.0/myorg/groups/{groupId}/dataflows/createReference
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Body schema
For a list of Power BI REST data types, see Supported data types.
{
"name": string,
"description": string,
"subscriptionId": guid,
"resourceGroupName": string,
"vaultName": string,
"secretPath": string
}
Body example
{
"name": "Dataflow Reference",
"description": "Dataflow description",
"subscriptionId": "51e47fc5-48fd-4826-89f0-021bd3a80abd",
"resourceGroupName":"resourceGroupName",
"vaultName":"vaultName",
"secretPath": "secretPath"
}
Response
A json containing guid for the created dataflow reference
Status code
Code Description
200 OK
Location header
N/A
Content-Type
Application/json
Body schema
{
"id":"<guid>"
}
Body example
{
"id": “075de301-cfff-4808-a1a2-4ea749796695”
}
8. Update Dataflow Schedule (Preview)
The Update Dataflow Schedule operation updates the Dataflow refresh schedule configuration.
Request
PATCH
/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/refreshesSchedule
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Body schema
For a list of Power BI REST data types, see Supported data types.
{
"value": {
"days": string[],
"times": string[],
"enabled": boolean,
"localTimeZoneId": string
}
}
Body example
{
"value": {
"days": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"times": [
"10:00",
"16:00"
],
"enabled": true,
"localTimeZoneId": "UTC"
}
}
Response
Status code
Code Description
200 OK
Location header
N/A
9. Refresh Dataflow (Preview)
Request
Post
/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}/refreshes
None.
Groups
Groups are a collection of unified Azure Active Directory groups that the user is a member of and is
available in the Power BI service. These are referred to as app workspaces within the Power BI service. To
learn how to create a group, see Create an app workspace.
Uri parameter
Header
Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Response
Status code
Code Description
200 OK
Location header
N/A