Documentation
¶
Index ¶
- Variables
- func CancelWorkflowSchedule(c echo.Context) error
- func CheckReady(c echo.Context) error
- func ClearTaskInstances(c echo.Context) error
- func CloneWorkflow(c echo.Context) error
- func CreateConnection(c echo.Context) error
- func CreateTaskComponent(c echo.Context) error
- func CreateWorkflow(c echo.Context) error
- func DeleteConnection(c echo.Context) error
- func DeleteTaskComponent(c echo.Context) error
- func DeleteWorkflow(c echo.Context) error
- func ExampleEcho(c echo.Context) error
- func ExampleSampleData(c echo.Context) error
- func GetConnection(c echo.Context) error
- func GetEventLogs(c echo.Context) error
- func GetImportErrors(c echo.Context) error
- func GetTask(c echo.Context) error
- func GetTaskComponent(c echo.Context) error
- func GetTaskComponentByName(c echo.Context) error
- func GetTaskDirectly(c echo.Context) error
- func GetTaskFromTaskGroup(c echo.Context) error
- func GetTaskGroup(c echo.Context) error
- func GetTaskGroupDirectly(c echo.Context) error
- func GetTaskInstances(c echo.Context) error
- func GetTaskLogDownload(c echo.Context) error
- func GetTaskLogs(c echo.Context) error
- func GetTaskType(c echo.Context) error
- func GetWorkflow(c echo.Context) error
- func GetWorkflowByName(c echo.Context) error
- func GetWorkflowRuns(c echo.Context) error
- func GetWorkflowSchedule(c echo.Context) error
- func GetWorkflowStatus(c echo.Context) error
- func GetWorkflowTemplate(c echo.Context) error
- func GetWorkflowTemplateByName(c echo.Context) error
- func GetWorkflowVersion(c echo.Context) error
- func ListConnection(c echo.Context) error
- func ListTask(c echo.Context) error
- func ListTaskComponent(c echo.Context) error
- func ListTaskFromTaskGroup(c echo.Context) error
- func ListTaskGroup(c echo.Context) error
- func ListTaskType(c echo.Context) error
- func ListWorkflow(c echo.Context) error
- func ListWorkflowTemplate(c echo.Context) error
- func ListWorkflowVersion(c echo.Context) error
- func RollbackWorkflow(c echo.Context) error
- func RunScript(c echo.Context) error
- func RunWorkflow(c echo.Context) error
- func ScheduleWorkflow(c echo.Context) error
- func SleepTime(c echo.Context) error
- func UpdateConnection(c echo.Context) error
- func UpdateTaskComponent(c echo.Context) error
- func UpdateWorkflow(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
var IsReady = false
var OkMessage = model.SimpleMsg{}
Functions ¶
func CancelWorkflowSchedule ¶ added in v0.5.1
CancelWorkflowSchedule godoc
@ID cancel-workflow-schedule
@Summary Cancel Workflow Schedule
@Description Cancel the workflow's active schedule. The DAG metadata is rewritten so Airflow no longer triggers the workflow on the originally requested cadence. Returns 404 when no active schedule exists.
@Tags [Workflow]
@Produce json
@Param wfId path string true "Workflow ID."
@Success 200 {object} model.WorkflowSchedule "Successfully canceled."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 404 {object} common.ErrorResponse "No active schedule for this workflow."
@Failure 500 {object} common.ErrorResponse "Failed to cancel the schedule."
@Router /workflow/{wfId}/schedule [delete]
func CheckReady ¶
CheckReady func is for checking Cicada server health.
@ID health-check-readyz
@Summary Check Ready
@Description Check Cicada is ready
@Tags [Admin]
@Accept json
@Produce json
@Success 200 {object} model.SimpleMsg "Successfully get ready state."
@Failure 500 {object} common.ErrorResponse "Failed to check ready state."
@Router /readyz [get]
func ClearTaskInstances ¶ added in v0.2.1
ClearTaskInstances godoc
@ID clear-task-instances @Summary Clear Task Instances @Description Clear the task Instance. @Tags [Workflow Execution] @Accept json @Produce json @Param wfId path string true "DB workflow ID." @Param wfRunId path string true "ID of the wfRunId."
@Param request body model.TaskClearOption true "Workflow content" @Success 200 {object} model.TaskInstanceReference "Successfully clear the taskInstances." @Failure 400 {object} common.ErrorResponse "Sent bad request." @Failure 500 {object} common.ErrorResponse "Failed to clear the taskInstances." @Router /workflow/{wfId}/workflowRun/{wfRunId}/range [post]
func CloneWorkflow ¶ added in v0.5.1
CloneWorkflow godoc
@ID clone-workflow
@Summary Clone Workflow
@Description Clone an existing workflow as a new workflow. The server copies task_groups / tasks from the source (looked up by wfId) and re-issues all IDs. The new workflow's name is auto-generated as "<source name>_copy" (with _copy_2, _copy_3 ... on collision). The first snapshot of the new workflow records source_type="clone" and source_template_id=<source workflow id>.
@Tags [Workflow]
@Produce json
@Param wfId path string true "ID of the source workflow to clone."
@Success 200 {object} model.Workflow "Successfully cloned the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 404 {object} common.ErrorResponse "Source workflow not found."
@Failure 500 {object} common.ErrorResponse "Failed to clone the workflow."
@Router /workflow/{wfId}/clone [post]
func CreateConnection ¶ added in v0.5.1
CreateConnection godoc
@ID create-connection
@Summary Create Connection
@Description Create an Airflow connection.
@Tags [Connection]
@Accept json
@Produce json
@Param request body model.Connection true "Connection content"
@Success 200 {object} model.Connection "Successfully created the connection."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to create connection."
@Router /connection [post]
func CreateTaskComponent ¶
CreateTaskComponent godoc
@ID create-task-component
@Summary Create Task Component
@Description Register the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param TaskComponent body model.CreateTaskComponentReq true "task component to create."
@Success 200 {object} model.TaskComponent "Successfully register the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to register the task component"
@Router /task_component [post]
func CreateWorkflow ¶
CreateWorkflow godoc
@ID create-workflow
@Summary Create Workflow
@Description Create a workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param request body model.CreateWorkflowReq true "Workflow content"
@Success 200 {object} model.WorkflowTemplate "Successfully create the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to create workflow."
@Router /workflow [post]
func DeleteConnection ¶ added in v0.5.1
DeleteConnection godoc
@ID delete-connection
@Summary Delete Connection
@Description Delete an Airflow connection.
@Tags [Connection]
@Accept json
@Produce json
@Param connId path string true "Connection ID."
@Success 200 {object} model.SimpleMsg "Successfully deleted the connection."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to delete connection."
@Router /connection/{connId} [delete]
func DeleteTaskComponent ¶
DeleteTaskComponent godoc
@ID delete-task-component
@Summary Delete Task Component
@Description Delete the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcId path string true "ID of the task component."
@Success 200 {object} model.SimpleMsg "Successfully delete the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to delete the task component"
@Router /task_component/{tcId} [delete]
func DeleteWorkflow ¶
DeleteWorkflow godoc
@ID delete-workflow
@Summary Delete Workflow
@Description Delete the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Success 200 {object} model.SimpleMsg "Successfully delete the workflow"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to delete the workflow"
@Router /workflow/{wfId} [delete]
func ExampleEcho ¶ added in v0.5.1
ExampleEcho echoes the raw request body back as the response. Used as the downstream task in xcom-based workflow examples to verify the upstream body arrived intact.
@ID example-post-echo
@Summary Echo request body
@Description Echo the raw request body back. Used by the task-reference workflow example to verify body propagation.
@Tags [Example]
@Accept json
@Produce json
@Success 200 {object} map[string]any "Echoed body"
@Router /example/echo [post]
func ExampleSampleData ¶ added in v0.5.1
ExampleSampleData returns a deterministic JSON payload for use as the upstream task in xcom-based workflow examples. The shape mirrors the body expected by ExampleEcho so a workflow can pipe one into the other without transformation.
@ID example-get-data
@Summary Sample data for xcom example
@Description Return a deterministic JSON payload used by the task-reference workflow example.
@Tags [Example]
@Produce json
@Success 200 {object} map[string]any "Sample payload"
@Router /example/data [get]
func GetConnection ¶ added in v0.5.1
GetConnection godoc
@ID get-connection
@Summary Get Connection
@Description Get an Airflow connection.
@Tags [Connection]
@Accept json
@Produce json
@Param connId path string true "Connection ID."
@Success 200 {object} model.Connection "Successfully retrieved the connection."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get connection."
@Router /connection/{connId} [get]
func GetEventLogs ¶ added in v0.2.1
GetEventLogs godoc
@ID get-event-logs
@Summary List Event Logs
@Description Get Eventlog.
@Tags [Workflow Execution]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param wfRunId query string false "ID of the workflow run."
@Param taskId query string false "ID of the task."
@Success 200 {array} model.EventLog "Successfully get the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow."
@Router /workflow/{wfId}/eventlogs [get]
func GetImportErrors ¶ added in v0.2.1
GetImportErrors godoc
@ID get-import-errors
@Summary List Airflow Import Errors
@Description List DAG import errors reported by Airflow.
@Tags [Admin]
@Accept json
@Produce json
@Success 200 {object} model.ImportErrors "Successfully get the importErrors."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the importErrors."
@Router /importErrors [get]
func GetTask ¶ added in v0.2.0
GetTask godoc
@ID get-task
@Summary Get Task
@Description Get the task.
@Tags [Task]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param taskId path string true "ID of the task."
@Success 200 {object} model.Task "Successfully get the task."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task."
@Router /workflow/{wfId}/task/{taskId} [get]
func GetTaskComponent ¶
GetTaskComponent godoc
@ID get-task-component
@Summary Get Task Component
@Description Get the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcId path string true "ID of the TaskComponent"
@Success 200 {object} model.TaskComponent "Successfully get the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task component"
@Router /task_component/{tcId} [get]
func GetTaskComponentByName ¶ added in v0.2.0
GetTaskComponentByName godoc
@ID get-task-component-by-name
@Summary Get Task Component by Name
@Description Get the task component by name.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcName path string true "Name of the TaskComponent"
@Success 200 {object} model.TaskComponent "Successfully get the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task component"
@Router /task_component/name/{tcName} [get]
func GetTaskDirectly ¶ added in v0.2.0
GetTaskDirectly godoc
@ID get-task-directly
@Summary Get Task Directly
@Description Get the task directly.
@Tags [Task]
@Accept json
@Produce json
@Param taskId path string true "ID of the task."
@Success 200 {object} model.TaskDirectly "Successfully get the task."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task."
@Router /task/{taskId} [get]
func GetTaskFromTaskGroup ¶ added in v0.2.0
GetTaskFromTaskGroup godoc
@ID get-task-from-task-group
@Summary Get Task from Task Group
@Description Get the task from the task group.
@Tags [Task]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param tgId path string true "ID of the task group."
@Param taskId path string true "ID of the task."
@Success 200 {object} model.Task "Successfully get the task from the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task from the task group."
@Router /workflow/{wfId}/task_group/{tgId}/task/{taskId} [get]
func GetTaskGroup ¶ added in v0.2.0
GetTaskGroup godoc
@ID get-task-group
@Summary Get Task Group
@Description Get the task group.
@Tags [Task Group]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param tgId path string true "ID of the task group."
@Success 200 {object} model.Task "Successfully get the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task group."
@Router /workflow/{wfId}/task_group/{tgId} [get]
func GetTaskGroupDirectly ¶ added in v0.2.0
GetTaskGroupDirectly godoc
@ID get-task-group-directly
@Summary Get Task Group Directly
@Description Get the task group directly.
@Tags [Task Group]
@Accept json
@Produce json
@Param tgId path string true "ID of the task group."
@Success 200 {object} model.Task "Successfully get the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task group."
@Router /task_group/{tgId} [get]
func GetTaskInstances ¶ added in v0.2.1
GetTaskInstances godoc
@ID get-task-instances
@Summary List Task Instances
@Description Get the task Logs.
@Tags [Workflow Execution]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param wfRunId path string true "DB workflow ID."
@Success 200 {object} model.TaskInstance "Successfully get the taskInstances."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the taskInstances."
@Router /workflow/{wfId}/workflowRun/{wfRunId}/taskInstances [get]
func GetTaskLogDownload ¶ added in v0.3.1
GetTaskLogDownload godoc
@ID get-task-logs-download
@Summary Download Task Logs
@Description Download the task logs as a file.
@Tags [Workflow Execution]
@Accept json
@Produce text/plain
@Param wfId path string true "DB workflow ID."
@Param wfRunId path string true "ID of the workflowRunId."
@Param taskId path string true "ID of the task."
@Param taskTryNum path string true "ID of the taskTryNum."
@Success 200 {file} file "Log file downloaded successfully."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task Logs."
@Router /workflow/{wfId}/workflowRun/{wfRunId}/task/{taskId}/taskTryNum/{taskTryNum}/logs/download [get]
func GetTaskLogs ¶ added in v0.2.1
GetTaskLogs godoc
@ID get-task-logs
@Summary Get Task Logs
@Description Get the task Logs.
@Tags [Workflow Execution]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param wfRunId path string true "ID of the workflowRunId."
@Param taskId path string true "ID of the task."
@Param taskTryNum path string true "ID of the taskTryNum."
@Success 200 {object} model.TaskLog "Successfully get the task Logs."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task Logs."
@Router /workflow/{wfId}/workflowRun/{wfRunId}/task/{taskId}/taskTryNum/{taskTryNum}/logs [get]
func GetTaskType ¶ added in v0.5.1
GetTaskType godoc
@ID get-task-type
@Summary Get Task Type
@Description Get a specific task type definition (including schemas).
@Tags [Task Type]
@Accept json
@Produce json
@Param id path string true "Task type id (e.g. http, bash, ssh)"
@Success 200 {object} catalog.TaskTypeDef "Successfully get the task type"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 404 {object} common.ErrorResponse "Task type not found"
@Router /task_type/{id} [get]
func GetWorkflow ¶
GetWorkflow godoc
@ID get-workflow
@Summary Get Workflow
@Description Get the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Success 200 {object} model.Workflow "Successfully get the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow."
@Router /workflow/{wfId} [get]
func GetWorkflowByName ¶ added in v0.2.0
GetWorkflowByName godoc
@ID get-workflow-by-name
@Summary Get Workflow by Name
@Description Get the workflow by name.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfName path string true "Name of the workflow."
@Success 200 {object} model.Workflow "Successfully get the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow."
@Router /workflow/name/{wfName} [get]
func GetWorkflowRuns ¶ added in v0.2.1
GetWorkflowRuns godoc
@ID get-workflow-runs
@Summary List Workflow Runs
@Description Get the task Logs.
@Tags [Workflow Execution]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Success 200 {object} []model.WorkflowRun "Successfully get the workflowRuns."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflowRuns."
@Router /workflow/{wfId}/runs [get]
func GetWorkflowSchedule ¶ added in v0.5.1
GetWorkflowSchedule godoc
@ID get-workflow-schedule
@Summary Get Workflow Schedule
@Description Return the workflow's most recently created schedule row regardless of status. Inspect .status to interpret: "active" (will fire), "executed" (already ran), "canceled" (user canceled). Returns null when the workflow has no schedule history.
@Tags [Workflow]
@Produce json
@Param wfId path string true "Workflow ID."
@Success 200 {object} model.WorkflowSchedule "Latest schedule (any status), or null."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to fetch the schedule."
@Router /workflow/{wfId}/schedule [get]
func GetWorkflowStatus ¶ added in v0.3.1
GetWorkflowStatus godoc
@ID get-WorkflowStatus
@Summary Get Workflow Status
@Description Get the WorkflowStatus.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "wfId of the workflow"
@Success 200 {object} []model.WorkflowStatus "Successfully get the WorkflowVersion."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the WorkflowVersion."
@Router /workflow/{wfId}/status [get]
func GetWorkflowTemplate ¶
GetWorkflowTemplate godoc
@ID get-workflow-template
@Summary Get Workflow Template
@Description Get the workflow template.
@Tags [Workflow Template]
@Accept json
@Produce json
@Param wftId path string true "ID of the WorkflowTemplate"
@Success 200 {object} model.GetWorkflowTemplate "Successfully get the workflow template"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow template"
@Router /workflow_template/{wftId} [get]
func GetWorkflowTemplateByName ¶ added in v0.2.0
GetWorkflowTemplateByName godoc
@ID get-workflow-template-by-name
@Summary Get Workflow Template by Name
@Description Get the workflow template by name.
@Tags [Workflow Template]
@Accept json
@Produce json
@Param wfName path string true "Name of the WorkflowTemplate"
@Success 200 {object} model.GetWorkflowTemplate "Successfully get the workflow template"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow template"
@Router /workflow_template/name/{wfName} [get]
func GetWorkflowVersion ¶ added in v0.2.3
GetWorkflowVersion godoc
@ID get-WorkflowVersion
@Summary Get Workflow Version
@Description Get the WorkflowVersion.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "wfId of the workflow"
@Param verId path string true "ID of the WorkflowVersion."
@Success 200 {object} model.Workflow "Successfully get the WorkflowVersion."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the WorkflowVersion."
@Router /workflow/{wfId}/version/{verId} [get]
func ListConnection ¶ added in v0.5.1
ListConnection godoc
@ID list-connection
@Summary List Connections
@Description List Airflow connections.
@Tags [Connection]
@Accept json
@Produce json
@Param page query string false "Page of the connection list."
@Param row query string false "Row of the connection list."
@Param orderBy query string false "Order by field, prefix with - to desc."
@Success 200 {object} []model.Connection "Successfully retrieved the connection list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get connection list."
@Router /connection [get]
func ListTask ¶ added in v0.2.0
ListTask godoc
@ID list-task
@Summary List Tasks
@Description Get a task list of the workflow.
@Tags [Task]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Success 200 {array} model.Task "Successfully get a task list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a task list."
@Router /workflow/{wfId}/task [get]
func ListTaskComponent ¶
ListTaskComponent godoc
@ID list-task-component
@Summary List Task Components
@Description Get a list of task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param page query string false "Page of the task component list."
@Param row query string false "Row of the task component list."
@Success 200 {object} []model.TaskComponent "Successfully get a list of task component."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a list of task component."
@Router /task_component [get]
func ListTaskFromTaskGroup ¶ added in v0.2.0
ListTaskFromTaskGroup godoc
@ID list-task-from-task-group
@Summary List Tasks from Task Group
@Description Get a task list from the task group.
@Tags [Task]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param tgId path string true "ID of the task group."
@Success 200 {array} model.Task "Successfully get a task list from the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a task list from the task group."
@Router /workflow/{wfId}/task_group/{tgId}/task [get]
func ListTaskGroup ¶ added in v0.2.0
ListTaskGroup godoc
@ID list-task-group
@Summary List Task Groups
@Description Get a task group list of the workflow.
@Tags [Task Group]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Success 200 {array} model.TaskGroup "Successfully get a task group list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a task group list."
@Router /workflow/{wfId}/task_group [get]
func ListTaskType ¶ added in v0.5.1
ListTaskType godoc
@ID list-task-type
@Summary List Task Types
@Description List all available task types defined in the catalog.
@Tags [Task Type]
@Accept json
@Produce json
@Success 200 {array} catalog.TaskTypeDef "Successfully list task types"
@Failure 500 {object} common.ErrorResponse "Failed to list task types"
@Router /task_type [get]
func ListWorkflow ¶
ListWorkflow godoc
@ID list-workflow
@Summary List Workflows
@Description Get a workflow list.
@Tags [Workflow]
@Accept json
@Produce json
@Param name query string false "Name of the workflow"
@Param page query string false "Page of the workflow list."
@Param row query string false "Row of the workflow list."
@Success 200 {object} []model.Workflow "Successfully get a workflow list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a workflow list."
@Router /workflow [get]
func ListWorkflowTemplate ¶
ListWorkflowTemplate godoc
@ID list-workflow-template
@Summary List Workflow Templates
@Description Get a list of workflow template.
@Tags [Workflow Template]
@Accept json
@Produce json
@Param name query string false "Name of the workflow template"
@Param page query string false "Page of the workflow template list."
@Param row query string false "Row of the workflow template list."
@Success 200 {object} []model.WorkflowTemplate "Successfully get a list of workflow template."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a list of workflow template."
@Router /workflow_template [get]
func ListWorkflowVersion ¶ added in v0.2.3
ListWorkflowVersion godoc
@ID list-workflowVersion
@Summary List Workflow Versions
@Description Get a workflowVersion list.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "wfId of the workflow"
@Param page query string false "Page of the workflowVersion list."
@Param row query string false "Row of the workflowVersion list."
@Success 200 {object} []model.WorkflowVersion "Successfully get a workflowVersion list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a workflowVersion list."
@Router /workflow/{wfId}/version [get]
func RollbackWorkflow ¶ added in v0.5.1
RollbackWorkflow godoc
@ID rollback-workflow
@Summary Rollback Workflow to a Past Version
@Description Restore the workflow's task graph and metadata from the snapshot identified by versionNo. Existing active tasks are soft-deleted and re-issued with fresh UUIDs from the target version's raw_data. The rollback itself is recorded as a new WorkflowVersion with action="rollback" and source_template_id=<source version id>. workflow_schedules rows are left untouched.
@Tags [Workflow]
@Produce json
@Param wfId path string true "Workflow ID."
@Param versionNo path int true "Target version_no within the workflow (1-based, positive integer)."
@Success 200 {object} model.Workflow "Workflow after rollback."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 404 {object} common.ErrorResponse "Workflow or version not found."
@Failure 409 {object} common.ErrorResponse "Cannot rollback to this version (e.g. delete action)."
@Failure 500 {object} common.ErrorResponse "Failed to rollback the workflow."
@Router /workflow/{wfId}/version/{versionNo}/rollback [post]
func RunScript ¶ added in v0.4.1
RunScript godoc
@ID run-script
@Summary Run Script on Target
@Description Run script on target with NS ID, Infra ID and Node ID.
@Tags [Cicada Built-in API]
@Accept json
@Produce json
@Param request body model.RunScriptReq true "Workflow content"
@Success 200 {object} model.ScriptResult "Result of the script running"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to run script"
@Router /run_script [post]
func RunWorkflow ¶
RunWorkflow godoc
@ID run-workflow
@Summary Run Workflow
@Description Run the workflow.
@Tags [Workflow Execution]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Success 200 {object} model.SimpleMsg "Successfully run the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to run the Workflow"
@Router /workflow/{wfId}/run [post]
func ScheduleWorkflow ¶ added in v0.5.1
ScheduleWorkflow godoc
@ID schedule-workflow
@Summary Schedule Workflow (one-shot)
@Description Register a one-shot future execution. Airflow handles the actual triggering via DAG metadata (schedule="@once" + start_date=run_at + catchup=false). Only one active schedule per workflow is allowed.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "Workflow ID."
@Param request body model.CreateWorkflowScheduleReq true "Schedule body (run_at)."
@Success 200 {object} model.WorkflowSchedule "Successfully scheduled the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 409 {object} common.ErrorResponse "Active schedule already exists."
@Failure 500 {object} common.ErrorResponse "Failed to schedule the workflow."
@Router /workflow/{wfId}/schedule [post]
func SleepTime ¶ added in v0.4.1
SleepTime godoc
@ID sleep-time
@Summary Run Sleep Command
@Description Runs sleep command on cicada and waits for configured time. Wait for 10 seconds if time value is not provided.
@Tags [Cicada Built-in API]
@Accept json
@Produce json
@Param request body model.SleepTimeReq true "SleepTime request"
@Success 200 {object} model.ScriptResult "Result of sleep"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to run script"
@Router /sleep_time [post]
func UpdateConnection ¶ added in v0.5.1
UpdateConnection godoc
@ID update-connection
@Summary Update Connection
@Description Update an Airflow connection.
@Tags [Connection]
@Accept json
@Produce json
@Param connId path string true "Connection ID."
@Param request body model.Connection true "Connection content"
@Success 200 {object} model.Connection "Successfully updated the connection."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to update connection."
@Router /connection/{connId} [put]
func UpdateTaskComponent ¶
UpdateTaskComponent godoc
@ID update-task-component
@Summary Update Task Component
@Description Update the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcId path string true "ID of the TaskComponent"
@Param TaskComponent body model.CreateTaskComponentReq true "task component to modify."
@Success 200 {object} model.TaskComponent "Successfully update the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to update the task component"
@Router /task_component/{tcId} [put]
func UpdateWorkflow ¶
UpdateWorkflow godoc
@ID update-workflow
@Summary Update Workflow
@Description Update the workflow content.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "DB workflow ID."
@Param Workflow body model.CreateWorkflowReq true "Workflow to modify."
@Success 200 {object} model.Workflow "Successfully update the workflow"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to update the workflow"
@Router /workflow/{wfId} [put]
Types ¶
This section is empty.