更新时间:2022-07-13 GMT+08:00
分享

获取实时作业详情

功能介绍

获取指定作业的详情

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/{project_id}/streaming/jobs/{job_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

最小长度:1

最大长度:128

job_id

String

作业ID

最小长度:1

最大长度:100

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

租户Token

最小长度:1

最大长度:65535

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

job_config

map<string, object>

jobName:作业名称;jobDescription:作业描述;jobType:支持API、IDE、IOTDA_API类型;jobInputType:支持PIPELINE_DATA、ASSET_DATA类型。实时分析作业详细配置,每个作业可选择不同的算子进行组合,各算子的使用方法详见:实时分析->作业开发->编排作业->表2:算子说明。

job_info

StreamingJobInfoDto object

实时分析作业基础信息,包括:实时分析作业ID、实时分析作业名称、作业类型等。

表4 StreamingJobInfoDto

参数

参数类型

描述

job_id

String

作业ID

最小长度:1

最大长度:100

job_name

String

作业名称

最小长度:1

最大长度:20

job_input_type

String

接收数据类型

最小长度:1

最大长度:100

job_description

String

作业描述

最小长度:1

最大长度:100

job_state

String

作业状态

最小长度:1

最大长度:100

status

String

操作状态

最小长度:1

最大长度:100

rtu

Integer

运行作业的RTU个数

最小值:0

最大值:1000

created_time

String

创建时间

最小长度:24

最大长度:24

modified_time

String

修改时间

最小长度:24

最大长度:24

user_id

String

用户ID

最小长度:1

最大长度:100

has_savepoint

Boolean

已停止作业是否有历史缓存数据

状态码: 400

表5 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:100

error_msg

String

错误消息

最小长度:0

最大长度:1024

状态码: 401

表6 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:100

error_msg

String

错误消息

最小长度:0

最大长度:1024

状态码: 403

表7 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:100

error_msg

String

错误消息

最小长度:0

最大长度:1024

状态码: 500

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

最小长度:1

最大长度:100

error_msg

String

错误消息

最小长度:0

最大长度:1024

请求示例

响应示例

状态码: 200

successful operation

{
  "job_config" : {
    "definition" : {
      "jobName" : "pipeline_test",
      "jobDescription" : "",
      "jobType" : "IDE",
      "jobInputType" : "PIPELINE_DATA"
    },
    "operatorInstances" : [ {
      "id" : "operator1",
      "className" : "PipelineSource",
      "point" : {
        "x" : 834,
        "y" : 101
      },
      "configs" : {
        "basicConfigs" : {
          "name" : "管道数据输入"
        }
      }
    }, {
      "id" : "operator2",
      "className" : "Filter",
      "point" : {
        "x" : 713,
        "y" : 221
      },
      "fromOperators" : [ {
        "id" : "operator1"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据过滤",
          "conditionRelationship" : "AND",
          "conditions" : [ {
            "leftValue" : "",
            "symbol" : "MORE_THAN",
            "rightValue" : ""
          } ]
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator3",
      "className" : "Flat",
      "point" : {
        "x" : 717,
        "y" : 301
      },
      "fromOperators" : [ {
        "id" : "operator2"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据扁平",
          "multiRecordsPath" : null,
          "flatFieldConfig" : [ {
            "field" : "",
            "type" : "DOUBLE",
            "path" : ""
          } ]
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator4",
      "className" : "Aggregate",
      "point" : {
        "x" : 736,
        "y" : 394
      },
      "fromOperators" : [ {
        "id" : "operator3"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据聚合",
          "keyFields" : null,
          "windowsType" : "TumblingTimeWindows",
          "windowAssigner" : {
            "timeType" : "ProcessingTime",
            "size" : 10,
            "slide" : 1,
            "offset" : 0
          },
          "aggregateFields" : [ {
            "field" : "",
            "type" : "STRING",
            "aggregateField" : "",
            "aggregateType" : "SUM"
          } ],
          "eventConditions" : {
            "eventOnCondition" : null,
            "eventOffCondition" : null
          }
        },
        "advanceConfigs" : {
          "parallelism" : null,
          "ttlTime" : null
        }
      }
    }, {
      "id" : "operator5",
      "className" : "Map",
      "point" : {
        "x" : 738,
        "y" : 477
      },
      "fromOperators" : [ {
        "id" : "operator4"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据计算",
          "mapFieldConfig" : [ {
            "field" : "",
            "type" : "STRING",
            "expression" : ""
          } ]
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator6",
      "className" : "Aggregate",
      "point" : {
        "x" : 1115,
        "y" : 365
      },
      "fromOperators" : [ {
        "id" : "operator7"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据聚合",
          "keyFields" : null,
          "windowsType" : "TumblingTimeWindows",
          "windowAssigner" : {
            "timeType" : "ProcessingTime",
            "size" : 10,
            "slide" : 1,
            "offset" : 0
          },
          "aggregateFields" : [ {
            "field" : "",
            "type" : "STRING",
            "aggregateField" : "",
            "aggregateType" : "SUM"
          } ]
        },
        "advanceConfigs" : {
          "parallelism" : null,
          "ttlTime" : null
        }
      }
    }, {
      "id" : "operator7",
      "className" : "Nest",
      "point" : {
        "x" : 1102,
        "y" : 232
      },
      "fromOperators" : [ {
        "id" : "operator1"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据嵌套",
          "nestFieldConfig" : {
            "field" : "",
            "type" : "MAP",
            "nestFields" : [ {
              "path" : "",
              "type" : "FIELD",
              "value" : ""
            } ]
          }
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator8",
      "className" : "Deduplicate",
      "point" : {
        "x" : 1093,
        "y" : 471
      },
      "fromOperators" : [ {
        "id" : "operator6"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据去重",
          "keyFields" : null,
          "relationship" : "AND",
          "deduplicateFields" : ""
        },
        "advanceConfigs" : {
          "parallelism" : null,
          "deduplicatePeriod" : {
            "isUseEventTime" : "TRUE",
            "period" : null
          },
          "ttlTime" : null
        }
      }
    }, {
      "id" : "operator9",
      "className" : "SelectFields",
      "point" : {
        "x" : 827,
        "y" : 573
      },
      "fromOperators" : [ {
        "id" : "operator5"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "数据选择",
          "selectFields" : ""
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator10",
      "className" : "DISSink",
      "point" : {
        "x" : 774,
        "y" : 737
      },
      "fromOperators" : [ {
        "id" : "operator9"
      }, {
        "id" : "operator8"
      }, {
        "id" : "operator12"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "DIS输出",
          "dataSourceId" : ""
        },
        "advanceConfigs" : {
          "parallelism" : null,
          "partitioner" : null,
          "format" : "JSON",
          "csvSeparator" : null
        }
      }
    }, {
      "id" : "operator11",
      "className" : "SMNSink",
      "point" : {
        "x" : 1096,
        "y" : 717
      },
      "fromOperators" : [ {
        "id" : "operator8"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "SMN输出",
          "dataSourceId" : "",
          "topicUrn" : "",
          "messageSubject" : null,
          "defaultMessage" : "",
          "smsMessage" : null,
          "emailMessage" : null,
          "httpMessage" : null,
          "httpsMessage" : null
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator12",
      "className" : "CallFunctionGraph",
      "point" : {
        "x" : 571,
        "y" : 577
      },
      "fromOperators" : [ {
        "id" : "operator5"
      } ],
      "configs" : {
        "basicConfigs" : {
          "name" : "调用FunctionGraph云服务",
          "dataSourceId" : "",
          "apiParamFields" : "",
          "apiOutputField" : {
            "field" : "",
            "type" : "STRING"
          },
          "apiResponseCode" : {
            "field" : "",
            "type" : "INTEGER"
          }
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    }, {
      "id" : "operator13",
      "className" : "SMNSink",
      "point" : {
        "x" : 397,
        "y" : 713
      },
      "configs" : {
        "basicConfigs" : {
          "name" : "SMN输出",
          "dataSourceId" : "",
          "topicUrn" : "",
          "messageSubject" : null,
          "defaultMessage" : "",
          "smsMessage" : null,
          "emailMessage" : null,
          "httpMessage" : null,
          "httpsMessage" : null
        },
        "advanceConfigs" : {
          "parallelism" : null
        }
      }
    } ]
  },
  "job_info" : {
    "job_id" : "J_78253507867025408",
    "job_name" : "pipeline_test",
    "job_input_type" : "PIPELINE_DATA",
    "job_description" : "",
    "job_state" : "DRAFT",
    "status" : "CHECK_FAILED",
    "rtu" : 0,
    "created_time" : "2021-05-13T10:06:01.000Z",
    "modified_time" : "2021-08-20T07:45:43.000Z",
    "user_id" : "07d7cc195b8025e72ffcc01b1021e553",
    "has_savepoint" : false
  }
}

状态码

状态码

描述

200

successful operation

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Method Not Allowed

500

Internal Server Error

错误码

请参见错误码

相关文档