Skip to main content

Job Executor -- Steps API

Steps are the building blocks of a job. Each step represents a single action in an automation workflow -- sending an email, querying a database, calling an API, and so on. Steps are executed sequentially in the order defined by the job.

Base URL: http://localhost:9000

Prefix: /step

Endpoints​

MethodPathDescriptionAuthority
POST/step/upsertCreate or update steps (batch)JobExecutor:Step:upsert
GET/step/\{id\}Get step by IDJobExecutor:Step:read
GET/step/allGet all steps--
GET/step/job/\{jobId\}Get all steps for a jobJobExecutor:Step:read
DELETE/stepDelete steps by IDs (batch)JobExecutor:Step:delete
POST/step/searchSearch steps with filters--
GET/step/\{path\}/existsCheck if a step path exists--
POST/step/\{stepId\}/pinPin/unpin step output--

POST /step/upsert​

Create or update one or more steps. Accepts an array, allowing batch upsert of all steps in a job in a single call.

If a step has an actionType of schedule and category of trigger, the endpoint also creates or updates the corresponding Temporal schedule.

Request body:

[
{
"jobId": "job-abc-123",
"name": "Query Sales Data",
"order": 1,
"actionType": "database-query",
"category": "database",
"description": "Execute SQL query against the data warehouse.",
"enabled": true,
"config": {
"connectionId": "conn-dw-001",
"query": "SELECT region, product, SUM(revenue) FROM sales WHERE month = :month GROUP BY region, product",
"parameters": {
"month": "{{reportMonth}}"
}
}
},
{
"jobId": "job-abc-123",
"name": "Send Email",
"order": 2,
"actionType": "send-email",
"category": "communication",
"description": "Email the results to finance.",
"enabled": true,
"config": {
"connectionId": "conn-email-001",
"to": ["finance@example.com"],
"subject": "Monthly Sales Report - {{reportMonth}}",
"body": "Please find the sales report attached.",
"attachPreviousStepOutput": true
}
}
]

Response:

{
"status": "success",
"message": "Steps upserted successfully",
"data": [
{
"id": "step-001",
"jobId": "job-abc-123",
"name": "Query Sales Data",
"order": 1,
"actionType": "database-query",
"category": "database",
"enabled": true
},
{
"id": "step-002",
"jobId": "job-abc-123",
"name": "Send Email",
"order": 2,
"actionType": "send-email",
"category": "communication",
"enabled": true
}
]
}

GET /step/{id}​

Get a single step by its unique ID.

Example:

curl http://localhost:9000/step/step-001

Response:

{
"status": "success",
"message": "Step fetched successfully",
"data": {
"id": "step-001",
"jobId": "job-abc-123",
"name": "Query Sales Data",
"order": 1,
"actionType": "database-query",
"category": "database",
"description": "Execute SQL query against the data warehouse.",
"enabled": true,
"config": {
"connectionId": "conn-dw-001",
"query": "SELECT region, product, SUM(revenue) FROM sales WHERE month = :month GROUP BY region, product"
}
}
}

GET /step/job/{jobId}​

Get all steps belonging to a specific job, ordered by their order field.

Example:

curl http://localhost:9000/step/job/job-abc-123

Response:

{
"status": "success",
"message": "Steps for job fetched successfully",
"data": [
{
"id": "step-001",
"jobId": "job-abc-123",
"name": "Query Sales Data",
"order": 1,
"actionType": "database-query",
"category": "database"
},
{
"id": "step-002",
"jobId": "job-abc-123",
"name": "Send Email",
"order": 2,
"actionType": "send-email",
"category": "communication"
}
]
}

DELETE /step​

Delete one or more steps by their IDs. Accepts a JSON array of step IDs in the request body.

Request body:

["step-001", "step-002"]

Response: 204 No Content

If the request body is empty or null, the endpoint returns 400 Bad Request.


POST /step/search​

Search steps with pagination, sorting, and column-level filtering. Uses the same FilterRequest structure as the Jobs search endpoint.

Request body:

{
"page": 0,
"size": 20,
"sortBy": "order",
"sortOrder": "asc",
"searchText": "email",
"filters": {
"category": {
"operator": "and",
"constraints": [
{ "value": "communication", "matchMode": "equals" }
]
},
"actionType": {
"operator": "and",
"constraints": [
{ "value": "send-email", "matchMode": "equals" }
]
}
}
}

Response:

{
"status": "Success",
"message": "Steps fetched successfully",
"data": [
{
"id": "step-002",
"jobId": "job-abc-123",
"name": "Send Email",
"actionType": "send-email",
"category": "communication"
}
],
"meta": {
"totalElements": 1,
"page": 0,
"size": 20
}
}

POST /step/{stepId}/pin​

Pin or unpin a step's output data. When pinned, the step uses the pinned data instead of executing normally. This is useful for testing downstream steps without re-executing expensive upstream steps.

Request body:

{
"pinnedData": {
"rowCount": 1547,
"columns": ["region", "product", "revenue"]
},
"pinEnabled": true
}

Response:

{
"status": "success",
"message": "Step pinned",
"data": {
"id": "step-001",
"jobId": "job-abc-123",
"name": "Query Sales Data",
"pinEnabled": true,
"pinnedData": {
"rowCount": 1547,
"columns": ["region", "product", "revenue"]
}
}
}

To unpin, send the same request with "pinEnabled": false.


Step Fields Reference​

FieldTypeDescription
idstringUnique step identifier. Auto-generated on creation.
jobIdstringThe parent job ID.
namestringHuman-readable step name.
orderintegerExecution order within the job (1-based).
actionTypestringThe action the step performs (e.g., send-email, database-query, api-call, ssh-command). Maps to a plugin.
categorystringStep category (e.g., communication, database, api, protocol, utility, trigger).
descriptionstringHuman-readable description.
enabledbooleanWhether the step is active. Disabled steps are skipped during execution.
configobjectStep-specific configuration. Schema depends on the actionType.
pinEnabledbooleanWhether the step output is pinned.
pinnedDataobjectThe pinned output data, used when pinEnabled is true.

Common Action Types​

actionTypeCategoryPluginDescription
send-emailcommunicationplugin-emailSend email via SMTP
database-querydatabaseplugin-databaseExecute SQL query
api-callapiplugin-apiMake HTTP API request
ssh-commandprotocolplugin-sshExecute remote SSH command
sftp-transferprotocolplugin-sftpTransfer files via SFTP
s3-operationcloudplugin-aws-s3AWS S3 operations
slack-messagecommunicationplugin-slackSend Slack message
scheduletrigger--Cron-based schedule trigger