Flows

Register a child flow execution (internal use)

post

Internal endpoint for Hatchet subflows to register themselves with the server.

When a parent flow spawns child flows, each child calls this endpoint on startup to create a TaskExecution record linked to its parent.

Note: This endpoint is designed for internal use and requires application token auth.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
parentTaskExecutionIdstringRequired

Parent flow's TaskExecution ID (passed from parent flow input)

Example: 01234567-89ab-cdef-0123-456789abcdef
hatchetRunIdstringOptional

This child flow's Hatchet run ID

Example: 0193f8a9-7c53-7c71-8f0d-123456789abc
taskTypestringRequired

Task type identifier for this child flow

Example: build-domain
flowPathstringRequired

Flow path / workflow name for this child

Example: build-domain
repositoryIdentifierstringRequired

Repository identifier (e.g., owner/repo)

Example: flxbl-io/sf-core
payloadobjectOptional

Optional payload data for this child execution

Example: {"domainName":"core","releaseConfig":"config/release-config-core.yaml"}
triggeredBystringOptional

Who triggered this flow (inherited from parent or specified)

Example: hatchet-child-workflow
rerunOfExecutionIdstringOptional

ID of the original execution this is a rerun of (for rerun detection)

Example: 01234567-89ab-cdef-0123-456789abcdef
Responses
post
/sfp/api/flows/internal/register-child

Register a scheduled flow execution (internal use)

post

Internal endpoint for scheduled flows to register themselves with the server.

When a schedule triggers a flow (cron), the flow calls this endpoint on startup to create a TaskExecution record.

Note: This endpoint is designed for internal use and requires application token auth.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
hatchetRunIdstringRequired

This flow's Hatchet run ID

Example: 0193f8a9-7c53-7c71-8f0d-123456789abc
taskTypestringRequired

Task type identifier for this scheduled flow

Example: monitor-pool
flowPathstringRequired

Workflow name for this scheduled flow

Example: monitor-pool
repositoryIdentifierstringRequired

Repository identifier (e.g., owner/repo)

Example: flxbl-io/sf-core
schedulePathstringRequired

Cron schedule name that triggered this flow

Example: pool-monitor-flxbl-io-sf-core-devpool
categorystring · enumOptional

Category for organization/filtering

Example: poolPossible values:
payloadobjectOptional

Optional payload data for this execution

Example: {"poolTag":"devpool","branch":"main"}
rerunOfExecutionIdstringOptional

ID of the original execution this is a rerun of (for rerun detection)

Example: 01234567-89ab-cdef-0123-456789abcdef
Responses
post
/sfp/api/flows/internal/register-scheduled

Update execution metadata (internal use)

patch

Internal endpoint for flows to store metadata on their parent task execution.

Merges the provided result object into the existing execution result without replacing it.

Note: This endpoint is designed for internal use and requires application token auth.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

TaskExecution UUID

Body
resultobjectRequired

Result metadata to merge into the execution record

Example: {"checkRunId":"12345","repositoryIdentifier":"owner/repo"}
Responses
chevron-right
200

Metadata updated successfully

No content

patch
/sfp/api/flows/internal/{id}/metadata

No content

Track a lock-to-workflow-run association (internal use)

post

Internal endpoint for Hatchet workflows to register which mutex lock they hold. Used by the lock-run-cleanup cron to release orphaned locks when a workflow is cancelled.

Note: This endpoint is designed for internal use and requires application token auth.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
post
/sfp/api/flows/internal/track-lock-run

No content

List recent task executions

get

Returns a unified view of recent task executions across both flow engine and CI/CD pipelines for a specific project.

Note: Scheduled (cron-triggered) runs are excluded by default. Pass includeScheduled=true to include them.

Required Parameter

  • repositoryIdentifier: Scopes the query to a specific repository (e.g., owner/repo for GitHub)

Available Filters

Filter
Required
Description
Example

repositoryIdentifier

Yes

Repository to query

acme/salesforce-app

executionMode

No

Filter by execution source

flow, cicd

category

No

Filter by task category

access, environment, release

taskType

No

