Skip to main content

Actions

An action is a reusable request a job runs: an HTTP request or a SQL stored procedure. One action can serve many jobs through parameters: a single "refresh Power BI model" action with {{p:workspaceId}} and {{p:datasetId}} parameters, called with different values from each job.

Actions in the sidebar lists them with Name, Kind, Details, Params and Enabled, and actions Run now, lineage, View log, Copy (a new action prefilled from this one) and Copy API trigger URL. New Action and From template create one; the plan caps the number of actions (Basic 10, Standard 20).

Like jobs, an existing action opens View only with a pencil to edit; the kind cannot be changed after creation.

HTTP request​

Request

  • Method — GET, POST, PUT or PATCH. GET sends no body.
  • URL — may contain {{variable}} (install-wide) and {{p:name}} (a parameter of this action); clicking an orange chip creates either.
  • Body, Headers, Query parameters (appended to the URL, encoded).
  • Expected statuses (default 200, 201, 202, 204) and Request timeout (seconds) (default 60).

Action parameters — the values a call site supplies: Name, Description, Required and Default value. Reference them as {{p:name}} in the URL, headers, body and auth fields. Typing {{p:new}} and clicking the chip declares the parameter.

Auth — No auth, Static bearer token, Basic (username + password), Session bearer (a token URL and body, for example a client-credentials flow) or Microsoft sign-in. The first four are set up with Configure credentials…. Microsoft sign-in asks for the Scope (for Power BI https://analysis.windows.net/powerbi/api/.default), optionally a Tenant and another app registration under Advanced, and after the first save a Connect… button that opens the sign-in popup and stores the refresh token. The action's row then shows when the token expires; it is renewed on every run and lapses after 90 days unused.

Wait for completion — off, the action completes as soon as the response status matches an expected status (fire-and-forget). On, the action polls until the operation reaches a terminal state: by default it follows the Azure-AsyncOperation, Operation-Location or Location header, every Interval (seconds) (default 10) up to Max attempts (default 60). Manual poll URL & custom terminal-state detection sets a poll URL, method, headers, parameters and body of its own (which may reference the first call's outputs as {{o:name}}), and a Success JSON path with Success values and Failure values. For a Power BI refresh: path value.0.status, success Completed, failure Failed and Disabled.

Output — capture values out of the JSON response so a later action can use them through a job variable: Run to preview fires the real request and lets you click the field or the array; each capture has a Name, a Kind (Single value or List), a Path, for lists a Describe with field, and Sensitive, which logs the value as redacted while still substituting it at run time. A path that does not fit the response fails the action; an empty list stays green.

Try — Run action fires the saved action against the real target and shows the verdict, the polling attempts and the captured outputs. The action is saved first.

SQL stored procedure​

Command — the ExportSystem (a SQL Server destination; it is the default and a job item can run against another), the Stored procedure, and its Input parameters, or Edit raw command… for a hand-written EXEC. Only EXEC / EXECUTE of user-defined procedures is allowed, and the procedure runs in autocommit.

Output — Run discovery preview executes the procedure once and lists its OUTPUT parameters and Result set columns, each with a Capture as name and kind, to feed job variables.

Refreshing a Power BI semantic model​

There is no separate Power BI object; a refresh is an HTTP action:

  1. Create an HTTP action, method POST, URL https://api.powerbi.com/v1.0/myorg/groups/{{p:workspaceId}}/datasets/{{p:datasetId}}/refreshes, with the two parameters declared.
  2. Auth: Microsoft sign-in with the Power BI scope, save, Connect… and sign in as an account that may refresh the model. Or use Session bearer with a client-credentials body for a service principal that is a member of the workspace.
  3. Wait for completion on, with the manual poll URL https://api.powerbi.com/v1.0/myorg/groups/{{p:workspaceId}}/datasets/{{p:datasetId}}/refreshes?$top=1, success path value.0.status, success Completed, failure Failed, Disabled.
  4. Add the action to the After refresh data phase of a job and supply the workspace and dataset ids per call.