Skip to content

Commit

Permalink
- AUTO-737 Add API endpoint to load flow execution context by its id
Browse files Browse the repository at this point in the history
  • Loading branch information
Valodya committed Aug 30, 2024
1 parent 8dbe9c9 commit 80ec2c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/automations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ export default class Automations {
})
}

async loadFlowExecutionContext(executionId) {
if (!executionId || typeof executionId !== 'string') {
throw new Error('The "executionId" argument must be provided and must be a string.')
}

return this.app.request.get({
url : this.app.urls.automationFlowExecutionContext(),
query: {
executionId,
}
})
}

async activateFlowById(flowId, initialData) {
if (!flowId || typeof flowId !== 'string') {
throw new Error('The "flowId" argument must be provided and must be a string.')
Expand Down
4 changes: 4 additions & 0 deletions src/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default class Urls {
return `${this.automation()}/flow`
}

automationFlowExecutionContext() {
return `${this.automation()}/flow/execution-context`
}

automationFlowTrigger() {
return `${this.automationFlow()}/trigger`
}
Expand Down

0 comments on commit 80ec2c8

Please sign in to comment.