Filter by specific task type

request-elevated-privileges

flowPath

No

Filter by flow path (partial match)

f/sfp/access/

triggeredBy

No

Filter by trigger source

includeScheduled

No

Include scheduled (cron) runs (default: false)

true

since

No

Filter by time (ISO 8601 or relative)

24h, 7d, 2024-01-15T00:00:00Z

workItemKey

No

Filter by work item key

123 (issue/PR number), abc123 (commit SHA)

workItemType

No

Filter by work item type

github-issue, github-pr, github-commit, ado-commit

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
repositoryIdentifierstringRequired

Repository identifier to scope the query (e.g., "owner/repo" for GitHub, "org/project/repo" for Azure DevOps)

Example: acme/salesforce-app
limitnumber · min: 1 · max: 100Optional

Maximum number of results to return

Default: 50Example: 50
executionModestring · enumOptional

Filter by execution mode. Use "flow" for flow engine executions, "cicd" for GitHub Actions/Azure Pipelines executions.

Example: flowPossible values:
categorystring · enumOptional

Filter by task category. Categories group related task types together.

Example: accessPossible values:
taskTypestringOptional

Filter by task type identifier (e.g., "request-elevated-privileges", "build-packages")

Example: request-elevated-privileges
flowPathstringOptional

Filter by flow path (supports partial matching)

Example: f/sfp/sandbox-monitoring/monitor-pool
workItemKeystringOptional

Filter by work item key (issue number, PR number, commit SHA, or ADO work item ID)

Example: 123
workItemTypestring · enumOptional

Filter by work item type to show only executions triggered by specific work item sources

Example: github-issuePossible values:
sincestringOptional

Filter executions triggered since this time. Accepts ISO 8601 format (e.g., "2024-01-15T00:00:00Z") or relative time (e.g., "24h", "7d").

Example: 24h
triggeredBystringOptional

Filter by who/what triggered the execution (e.g., email, "cron", "api", "app:token-name")

Example: [email protected]
includeScheduledbooleanOptional

Include scheduled (cron-triggered) runs in the results. By default, scheduled runs are excluded.

Default: falseExample: false
Responses
chevron-right
200

List of task executions

application/json
countnumberRequired

Total count of returned runs

get
/sfp/api/flows/runs

Run a flow using the registry-based system

post

Runs a flow by looking up its definition from the registry and dispatching to the flow engine.

The payload must contain an 'id' field that identifies the flow type (e.g., 'request-elevated-privileges').

Important: Unlike CLI, file-based configuration is NOT supported. All configuration (e.g., accessConfig) must be provided inline in the payload.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
payloadobjectRequired

Task payload containing the task id and parameters. Must include an "id" field.

Example: {"id":"request-elevated-privileges","username":"[email protected]","targetOrg":"[email protected]","accessLevel":"admin","durationMinutes":60,"accessConfig":{"levels":{"admin":{"permissionSets":["System_Administrator"]}}}}
Responses
post
/sfp/api/flows/run

List available flow types

get

Returns all flow types registered in the flow definition registry.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
chevron-right
200

List of available flow types

application/json
countnumberRequired

Number of available task types

get
/sfp/api/flows/types

Get flow types with enabled/disabled status for a project

get

Returns all registered flow types with their enabled/disabled state for the specified project.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
repositoryIdentifierstringRequired

Repository identifier (e.g., "owner/repo")

Responses
chevron-right
200

Flow types with status

application/json
repositoryIdentifierstringRequired

Repository identifier

Example: flxbl-io/sf-core
get
/sfp/api/flows/types/status

Get flow type information

get

Returns detailed information about a specific flow type including its parameters.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
taskTypeIdstringRequired

Flow type identifier (e.g., request-elevated-privileges)

Responses
chevron-right
200

Flow type information

application/json
idstringRequired

Task type identifier

Example: request-elevated-privileges
namestringRequired

Human-readable name

Example: Request Elevated Privileges
descriptionstringRequired

Description of what the task does

categorystring · enumRequired

Task category for grouping

Example: accessPossible values:
executionModestring · enumRequired

