arazzo: 1.0.1
info:
title: Dataiku Run Scenario and Poll to Completion
summary: Trigger a scenario run and poll its lightweight status until it is no longer running.
description: >-
Automates the run-then-poll pattern for Dataiku DSS scenarios. The workflow
confirms the scenario exists, triggers a run, and then repeatedly polls the
lightweight scenario status endpoint until the scenario reports that it is
no longer running, branching back into the poll step while the run is still
in progress. Every step inlines its request so the flow can be executed
without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: scenariosApi
url: ../openapi/dataiku-scenarios-api-openapi.yml
type: openapi
workflows:
- workflowId: run-scenario-and-poll
summary: Run a scenario and poll its status until the run finishes.
description: >-
Verifies the scenario, triggers a run, and polls the light status endpoint
until running is false.
inputs:
type: object
required:
- apiKey
- projectKey
- scenarioId
properties:
apiKey:
type: string
description: DSS API key passed as a Bearer token in the Authorization header.
projectKey:
type: string
description: Project key containing the scenario.
scenarioId:
type: string
description: Identifier of the scenario to run.
steps:
- stepId: verifyScenario
description: Confirm the scenario exists and is active before triggering a run.
operationId: getScenario
parameters:
- name: Authorization
in: header
value: Bearer $inputs.apiKey
- name: projectKey
in: path
value: $inputs.projectKey
- name: scenarioId
in: path
value: $inputs.scenarioId
successCriteria:
- condition: $statusCode == 200
outputs:
scenarioId: $response.body#/id
- stepId: triggerRun
description: Trigger execution of the scenario.
operationId: runScenario
parameters:
- name: Authorization
in: header
value: Bearer $inputs.apiKey
- name: projectKey
in: path
value: $inputs.projectKey
- name: scenarioId
in: path
value: $inputs.scenarioId
successCriteria:
- condition: $statusCode == 200
outputs:
runId: $response.body#/id
- stepId: pollStatus
description: >-
Poll the lightweight scenario status. While the scenario is still running,
loop back and poll again; once it stops running, the workflow ends.
operationId: getScenarioRunStatus
parameters:
- name: Authorization
in: header
value: Bearer $inputs.apiKey
- name: projectKey
in: path
value: $inputs.projectKey
- name: scenarioId
in: path
value: $inputs.scenarioId
successCriteria:
- condition: $statusCode == 200
outputs:
running: $response.body#/running
lastRun: $response.body#/lastRun
onSuccess:
- name: stillRunning
type: goto
stepId: pollStatus
criteria:
- condition: $response.body#/running == true
- name: finished
type: end
criteria:
- condition: $response.body#/running == false
outputs:
runId: $steps.triggerRun.outputs.runId
lastRun: $steps.pollStatus.outputs.lastRun
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.