Pipelines - Assign Workspace

Assigns the specified workspace to the specified deployment pipeline stage.

Required Scope

Pipeline.ReadWrite.All and Workspace.ReadWrite.All

Limitations

  • The specified deployment pipeline stage isn't already assigned.
  • You must be an admin of the specified workspace.
  • The specified workspace isn't assigned to any other deployment pipeline.
  • This operation will fail if there's an active deployment operation.

POST https://api.powerbi.com/v1.0/myorg/pipelines/{pipelineId}/stages/{stageOrder}/assignWorkspace

URI Parameters

Name In Required Type Description
pipelineId
path True
  • string
uuid

The deployment pipeline ID

stageOrder
path True
  • integer
int32

The deployment pipeline stage order. Development (0), Test (1), Production (2).

Request Body

Name Required Type Description
workspaceId True
  • string

The workspace ID.

Responses

Name Type Description
200 OK

OK

Examples

Assign a workspace to a deployment pipeline example

Sample Request

POST https://api.powerbi.com/v1.0/myorg/pipelines/a5ded933-57b7-41f4-b072-ed4c1f9d5824/stages/0/assignWorkspace
{
  "workspaceId": "4de5bcc4-2c88-4efe-b827-4ee7b289b496"
}

Sample Response

Definitions

AssignWorkspaceRequest

A request to assign a workspace to a deployment pipeline stage

Name Type Description
workspaceId
  • string

The workspace ID.