Execution mode - whether handled by flow system or CI/CD pipeline

Example: flowPossible values:
get
/sfp/api/flows/types/{taskTypeId}

Disable a flow type for a project

post

Prevents the specified flow type from being triggered by webhooks or API calls for this project.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
taskTypeIdstringRequired

Flow type identifier (e.g., build-on-merge)

Body
repositoryIdentifierstringRequired

Repository identifier (e.g., "owner/repo" for GitHub, "org/project/repo" for Azure DevOps)

Example: flxbl-io/sf-core
Responses
chevron-right
200

Flow type disabled

No content

post
/sfp/api/flows/types/{taskTypeId}/disable

No content

Enable a flow type for a project

post

Re-enables the specified flow type for this project, allowing it to be triggered by webhooks or API calls.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
taskTypeIdstringRequired

Flow type identifier (e.g., build-on-merge)

Body
repositoryIdentifierstringRequired

Repository identifier (e.g., "owner/repo" for GitHub, "org/project/repo" for Azure DevOps)

Example: flxbl-io/sf-core
Responses
chevron-right
200

Flow type enabled

No content

post
/sfp/api/flows/types/{taskTypeId}/enable

No content

Set a flow type override for a project

post

Routes the specified flow type to a different flow type for this project. For example, override "build-on-merge" to route to "build-on-merge-custom".

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
taskTypeIdstringRequired

Original flow type identifier to override (e.g., build-on-merge)

Body
repositoryIdentifierstringRequired

Repository identifier

Example: flxbl-io/sf-core
overrideFlowTypeIdstringRequired

The flow type ID to route to instead of the original

Example: build-on-merge-custom
Responses
chevron-right
200

Flow override set

No content

post
/sfp/api/flows/types/{taskTypeId}/override

No content

Remove a flow type override for a project

delete

Removes the override for the specified flow type, reverting to the default flow.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
taskTypeIdstringRequired

Flow type identifier to remove override for

Body
repositoryIdentifierstringRequired

Repository identifier (e.g., "owner/repo" for GitHub, "org/project/repo" for Azure DevOps)

Example: flxbl-io/sf-core
Responses
chevron-right
200

Flow override removed

No content

delete
/sfp/api/flows/types/{taskTypeId}/override

No content

Update task execution status (for CI/CD pipelines)

post

Updates the status of a task execution. This endpoint is primarily used by CI/CD pipelines (GitHub Actions, Azure DevOps) to report back the status of tasks that were dispatched to them via POST /flows/run.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Task execution ID (returned when task was dispatched)

Body
statusstring · enumRequired

New status for the execution

Possible values:
resultobjectOptional

Result data from the execution

Example: {"output":"Deployment successful","artifactUrl":"https://..."}
cicdRunIdstringOptional

CI/CD run ID (for correlation)

Example: 12345678
cicdRunUrlstringOptional

CI/CD run URL

Example: https://github.com/owner/repo/actions/runs/12345678
Responses
chevron-right
200

Status updated successfully

application/json
acknowledgedbooleanRequired

Whether the status update was acknowledged

idstringOptional

ID that was updated

statusstringOptional

New status

post
/sfp/api/flows/executions/{id}/status

Create a pending approval request for a suspended flow

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
taskIdstringRequired

Job/task ID - primary identifier for the approval

Example: 01234567-89ab-cdef-0123-456789abcdef
enginestring · enumOptional

Workflow engine (defaults to "hatchet")

Default: hatchetPossible values:
hatchetRunIdstringOptional

Hatchet workflow run ID

Example: 01234567-89ab-cdef-0123-456789abcdef
hatchetEventKeystringOptional

Hatchet event key to push approval result

Example: approval:01234567-89ab-cdef-0123-456789abcdef
requestedBystringRequired

User/system that requested the approval

Example: [email protected]
approversstring[]Optional

List of emails who can approve (defaults to all owners)

Example: ["[email protected]","[email protected]"]
timeoutHoursnumberOptional

Timeout in hours before approval expires (default: 24)

Default: 24
Responses
post
/sfp/api/flows/approvals

