Skip to main content

Get Basic Task Information

Use this API to retrieve detailed information about a specified task.

Request URL: /openapi/v1/workflow/detail

HTTP method: GET

Request parameters

ParameterTypeRequiredDescriptionExample
workflowIdStringYesTask ID."ex-dd6xemv3mnca"

Response parameters

ParameterTypeDescriptionExample
successBooleanWhether the request was successful.true
requestIdStringRequest ID."Ih9n1PMZ-cihckWKncjgs9DUdeff7LMM"
dataObjectTask details.N/A
nameStringTask name."test task"
createTimeStringTask creation time."2025-10-22 07:15:50Z"
moduleStringTask type:
  • sqlTask: SQL task
  • dataExport: Data export task
sqlTask
submitterIdStringID of the user who submitted the task."1030799091781335"
statusStringTask status:
  • notStarted: Not started
  • preChecking: Pre-checking
  • preCheckSkip: Pre-check skipped
  • preCheckSuccess: Pre-check passed
  • preCheckFailed: Pre-check failed
  • ruleChecking: Rule checking
  • ruleCheckSuccess: Rule check passed
  • ruleCheckFailed: Rule check failed
  • toApprove: Pending approval
  • approved: Approval passed
  • approveRejected: Approval rejected
  • running: Running
  • waiting: Waiting for scheduling
  • scheduling: Scheduling
  • suspended: Suspended
  • stopped: Terminated
  • success: Successful
  • failed: Failed
  • finished: Finished
  • canceled: Withdrawn
  • executeCanceled: Execution canceled
  • skipped: Skipped
notStarted
statusDescStringDescription of the task status."Not started"
executeTimeStringTask execution time."2025-10-22 07:16:10Z"
datasourceIdStringID of the associated data source."ds-ddduea45j638"
dbNameStringName of the associated database."ght"
dbGroupIdStringID of the associated database group."group1"
schemaNameStringName of the associated schema."public"
bizDataObjectTask details based on the module value. For details, see bizData response parameters (SQL task) or bizData response parameters (data export).N/A
errorCodeStringError code.N/A
messageStringError message.N/A

bizData response parameters (SQL task)

ParameterTypeDescriptionExample
sqlTextStringSQL text. If an SQL file was uploaded, this field contains the file ID."ds-dbiddumxp4h"
sqlInputTypeStringSQL input type:
  • text: SQL text
  • file: SQL file
"text"
executorTypeStringExecutor type:
  • creator: The submitter executes the task
  • approver: The approver executes the task
  • auto: The task is executed automatically
  • <executor name>: The name of the executor is displayed directly
"ght"
estimatedAffectedRowsIntegerEstimated number of affected rows.1
rollbackTextStringRollback text."insert into date_time_test1 (datetime_col) values (now());"
rollbackTextTypeStringRollback text type:
  • text: SQL text
  • file: SQL file
"text"

bizData response parameters (data export)

ParameterTypeDescriptionExample
reasonStringReason for the export."test"
charsetStringCharacter set of the exported file."utf8"
executorTypeStringExecutor type:
  • creator: The submitter executes the task
  • approver: The approver executes the task
  • auto: The task is executed automatically
  • <executor name>: The name of the executor is displayed directly
"creator"
sqlStatementStringExport SQL statement, returned when the export type is sql."db.all_type.find()"
sqlExtOptionArrayAdditional export options.
compress: Compresses multiple INSERT statements into one larger INSERT statement to improve insertion efficiency.
"compress"
typeStringExport type:
  • sql: Export as SQL statements
  • database: Export a database
  • table: Export a table
"sql"
contentTypeStringExport content:
  • data: Data only
  • structure: Structure only
  • dataAndStructure: Data and structure
"data"
fileTypeStringExport file type:
  • sql: Export as an SQL file
  • excel: Export as an Excel file
  • csv: Export as a CSV file
"sql"

Successful response example

SQL task

{
"success": true,
"requestId": "Ih9n1PMZ-cihckWKncjgs9DUdeff7LMM",
"data": {
"createTime": "2025-10-22 07:15:50Z",
"module": "sqlTask",
"submitterId": "1030799091781335",
"status": "success",
"statusDesc": "",
"executeTime": "2025-10-22 07:16:10Z",
"datasourceId": "ds-ddduea45j638",
"dbName": "ght",
"bizData": {
"sqlText": "insert into date_time_test1 (datetime_col) values (now());",
"executorType": "creator",
"estimatedAffectedRows": 1,
"sqlInputType": "text"
}
}
}

Data export

{
"success": true,
"requestId": "By6m0RZC-BHGBbVWnCABf9OFdIEc1QQH",
"data": {
"createTime": "2025-09-24 09:34:13Z",
"module": "dataExport",
"submitterId": "1030799091781335",
"status": "finished",
"statusDesc": "",
"executeTime": "2025-09-24 09:34:27Z",
"datasourceId": "ds-dbiid6umxp4h",
"dbName": "ght",
"bizData": {
"reason": "11",
"charset": "utf8",
"executorType": "creator",
"sqlStatement": "select version();",
"sqlExtOption": ["compress"],
"type": "sql",
"contentType": "data",
"fileType": "sql"
}
}
}