Job Executor -- Jobs API
The Jobs API provides CRUD operations for automation job definitions. Jobs are the top-level entity in Automation Hub -- each job represents an automation that can be executed.
Base URL: http://localhost:9000
Prefix: /jobs
Endpoints
| Method | Path | Description | Authority |
|---|---|---|---|
| POST | /jobs/upsert | Create or update a job | JobExecutor:Job:upsert |
| GET | /jobs/\{id\} | Get job by ID | JobExecutor:Job:read |
| GET | /jobs/collection/\{collectionId\} | List jobs in a collection | -- |
| GET | /jobs/workspace/\{workspaceId\} | List jobs in a workspace | -- |
| DELETE | /jobs/\{id\} | Delete a job | JobExecutor:Job:delete |
| GET | /jobs/\{name\}/exists | Check if a job name exists | -- |
| POST | /jobs/search | Search jobs with filters | JobExecutor:Job:read |
| GET | /jobs/recent | Get recently modified jobs | JobExecutor:Job:read |
| POST | /jobs/clone | Clone an existing job | -- |
POST /jobs/upsert
Create a new job or update an existing one. If the request body includes an id field that matches an existing job, the job is updated. Otherwise, a new job is created.
Request body:
{
"name": "Send Monthly Sales Report",
"description": "Generates the monthly sales report and emails it to finance.",
"collectionId": "col-reports",
"workspaceId": "ws-prod-001",
"category": "reporting",
"tags": ["sales", "finance", "monthly"],
"settings": {
"logLevel": "INFO",
"executionConfig": {
"maxConcurrentExecutions": 3,
"overflowBehavior": "QUEUE"
}
}
}
Response:
{
"status": "success",
"message": "Job saved successfully",
"data": {
"id": "job-abc-123",
"name": "Send Monthly Sales Report",
"description": "Generates the monthly sales report and emails it to finance.",
"collectionId": "col-reports",
"workspaceId": "ws-prod-001",
"category": "reporting",
"tags": ["sales", "finance", "monthly"],
"settings": {
"logLevel": "INFO",
"executionConfig": {
"maxConcurrentExecutions": 3,
"overflowBehavior": "QUEUE"
}
},
"createdAt": "2026-04-02T09:00:00Z",
"updatedAt": "2026-04-02T09:00:00Z"
}
}
GET /jobs/{id}
Retrieve a single job by its unique ID.
Example:
curl http://localhost:9000/jobs/job-abc-123
Response:
{
"status": "success",
"message": "Job fetched successfully",
"data": {
"id": "job-abc-123",
"name": "Send Monthly Sales Report",
"description": "Generates the monthly sales report and emails it to finance.",
"collectionId": "col-reports",
"workspaceId": "ws-prod-001",
"category": "reporting",
"tags": ["sales", "finance", "monthly"],
"createdAt": "2026-04-02T09:00:00Z",
"updatedAt": "2026-04-02T09:00:00Z"
}
}
GET /jobs/collection/{collectionId}
List all jobs belonging to a specific collection.
Example:
curl http://localhost:9000/jobs/collection/col-reports
Response:
{
"status": "success",
"message": "Jobs by Collection fetched successfully",
"data": [
{
"id": "job-abc-123",
"name": "Send Monthly Sales Report",
"collectionId": "col-reports"
},
{
"id": "job-def-456",
"name": "Generate Quarterly Dashboard",
"collectionId": "col-reports"
}
]
}
GET /jobs/workspace/{workspaceId}
List all jobs belonging to a specific workspace.
Example:
curl http://localhost:9000/jobs/workspace/ws-prod-001
Response:
{
"status": "success",
"message": "Jobs by Workspace fetched successfully",
"data": [
{
"id": "job-abc-123",
"name": "Send Monthly Sales Report",
"workspaceId": "ws-prod-001"
}
]
}
DELETE /jobs/{id}
Delete a job by its ID. This also deletes all associated steps.
Example:
curl -X DELETE http://localhost:9000/jobs/job-abc-123
Response:
{
"status": "success",
"message": "Job deleted successfully",
"data": null
}
GET /jobs/{name}/exists
Check whether a job with the given name already exists. Optionally pass an id query parameter to exclude a specific job from the check (useful when updating a job and checking for name conflicts).
Example:
curl "http://localhost:9000/jobs/Send%20Monthly%20Sales%20Report/exists?id=job-abc-123"
Response:
{
"status": "Success",
"message": "Job presence check completed",
"data": false
}
POST /jobs/search
Search jobs with pagination, sorting, and column-level filtering.
Request body:
{
"page": 0,
"size": 10,
"sortBy": "updatedAt",
"sortOrder": "desc",
"searchText": "sales",
"filters": {
"category": {
"operator": "and",
"constraints": [
{ "value": "reporting", "matchMode": "equals" }
]
}
}
}
Response:
{
"status": "Success",
"message": "Jobs fetched successfully",
"data": [
{
"id": "job-abc-123",
"name": "Send Monthly Sales Report",
"category": "reporting"
}
],
"meta": {
"totalElements": 1,
"page": 0,
"size": 10
}
}
See Search API for details on the FilterRequest structure.
GET /jobs/recent
Get recently modified jobs.
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 10 | Maximum number of jobs to return. |
Example:
curl "http://localhost:9000/jobs/recent?limit=5"
POST /jobs/clone
Clone an existing job along with its steps. The cloned job gets a new ID and a modified name (e.g., "Original Name (Copy)").
Request body:
{
"jobId": "job-abc-123",
"newName": "Send Monthly Sales Report (Copy)",
"collectionId": "col-reports"
}
Response:
{
"status": "success",
"message": "Job cloned successfully",
"data": {
"id": "job-clone-789",
"name": "Send Monthly Sales Report (Copy)",
"collectionId": "col-reports"
}
}