List all pending approval requests

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
chevron-right
200

List of pending approvals

No content

get
/sfp/api/flows/approvals/pending

No content

Get pending approval by GitHub repository and issue number

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
repositoryIdentifierstringRequired

Repository identifier (e.g., owner/repo)

issueNumberstringRequired

Issue or PR number

Responses
chevron-right
200

Approval request details

application/json
idstringRequired

ID - use this for subsequent API calls (approve/reject)

requestedBystringRequired

User who requested the approval

requestedAtstringRequired

ISO 8601 timestamp of request

expiresAtstringRequired

ISO 8601 timestamp when approval expires

approversstring[]Required

List of authorized approvers

contextobjectRequired

Task context (includes callback config if present)

statusstring · enumRequired

Current status

Possible values:
resolvedBystringOptional

Who resolved the request

resolvedAtstringOptional

ISO 8601 timestamp of resolution

get
/sfp/api/flows/approvals/by-github/{repositoryIdentifier}/{issueNumber}

Get pending approval by Slack channel and thread timestamp

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
channelstringRequired

Slack channel ID

threadTsstringRequired

Thread timestamp

Responses
chevron-right
200

Approval request details

application/json
idstringRequired

ID - use this for subsequent API calls (approve/reject)

requestedBystringRequired

User who requested the approval

requestedAtstringRequired

ISO 8601 timestamp of request

expiresAtstringRequired

ISO 8601 timestamp when approval expires

approversstring[]Required

List of authorized approvers

contextobjectRequired

Task context (includes callback config if present)

statusstring · enumRequired

Current status

Possible values:
resolvedBystringOptional

Who resolved the request

resolvedAtstringOptional

ISO 8601 timestamp of resolution

get
/sfp/api/flows/approvals/by-slack/{channel}/{threadTs}

Get approval by Azure DevOps work item

get

Find a pending approval associated with an Azure DevOps work item callback.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
repositoryIdentifierstringRequired

Repository identifier in format org/project/repo

Example: flxbl-io/sf-core/sf-core
workItemIdnumberRequired

Work item ID

Example: 123
Responses
chevron-right
200

Approval found

application/json
idstringRequired

ID - use this for subsequent API calls (approve/reject)

requestedBystringRequired

User who requested the approval

requestedAtstringRequired

ISO 8601 timestamp of request

expiresAtstringRequired

ISO 8601 timestamp when approval expires

approversstring[]Required

List of authorized approvers

contextobjectRequired

Task context (includes callback config if present)

statusstring · enumRequired

Current status

Possible values:
resolvedBystringOptional

Who resolved the request

resolvedAtstringOptional

ISO 8601 timestamp of resolution

get
/sfp/api/flows/approvals/by-azure-devops

Get user email by GitHub username

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
usernamestringRequired

GitHub username

Responses
chevron-right
200

User email

No content

get
/sfp/api/flows/users/email-by-github/{username}

No content

Get approval request by execution ID

get

Accepts TaskExecution UUID or Hatchet Run ID.

For orchestrator flows, returns an enhanced response with approval status for each child flow.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Responses
chevron-right
200

Approval request details

application/json
idstringRequired

ID - use this for subsequent API calls (approve/reject)

requestedBystringRequired

User who requested the approval

requestedAtstringRequired

ISO 8601 timestamp of request

expiresAtstringRequired

ISO 8601 timestamp when approval expires

approversstring[]Required

List of authorized approvers

contextobjectRequired

Task context (includes callback config if present)

statusstring · enumRequired

Current status

Possible values:
resolvedBystringOptional

Who resolved the request

resolvedAtstringOptional

ISO 8601 timestamp of resolution

get
/sfp/api/flows/approvals/{id}

Approve a pending approval request

post

Accepts TaskExecution UUID or Hatchet Run ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Body
approverstringRequired

Display name or identifier of the approver

Example: John Doe
approverEmailstringRequired

Email of the approver for authorization

Example: [email protected]
Responses
chevron-right
200

Request approved

application/json
idstringRequired

ID - use this for subsequent API calls (approve/reject)

requestedBystringRequired

User who requested the approval

requestedAtstringRequired

ISO 8601 timestamp of request

expiresAtstringRequired

ISO 8601 timestamp when approval expires

approversstring[]Required

List of authorized approvers

contextobjectRequired

Task context (includes callback config if present)

statusstring · enumRequired

Current status

Possible values:
resolvedBystringOptional

Who resolved the request

resolvedAtstringOptional

ISO 8601 timestamp of resolution

post
/sfp/api/flows/approvals/{id}/approve

Reject a pending approval request

post

Accepts TaskExecution UUID or Hatchet Run ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Body
rejectorstringRequired

Display name or identifier of the rejector

Example: Jane Smith
rejectorEmailstringRequired

Email of the rejector for authorization

Example: [email protected]
reasonstringOptional

Reason for rejection

Example: Not authorized for production access
Responses
chevron-right
200

Request rejected

application/json
idstringRequired

ID - use this for subsequent API calls (approve/reject)

requestedBystringRequired

User who requested the approval

requestedAtstringRequired

ISO 8601 timestamp of request

expiresAtstringRequired

ISO 8601 timestamp when approval expires

approversstring[]Required

List of authorized approvers

contextobjectRequired

Task context (includes callback config if present)

statusstring · enumRequired

Current status

Possible values:
resolvedBystringOptional

Who resolved the request

resolvedAtstringOptional

ISO 8601 timestamp of resolution

post
/sfp/api/flows/approvals/{id}/reject

Get child executions for an orchestrator flow

get

Returns all child executions for an orchestrator flow with live status enrichment. Children are found via parentExecutionId relationship.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Parent execution ID

Responses
chevron-right
200

List of child executions

No content

get
/sfp/api/flows/{id}/children

No content

Cancel only child executions (not the parent)

post

Cancels all running child executions without affecting the parent. Useful for failure handlers that need to clean up children while preserving the parent's error state.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Parent execution ID

Responses
chevron-right
200

Children cancelled

No content

post
/sfp/api/flows/{id}/cancel-children

No content

Rerun a completed/failed execution with the same payload

post

Creates a new execution using the original payload from the specified execution. Only flow-mode executions in terminal states (completed, failed, cancelled) can be rerun.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

TaskExecution UUID to rerun

Responses
post
/sfp/api/flows/{id}/rerun

Get execution details by ID

get

Returns execution details for a task. Accepts TaskExecution UUID or Hatchet Run ID.

For flow executions, the response is enriched with live status from the flow engine. For orchestrator flows, the response includes aggregated status from all child flows.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Responses
chevron-right
200

Execution details with status

No content

get
/sfp/api/flows/{id}

No content

Get execution logs

get

Returns logs for a flow execution.

For orchestrator flows, returns an enhanced response with logs for each child flow.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Responses
chevron-right
200

Execution logs

No content

get
/sfp/api/flows/{id}/logs

No content

Stream execution logs incrementally

get

Returns incremental log updates for a flow execution. Use for live log streaming.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Query parameters
logOffsetstringOptional

Current log offset

Responses
chevron-right
200

Incremental log update

No content

get
/sfp/api/flows/{id}/logs/stream

No content

Download execution logs as a ZIP file

get

Downloads all logs for a flow execution as a ZIP archive.

The archive contains:

  • console.log — Hatchet execution logs

  • {source}/{group}.log — VictoriaLogs engine logs grouped by log_source and log_group

  • For orchestrator flows: separate directories per child flow

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Responses
chevron-right
200

ZIP file containing logs

No content

get
/sfp/api/flows/{id}/logs/download

No content

Cancel a running or suspended execution

post

Cancels an execution by ID. Works for both flow and CI/CD executions.

  • Flow executions: Cancels the run in Hatchet and rejects any pending approval

  • CI/CD executions: Calls the platform's API to cancel the running workflow/pipeline

  • Orchestrator flows: Cancels all child flows as well

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

ID (TaskExecution UUID or Hatchet Run ID)

Responses
chevron-right
200

Execution cancelled

No content

post
/sfp/api/flows/{id}/cancel

No content

Last updated