REST API 指南
本节介绍了 Spring Cloud 数据流 REST API。
43. 概述
Spring Cloud Data Flow 提供了一个 REST API,让你能够访问服务器的各个方面。 事实上,Spring Cloud Data Flow shell 是该 API 的一流消费者。
如果你打算在 Java 上使用 REST API,建议使用
提供的 Java 客户端(DataflowTemplate)内部使用 REST API。 |
43.1. HTTP 动词
Spring Cloud Data Flow 尽量遵循标准 HTTP 和 REST 的 HTTP 动词约定,具体如下表所述:
| 动词 | 用法 |
|---|---|
|
用于检索资源。 |
|
用来创建新资源。 |
|
用于更新现有资源,包括部分更新。也用于
这些资源蕴含了 |
|
用来删除现有资源。 |
43.2. HTTP 状态码
Spring Cloud Data Flow 尽量遵循标准 HTTP 和 REST 的 HTTP 状态代码约定,如下表所示:
| 状态代码 | 用法 |
|---|---|
|
请求成功完成。 |
|
一项新资源已成功创建。该资源的URI可从回复中获取 |
|
已成功应用现有资源的更新。 |
|
请求形式错误。响应体包含错误描述,提供更多信息。 |
|
请求的资源并不存在。 |
|
请求的资源已经存在。例如,任务已经存在,或者流已经部署中 |
|
在无法停止或重启作业执行的情况下返回。 |
43.3. 标题
每个回复都有以下标题:
| 名称 | 描述 |
|---|---|
|
载荷的内容类型,例如: |
43.4. 错误
| 路径 | 类型 | 描述 |
|---|---|---|
|
|
发生的HTTP错误,例如: |
|
|
错误原因描述 |
|
|
请求被提出的路径 |
|
|
HTTP 状态码,例如 |
|
|
错误发生的时间(以毫秒计) |
43.5. 超媒体
Spring Cloud 数据流使用超媒体,资源包含其他资源链接
在他们的回应中。
响应采用超文本应用格式,格式为资源对资源语言(HAL)。
链接可在_链接钥匙。
API用户不应自行创建URI。
相反,他们应使用上述链接进行导航。
44. 资源
该 API 包含以下资源:
44.1. 索引
该索引提供了进入 Spring Cloud Data Flow REST API 的入口。 以下主题提供更多细节:
44.1.1. 访问索引
使用一个获取请求访问索引。
请求结构
GET / HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/' -i -X GET
响应结构
| 路径 | 类型 | 描述 |
|---|---|---|
|
|
其他资源链接 |
|
|
每次在该REST API中实现变更时,都会递增 |
|
|
审计记录链接 |
|
|
仪表盘链接 |
|
|
链接至流/定义 |
|
|
链接至流/定义/定义 |
|
|
链接流/定义/定义都是模板化的 |
|
|
运行时/应用链接 |
|
|
链接到 runtime/apps/{appId} |
|
|
链接运行时/应用是模板化的 |
|
|
链接到 runtime/apps/{appId}/instances |
|
|
Link runtime/apps/{appId}/instances 是模板化的 |
|
|
链接到 runtime/apps/{appId}/instances/{instanceId} |
|
|
Link runtime/apps/{appId}/instances/{instanceId} 是模板化的 |
|
|
运行时/流的链接 |
|
|
链路运行时/流是模板化的 |
|
|
链接到运行时/streams/{streamNames} |
|
|
Link runtime/streams/{streamNames} 是模板化的 |
|
|
链接到流/日志 |
|
|
链接到流/日志/{streamName} |
|
|
链接到streams/logs/{streamName}/{appName} |
|
|
链接流/日志/{streamName}是模板化的 |
|
|
Link streams/logs/{streamName}/{appName} 是模板化的 |
|
|
链接到流/部署 |
|
|
链接到流/部署/{name} |
|
|
链接流/部署/{name} 是模板化的 |
|
|
链接到流/部署/部署 |
|
|
链路流/部署/部署都是模板化的 |
|
|
链接到streams/deployments/manifest/{name}/{version} |
|
|
Link streams/deployments/manifest/{name}/{version} 是模板化的 |
|
|
链接到流/部署/历史/{name} |
|
|
链路流/部署/历史是模板化的 |
|
|
链接到streams/deployments/rollback/{name}/{version} |
|
|
链接流/部署/回滚/{name}/{version} 是模板化的 |
|
|
链接到streams/deployments/update/{name} |
|
|
链接流/部署/更新/{name}是模板化的 |
|
|
链接到流/部署/平台/列表 |
|
|
链接到streams/deployments/scale/{streamName}/{appName}/instances/{count} |
|
|
Link streams/deployments/scale/{streamName}/{appName}/instances/{count} 是模板化的 |
|
|
链接到流/验证 |
|
|
链接流/验证是模板化的 |
|
|
任务/平台链接 |
|
|
任务/定义链接 |
|
|
任务/定义/定义链接 |
|
|
链接任务/定义/定义都是模板化的 |
|
|
任务/执行链接 |
|
|
任务/执行/名称链接 |
|
|
链接任务/执行/名称是模板化的 |
|
|
任务/执行/当前链接 |
|
|
任务/执行/执行链接 |
|
|
链接任务/执行/执行是模板化的 |
|
|
任务/日志链接 |
|
|
链接任务/日志是模板化的 |
|
|
任务/执行/计划链接 |
|
|
任务/计划/实例链接 |
|
|
链接任务/计划/实例是模板化的 |
|
|
任务/验证链接 |
|
|
链接任务/验证是模板化的 |
|
|
工作/执行链接 |
|
|
指向作业/瘦执行的链接 |
|
|
作业/执行/名称链接 |
|
|
链接作业/执行/名称都是模板化的 |
|
|
指向作业/执行/状态的链接 |
|
|
链接作业/执行/状态是模板化的 |
|
|
任务/thinexecutions/名称链接 |
|
|
链接作业/执行/名称都是模板化的 |
|
|
指向作业/执行/执行的链接 |
|
|
链接作业/执行/执行都是模板化的 |
|
|
指向作业/执行/执行/步骤的链接 |
|
|
链接作业/执行/执行/步骤都是模板化的 |
|
|
指向作业/执行/执行/步骤的链接 |
|
|
链接作业/执行/执行/步骤/步骤都是模板化的 |
|
|
指向作业/执行/执行/步骤/步/进度的链接 |
|
|
链接作业/执行/执行/步骤/步/进度都是模板化的 |
|
|
职位/实例/名称链接 |
|
|
链接作业/实例/名称是模板化的 |
|
|
工作/实例/实例链接 |
|
|
链接作业/实例/实例是模板化的 |
|
|
工具链接/解析任务文本图谱 |
|
|
工具链接/convertTaskGraphToText |
|
|
应用链接 |
|
|
关于 |
|
|
完成/流程链接 |
|
|
链接补全/流是模板化的 |
|
|
完成任务链接 |
|
|
链接完成/任务是模板化的 |
示例回应
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 6413
{
"_links" : {
"dashboard" : {
"href" : "http://localhost:9393/dashboard"
},
"audit-records" : {
"href" : "http://localhost:9393/audit-records"
},
"streams/definitions" : {
"href" : "http://localhost:9393/streams/definitions"
},
"streams/definitions/definition" : {
"href" : "http://localhost:9393/streams/definitions/{name}",
"templated" : true
},
"streams/validation" : {
"href" : "http://localhost:9393/streams/validation/{name}",
"templated" : true
},
"runtime/streams" : {
"href" : "http://localhost:9393/runtime/streams{?names}",
"templated" : true
},
"runtime/streams/{streamNames}" : {
"href" : "http://localhost:9393/runtime/streams/{streamNames}",
"templated" : true
},
"runtime/apps" : {
"href" : "http://localhost:9393/runtime/apps"
},
"runtime/apps/{appId}" : {
"href" : "http://localhost:9393/runtime/apps/{appId}",
"templated" : true
},
"runtime/apps/{appId}/instances" : {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances",
"templated" : true
},
"runtime/apps/{appId}/instances/{instanceId}" : {
"href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}",
"templated" : true
},
"streams/deployments" : {
"href" : "http://localhost:9393/streams/deployments"
},
"streams/deployments/{name}" : {
"href" : "http://localhost:9393/streams/deployments/{name}",
"templated" : true
},
"streams/deployments/history/{name}" : {
"href" : "http://localhost:9393/streams/deployments/history/{name}",
"templated" : true
},
"streams/deployments/manifest/{name}/{version}" : {
"href" : "http://localhost:9393/streams/deployments/manifest/{name}/{version}",
"templated" : true
},
"streams/deployments/platform/list" : {
"href" : "http://localhost:9393/streams/deployments/platform/list"
},
"streams/deployments/rollback/{name}/{version}" : {
"href" : "http://localhost:9393/streams/deployments/rollback/{name}/{version}",
"templated" : true
},
"streams/deployments/update/{name}" : {
"href" : "http://localhost:9393/streams/deployments/update/{name}",
"templated" : true
},
"streams/deployments/deployment" : {
"href" : "http://localhost:9393/streams/deployments/{name}",
"templated" : true
},
"streams/deployments/scale/{streamName}/{appName}/instances/{count}" : {
"href" : "http://localhost:9393/streams/deployments/scale/{streamName}/{appName}/instances/{count}",
"templated" : true
},
"streams/logs" : {
"href" : "http://localhost:9393/streams/logs"
},
"streams/logs/{streamName}" : {
"href" : "http://localhost:9393/streams/logs/{streamName}",
"templated" : true
},
"streams/logs/{streamName}/{appName}" : {
"href" : "http://localhost:9393/streams/logs/{streamName}/{appName}",
"templated" : true
},
"tasks/platforms" : {
"href" : "http://localhost:9393/tasks/platforms"
},
"tasks/definitions" : {
"href" : "http://localhost:9393/tasks/definitions"
},
"tasks/definitions/definition" : {
"href" : "http://localhost:9393/tasks/definitions/{name}",
"templated" : true
},
"tasks/executions" : {
"href" : "http://localhost:9393/tasks/executions"
},
"tasks/executions/name" : {
"href" : "http://localhost:9393/tasks/executions{?name}",
"templated" : true
},
"tasks/executions/current" : {
"href" : "http://localhost:9393/tasks/executions/current"
},
"tasks/executions/execution" : {
"href" : "http://localhost:9393/tasks/executions/{id}",
"templated" : true
},
"tasks/validation" : {
"href" : "http://localhost:9393/tasks/validation/{name}",
"templated" : true
},
"tasks/logs" : {
"href" : "http://localhost:9393/tasks/logs/{taskExternalExecutionId}{?platformName}",
"templated" : true
},
"tasks/schedules" : {
"href" : "http://localhost:9393/tasks/schedules"
},
"tasks/schedules/instances" : {
"href" : "http://localhost:9393/tasks/schedules/instances/{taskDefinitionName}",
"templated" : true
},
"jobs/executions" : {
"href" : "http://localhost:9393/jobs/executions"
},
"jobs/executions/name" : {
"href" : "http://localhost:9393/jobs/executions{?name}",
"templated" : true
},
"jobs/executions/status" : {
"href" : "http://localhost:9393/jobs/executions{?status}",
"templated" : true
},
"jobs/executions/execution" : {
"href" : "http://localhost:9393/jobs/executions/{id}",
"templated" : true
},
"jobs/executions/execution/steps" : {
"href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps",
"templated" : true
},
"jobs/executions/execution/steps/step" : {
"href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps/{stepId}",
"templated" : true
},
"jobs/executions/execution/steps/step/progress" : {
"href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps/{stepId}/progress",
"templated" : true
},
"jobs/instances/name" : {
"href" : "http://localhost:9393/jobs/instances{?name}",
"templated" : true
},
"jobs/instances/instance" : {
"href" : "http://localhost:9393/jobs/instances/{id}",
"templated" : true
},
"tools/parseTaskTextToGraph" : {
"href" : "http://localhost:9393/tools"
},
"tools/convertTaskGraphToText" : {
"href" : "http://localhost:9393/tools"
},
"jobs/thinexecutions" : {
"href" : "http://localhost:9393/jobs/thinexecutions"
},
"jobs/thinexecutions/name" : {
"href" : "http://localhost:9393/jobs/thinexecutions{?name}",
"templated" : true
},
"apps" : {
"href" : "http://localhost:9393/apps"
},
"about" : {
"href" : "http://localhost:9393/about"
},
"completions/stream" : {
"href" : "http://localhost:9393/completions/stream{?start,detailLevel}",
"templated" : true
},
"completions/task" : {
"href" : "http://localhost:9393/completions/task{?start,detailLevel}",
"templated" : true
}
},
"api.revision" : 14
}
链接
索引的主要元素是链接,因为它们让你可以遍历 API 并执行所需的功能:
| 关系 | 描述 |
|---|---|
|
访问元信息,包括启用功能、安全信息、版本信息 |
|
访问仪表盘界面 |
|
提供审计跟踪信息 |
|
处理注册应用 |
|
暴露了Stream的DSL补全功能 |
|
暴露任务的DSL完成功能 |
|
提供 JobExecution 资源 |
|
提供 JobExecution 薄资源,不包含任何步骤执行 |
|
提供特定作业执行的详细信息 |
|
提供 JobExecution 的步骤 |
|
返回特定步骤的详细信息 |
|
提供特定步骤的进展信息 |
|
按作业名称检索作业执行 |
|
按作业状态检索作业执行 |
|
通过作业名称检索作业执行,不包含步骤执行 |
|
为特定工作实例提供作业实例资源 |
|
提供特定作业名称的作业实例资源 |
|
暴露流运行状态 |
|
暴露给定流名称的流运行状态 |
|
提供运行时应用资源 |
|
暴露特定应用的运行状态 |
|
提供应用实例的状态 |
|
提供特定应用实例的状态 |
|
提供任务定义资源 |
|
提供特定任务定义的详细信息 |
|
提供任务定义的验证 |
|
返回任务执行并允许任务启动 |
|
提供当前正在运行任务的数量 |
|
提供任务的进度信息 |
|
提供特定任务的排班信息 |
|
返回给定任务名称下的所有任务执行 |
|
提供特定任务执行的详细信息 |
|
提供用于启动任务的平台账户。通过添加请求参数“schedulesEnabled=true”,可以筛选结果以显示支持调度的平台 |
|
检索任务应用日志 |
|
暴露Streams资源 |
|
处理特定的流定义 |
|
提供流定义的验证 |
|
提供流部署作 |
|
请求取消部署现有流 |
|
请求(取消)部署现有流定义 |
|
返回发布版本的清单信息 |
|
获取Stream的部署历史,作为本版本的列表或发布 |
|
将流回滚到之前或特定版本的流 |
|
更新直播。 |
|
支持的部署平台列表 |
|
为选定流调整应用实例数量的缩减 |
|
检索流的应用日志 |
|
检索流的应用日志 |
|
获取流的特定应用日志 |
|
将任务定义解析为图结构 |
|
将图形格式转换为DSL文本格式 |
44.2. 服务器元信息
服务器元信息端点提供更多关于服务器本身的信息。 以下主题提供更多细节:
44.2.1. 检索服务器信息
一个获取请求返回春季云数据流的元信息,包括:
-
运行环境信息
-
关于哪些功能被启用的信息
-
Spring Cloud 数据流服务器的依赖信息
-
安全信息
请求结构
GET /about HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/about' -i -X GET \
-H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2785
{
"featureInfo" : {
"analyticsEnabled" : true,
"streamsEnabled" : true,
"tasksEnabled" : true,
"schedulesEnabled" : true,
"grafanaEnabled" : false,
"wavefrontEnabled" : false,
"monitoringDashboardType" : "NONE"
},
"versionInfo" : {
"implementation" : {
"name" : "${info.app.name}",
"version" : "${info.app.version}"
},
"core" : {
"name" : "Spring Cloud Data Flow Core",
"version" : "2.6.4"
},
"dashboard" : {
"name" : "Spring Cloud Dataflow UI",
"version" : "2.5.2"
},
"shell" : {
"name" : "Spring Cloud Data Flow Shell",
"version" : "2.6.4",
"url" : "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.6.4/spring-cloud-dataflow-shell-2.6.4.jar"
}
},
"securityInfo" : {
"authenticationEnabled" : false,
"authenticated" : false,
"username" : null,
"roles" : [ ]
},
"runtimeEnvironment" : {
"appDeployer" : {
"deployerImplementationVersion" : "Test Version",
"deployerName" : "Test Server",
"deployerSpiVersion" : "2.5.3",
"javaVersion" : "1.8.0_232",
"platformApiVersion" : "",
"platformClientVersion" : "",
"platformHostVersion" : "",
"platformSpecificInfo" : {
"default" : "local"
},
"platformType" : "Skipper Managed",
"springBootVersion" : "2.2.11.RELEASE",
"springVersion" : "5.2.10.RELEASE"
},
"taskLaunchers" : [ {
"deployerImplementationVersion" : "2.4.2",
"deployerName" : "LocalTaskLauncher",
"deployerSpiVersion" : "2.4.2",
"javaVersion" : "1.8.0_232",
"platformApiVersion" : "Linux 4.15.0-122-generic",
"platformClientVersion" : "4.15.0-122-generic",
"platformHostVersion" : "4.15.0-122-generic",
"platformSpecificInfo" : { },
"platformType" : "Local",
"springBootVersion" : "2.2.11.RELEASE",
"springVersion" : "5.2.10.RELEASE"
}, {
"deployerImplementationVersion" : "2.4.2",
"deployerName" : "LocalTaskLauncher",
"deployerSpiVersion" : "2.4.2",
"javaVersion" : "1.8.0_232",
"platformApiVersion" : "Linux 4.15.0-122-generic",
"platformClientVersion" : "4.15.0-122-generic",
"platformHostVersion" : "4.15.0-122-generic",
"platformSpecificInfo" : { },
"platformType" : "Local",
"springBootVersion" : "2.2.11.RELEASE",
"springVersion" : "5.2.10.RELEASE"
} ]
},
"grafanaInfo" : {
"url" : "",
"refreshInterval" : 15
},
"monitoringDashboardInfo" : {
"url" : "",
"refreshInterval" : 15,
"dashboardType" : "NONE",
"source" : "default-scdf-source"
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/about"
}
}
}
44.3. 注册申请
注册应用端点提供关于已注册于 Spring Cloud 数据流服务器的应用程序的信息。 以下主题提供更多细节:
44.3.1. 应用列表
一个获取请求列表列出了 Spring Cloud Data Flow 已知的所有应用程序。
以下主题提供更多细节:
请求结构
GET /apps?search=&type=source&defaultVersion=true&page=0&size=10&sort=name%2CASC HTTP/1.1
Accept: application/json
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
对名称执行的搜索字符串(可选) |
|
限制退回的应用只和应用类型。其中一个是[应用、源代码、处理器、消耗器、任务] |
|
布尔标志设置为只检索默认版本的应用(可选) |
|
基于零的页码(可选) |
|
列表中的排序(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/apps?search=&type=source&defaultVersion=true&page=0&size=10&sort=name%2CASC' -i -X GET \
-H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1053
{
"_embedded" : {
"appRegistrationResourceList" : [ {
"name" : "http",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE",
"version" : "1.2.0.RELEASE",
"defaultVersion" : true,
"versions" : [ "1.2.0.RELEASE" ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps/source/http/1.2.0.RELEASE"
}
}
}, {
"name" : "time",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:time-source-rabbit:1.2.0.RELEASE",
"version" : "1.2.0.RELEASE",
"defaultVersion" : true,
"versions" : [ "1.2.0.RELEASE" ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps/source/time/1.2.0.RELEASE"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.3.2. 获取特定应用的信息
一个获取请求/apps/<type>/<name>获取特定应用的信息。
以下主题提供更多细节:
请求结构
GET /apps/source/http?exhaustive=false HTTP/1.1
Accept: application/json
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
返回所有应用程序属性,包括常见的 Spring Boot 属性 |
路径参数
/apps/{type}/{name}
| 参数 | 描述 |
|---|---|
|
查询应用类型。其中一个是[应用、源代码、处理器、消耗器、任务] |
|
查询应用的名称 |
示例请求
$ curl 'http://localhost:9393/apps/source/http?exhaustive=false' -i -X GET \
-H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2058
{
"name" : "http",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE",
"version" : "1.2.0.RELEASE",
"defaultVersion" : true,
"versions" : null,
"options" : [ {
"id" : "http.path-pattern",
"name" : "path-pattern",
"type" : "java.lang.String",
"description" : "An Ant-Style pattern to determine which http requests will be captured.",
"shortDescription" : "An Ant-Style pattern to determine which http requests will be captured.",
"defaultValue" : "/",
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
}, {
"id" : "http.mapped-request-headers",
"name" : "mapped-request-headers",
"type" : "java.lang.String[]",
"description" : "Headers that will be mapped.",
"shortDescription" : "Headers that will be mapped.",
"defaultValue" : null,
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
}, {
"id" : "http.secured",
"name" : "secured",
"type" : "java.lang.Boolean",
"description" : "Secure or not HTTP source path.",
"shortDescription" : "Secure or not HTTP source path.",
"defaultValue" : false,
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
}, {
"id" : "server.port",
"name" : "port",
"type" : "java.lang.Integer",
"description" : "Server HTTP port.",
"shortDescription" : "Server HTTP port.",
"defaultValue" : null,
"hints" : {
"keyHints" : [ ],
"keyProviders" : [ ],
"valueHints" : [ ],
"valueProviders" : [ ]
},
"deprecation" : null,
"deprecated" : false
} ],
"shortDescription" : null,
"inboundPortNames" : [ ],
"outboundPortNames" : [ ]
}
44.3.3. 注册新应用
一个发布请求/apps/<type>/<name>允许注册新的申请。
以下主题提供更多细节:
请求结构
POST /apps/source/http HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE
请求参数
| 参数 | 描述 |
|---|---|
|
应用位所在的URI |
|
应用程序元数据jar所在的URI |
|
如果已有相同名称和类型的注册存在,则必须成立,否则将发生错误 |
路径参数
/apps/{type}/{name}
| 参数 | 描述 |
|---|---|
|
注册应用类型。其中一个是[应用、源代码、处理器、消耗器、任务] |
|
注册申请名称 |
示例请求
$ curl 'http://localhost:9393/apps/source/http' -i -X POST \
-d 'uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE'
响应结构
HTTP/1.1 201 Created
44.3.4. 注册新应用版本
一个发布请求/apps/<type>/<name>/<version>允许注册新的申请。
以下主题提供更多细节:
请求结构
POST /apps/source/http/1.1.0.RELEASE HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE
请求参数
| 参数 | 描述 |
|---|---|
|
应用位所在的URI |
|
应用程序元数据jar所在的URI |
|
如果已有相同名称和类型的注册存在,则必须成立,否则将发生错误 |
路径参数
/apps/{type}/{name}/{version:.+}
| 参数 | 描述 |
|---|---|
|
注册应用类型。其中一个是[应用、源代码、处理器、消耗、任务](可选) |
|
注册申请名称 |
|
应用注册版本 |
示例请求
$ curl 'http://localhost:9393/apps/source/http/1.1.0.RELEASE' -i -X POST \
-d 'uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE'
响应结构
HTTP/1.1 201 Created
44.3.5. 批量注册应用
一个发布请求/应用程序允许同时注册多个应用。
以下主题提供更多细节:
请求结构
POST /apps HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
apps=source.http%3Dmaven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE&force=false
请求参数
| 参数 | 描述 |
|---|---|
|
URI 中可以获取包含注册的属性文件。独占于 |
|
内联注册。独占于 |
|
如果已有相同名称和类型的注册存在,则必须成立,否则将发生错误 |
示例请求
$ curl 'http://localhost:9393/apps' -i -X POST \
-d 'apps=source.http%3Dmaven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE&force=false'
响应结构
HTTP/1.1 201 Created
Content-Type: application/hal+json
Content-Length: 636
{
"_embedded" : {
"appRegistrationResourceList" : [ {
"name" : "http",
"type" : "source",
"uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.1.0.RELEASE",
"version" : "1.1.0.RELEASE",
"defaultVersion" : true,
"versions" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps/source/http/1.1.0.RELEASE"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.3.6. 设置默认应用版本
对于具有相同需求的应用名称和类型,你可以注册多个版本。
在这种情况下,你可以选择其中一个版本作为默认应用。
以下主题提供更多细节:
请求结构
PUT /apps/source/http/1.2.0.RELEASE HTTP/1.1
Accept: application/json
Host: localhost:9393
路径参数
/apps/{type}/{name}/{version:.+}
| 参数 | 描述 |
|---|---|
|
应用类型。其中一个是[应用、源代码、处理器、消耗器、任务] |
|
应用名称 |
|
应用程序版本 |
示例请求
$ curl 'http://localhost:9393/apps/source/http/1.2.0.RELEASE' -i -X PUT \
-H 'Accept: application/json'
响应结构
HTTP/1.1 202 Accepted
44.3.7. 取消注册应用
一个删除请求/apps/<type>/<name>注销之前注册的应用。
以下主题提供更多细节:
请求结构
DELETE /apps/source/http/1.2.0.RELEASE HTTP/1.1
Host: localhost:9393
路径参数
/apps/{type}/{name}/{version}
| 参数 | 描述 |
|---|---|
|
取消注册的应用类型。其中一个是[应用、源代码、处理器、消耗器、任务] |
|
取消注册申请的名称 |
|
应用程序的取消注册版本(可选) |
示例请求
$ curl 'http://localhost:9393/apps/source/http/1.2.0.RELEASE' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.4. 审计记录
审计记录端点提供关于审计记录的信息。以下主题提供更多细节:
44.4.1. 列出所有审计记录
审计记录端点允许您检索审计跟踪信息。
以下主题提供更多细节:
请求结构
GET /audit-records?page=0&size=10&operations=STREAM&actions=CREATE&fromDate=2000-01-01T00%3A00%3A00&toDate=2099-01-01T00%3A00%3A00 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
|
逗号分隔的审计作列表(可选) |
|
逗号分隔的审计作列表(可选) |
|
来自日期过滤器(例如:2019-02-03T00:00:30)(可选) |
|
迄今为止的筛选(例如:2019-02-03T00:00:30)(可选) |
示例请求
$ curl 'http://localhost:9393/audit-records?page=0&size=10&operations=STREAM&actions=CREATE&fromDate=2000-01-01T00%3A00%3A00&toDate=2099-01-01T00%3A00%3A00' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 680
{
"_embedded" : {
"auditRecordResourceList" : [ {
"auditRecordId" : 5,
"createdBy" : null,
"correlationId" : "timelog",
"auditData" : "time --format='YYYY MM DD' | log",
"createdOn" : "2020-11-25T02:26:32.984Z",
"auditAction" : "CREATE",
"auditOperation" : "STREAM",
"platformName" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records/5"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.4.2. 检索审计记录详情
审计记录端点允许你获得一个审计记录。以下主题提供更多细节:
请求结构
GET /audit-records/5 HTTP/1.1
Host: localhost:9393
路径参数
/审计记录/{id}
| 参数 | 描述 |
|---|---|
|
要查询的审计记录ID(必填) |
示例请求
$ curl 'http://localhost:9393/audit-records/5' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 354
{
"auditRecordId" : 5,
"createdBy" : null,
"correlationId" : "timelog",
"auditData" : "time --format='YYYY MM DD' | log",
"createdOn" : "2020-11-25T02:26:32.984Z",
"auditAction" : "CREATE",
"auditOperation" : "STREAM",
"platformName" : null,
"_links" : {
"self" : {
"href" : "http://localhost:9393/audit-records/5"
}
}
}
44.4.3. 列出所有审计行动类型
审计记录端点可以让你获取动作类型。以下主题提供更多细节:
请求结构
GET /audit-records/audit-action-types HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/audit-records/audit-action-types' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 934
[ {
"id" : 100,
"name" : "Create",
"description" : "Create an Entity",
"nameWithDescription" : "Create (Create an Entity)",
"key" : "CREATE"
}, {
"id" : 200,
"name" : "Delete",
"description" : "Delete an Entity",
"nameWithDescription" : "Delete (Delete an Entity)",
"key" : "DELETE"
}, {
"id" : 300,
"name" : "Deploy",
"description" : "Deploy an Entity",
"nameWithDescription" : "Deploy (Deploy an Entity)",
"key" : "DEPLOY"
}, {
"id" : 400,
"name" : "Rollback",
"description" : "Rollback an Entity",
"nameWithDescription" : "Rollback (Rollback an Entity)",
"key" : "ROLLBACK"
}, {
"id" : 500,
"name" : "Undeploy",
"description" : "Undeploy an Entity",
"nameWithDescription" : "Undeploy (Undeploy an Entity)",
"key" : "UNDEPLOY"
}, {
"id" : 600,
"name" : "Update",
"description" : "Update an Entity",
"nameWithDescription" : "Update (Update an Entity)",
"key" : "UPDATE"
} ]
44.4.4. 列出所有审计作类型
审计记录端点可以获取作类型。以下主题提供更多细节:
请求结构
GET /audit-records/audit-operation-types HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/audit-records/audit-operation-types' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 258
[ {
"id" : 100,
"name" : "App Registration",
"key" : "APP_REGISTRATION"
}, {
"id" : 200,
"name" : "Schedule",
"key" : "SCHEDULE"
}, {
"id" : 300,
"name" : "Stream",
"key" : "STREAM"
}, {
"id" : 400,
"name" : "Task",
"key" : "TASK"
} ]
44.5. 流定义
注册应用端点提供关于与 Spring Cloud 数据流服务器注册的流定义信息。 以下主题提供更多细节:
44.5.1. 创建新的流定义
创建流定义是通过向流定义端点发放POST请求来实现的。
一个卷发请求滴答滴答流可能类似于以下内容:
curl -X POST -d "name=ticktock&definition=time | log" localhost:9393/streams/definitions?deploy=false
流定义还可以包含额外的参数。 例如,在“请求结构”示例中,我们还提供了日期-时间格式。
以下主题提供更多细节:
请求结构
POST /streams/definitions HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
name=timelog&definition=time+--format%3D%27YYYY+MM+DD%27+%7C+log&description=Demo+stream+for+testing&deploy=false
请求参数
| 参数 | 描述 |
|---|---|
|
创建任务定义的名称 |
|
流的定义,使用数据流DSL |
|
流定义的描述 |
|
如果为真,流在创建时即部署(默认为false) |
示例请求
$ curl 'http://localhost:9393/streams/definitions' -i -X POST \
-d 'name=timelog&definition=time+--format%3D%27YYYY+MM+DD%27+%7C+log&description=Demo+stream+for+testing&deploy=false'
响应结构
HTTP/1.1 201 Created
Content-Type: application/hal+json
Content-Length: 410
{
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
}
44.5.2. 列出所有流定义
Streams 端点允许你列出所有流定义。 以下主题提供更多细节:
请求结构
GET /streams/definitions?page=0&sort=name%2CASC&search=&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
对名称执行的搜索字符串(可选) |
|
列表中的排序(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/streams/definitions?page=0&sort=name%2CASC&search=&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1160
{
"_embedded" : {
"streamDefinitionResourceList" : [ {
"name" : "mysamplestream",
"dslText" : "time | log",
"originalDslText" : "time | log",
"status" : "undeployed",
"description" : "",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/mysamplestream"
}
}
}, {
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.5.3. 列表相关流定义
Streams 端点允许你列出相关的流定义。 以下主题提供更多细节:
请求结构
GET /streams/definitions/timelog/related?page=0&sort=name%2CASC&search=&size=10&nested=true HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
我们是否应该递归地查找ByTaskNameConscontains 以获取相关的流定义(可选)? |
|
基于零的页码(可选) |
|
对名称执行的搜索字符串(可选) |
|
列表中的排序(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/streams/definitions/timelog/related?page=0&sort=name%2CASC&search=&size=10&nested=true' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 769
{
"_embedded" : {
"streamDefinitionResourceList" : [ {
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog/related?page=0&size=10&sort=name,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.5.4. 检索流定义细节
流定义端点允许你获得单一流定义。 以下主题提供更多细节:
请求结构
GET /streams/definitions/timelog HTTP/1.1
Host: localhost:9393
路径参数
/streams/definitions/{name}
| 参数 | 描述 |
|---|---|
|
查询的流定义名称(必填) |
示例请求
$ curl 'http://localhost:9393/streams/definitions/timelog' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 410
{
"name" : "timelog",
"dslText" : "time --format='YYYY MM DD' | log",
"originalDslText" : "time --format='YYYY MM DD' | log",
"status" : "undeployed",
"description" : "Demo stream for testing",
"statusDescription" : "The app or group is known to the system, but is not currently deployed",
"_links" : {
"self" : {
"href" : "http://localhost:9393/streams/definitions/timelog"
}
}
}
44.5.5. 删除单个流定义
Streams 端点允许你删除单个流定义。 (另见:删除所有流定义。) 以下主题提供更多细节:
请求结构
DELETE /streams/definitions/timelog HTTP/1.1
Host: localhost:9393
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/definitions/timelog' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.6. 流验证
流验证端点允许你在流定义中验证应用。 以下主题提供更多细节:
44.6.1. 请求结构
GET /streams/validation/timelog HTTP/1.1
Host: localhost:9393
44.6.2. 路径参数
/streams/validation/{name}
| 参数 | 描述 |
|---|---|
|
需要验证的流定义名称(必填) |
44.6.3. 示例请求
$ curl 'http://localhost:9393/streams/validation/timelog' -i -X GET
44.6.4. 响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 197
{
"appName" : "timelog",
"dsl" : "time --format='YYYY MM DD' | log",
"description" : "Demo stream for testing",
"appStatuses" : {
"source:time" : "valid",
"sink:log" : "valid"
}
}
44.7. 流式部署
部署定义端点提供已注册于Spring Cloud数据流服务器的部署信息。 以下主题提供更多细节:
44.7.1. 部署流定义
流定义端点允许你部署单一流定义。 可选地,你可以在请求主体中传递应用参数作为属性。 以下主题提供更多细节:
请求结构
POST /streams/deployments/timelog HTTP/1.1
Content-Type: application/json
Content-Length: 36
Host: localhost:9393
{"app.time.timestamp.format":"YYYY"}
/streams/deployments/{timelog}
| 参数 | 描述 |
|---|---|
|
现有流定义名称(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments/timelog' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"app.time.timestamp.format":"YYYY"}'
响应结构
HTTP/1.1 201 Created
44.7.2. 取消部署流定义
流定义端点允许你取消部署单个流定义。 以下主题提供更多细节:
请求结构
DELETE /streams/deployments/timelog HTTP/1.1
Host: localhost:9393
/streams/deployments/{timelog}
| 参数 | 描述 |
|---|---|
|
现有流定义名称(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments/timelog' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.7.3. 取消部署所有流定义
流定义端点允许你取消部署所有单一流定义。 以下主题提供更多细节:
请求结构
DELETE /streams/deployments HTTP/1.1
Host: localhost:9393
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.7.4. 部署流更新
多亏了 Skipper,你可以更新已部署的流,并提供额外的部署属性。
请求结构
POST /streams/deployments/update/timelog1 HTTP/1.1
Content-Type: application/json
Content-Length: 196
Host: localhost:9393
{"releaseName":"timelog1","packageIdentifier":{"repositoryName":"test","packageName":"timelog1","packageVersion":"1.0.0"},"updateProperties":{"app.time.timestamp.format":"YYYYMMDD"},"force":false}
/streams/deployments/update/{timelog1}
| 参数 | 描述 |
|---|---|
|
现有流定义名称(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments/update/timelog1' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"releaseName":"timelog1","packageIdentifier":{"repositoryName":"test","packageName":"timelog1","packageVersion":"1.0.0"},"updateProperties":{"app.time.timestamp.format":"YYYYMMDD"},"force":false}'
响应结构
HTTP/1.1 201 Created
44.7.5. 回滚流定义
将流回滚到之前或特定版本。
请求结构
POST /streams/deployments/rollback/timelog1/1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393
/streams/deployments/rollback/{name}/{version}
| 参数 | 描述 |
|---|---|
|
现有流定义名称(必填) |
|
回滚的版本 |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments/rollback/timelog1/1' -i -X POST \
-H 'Content-Type: application/json'
响应结构
HTTP/1.1 201 Created
44.7.6. 获取清单
提交已发布版本的清单。对于带有依赖的包,清单包含这些依赖的内容。
请求结构
GET /streams/deployments/manifest/timelog1/1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393
/streams/deployments/manifest/{name}/{version}
| 参数 | 描述 |
|---|---|
|
现有流定义名称(必填) |
|
该流的版本 |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments/manifest/timelog1/1' -i -X GET \
-H 'Content-Type: application/json'
响应结构
HTTP/1.1 200 OK
44.7.7. 获取部署历史
获取该流的部署历史。
请求结构
GET /streams/deployments/history/timelog1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/streams/deployments/history/timelog1' -i -X GET \
-H 'Content-Type: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 162
[ {
"name" : null,
"version" : 0,
"info" : null,
"pkg" : null,
"configValues" : {
"raw" : null
},
"manifest" : null,
"platformName" : null
} ]
44.7.8. 获取部署平台
检索支持的部署平台列表。
请求结构
GET /streams/deployments/platform/list HTTP/1.1
Content-Type: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/streams/deployments/platform/list' -i -X GET \
-H 'Content-Type: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 106
[ {
"id" : null,
"name" : "default",
"type" : "local",
"description" : null,
"options" : [ ]
} ]
44.7.9. 比例流定义
流定义端点允许你在流定义中扩展单个应用。 可选地,你可以在请求主体中传递应用参数作为属性。 以下主题提供更多细节:
请求结构
POST /streams/deployments/scale/timelog/log/instances/1 HTTP/1.1
Content-Type: application/json
Content-Length: 36
Host: localhost:9393
{"app.time.timestamp.format":"YYYY"}
/streams/deployments/scale/{streamName}/{appName}/instances/{count}
| 参数 | 描述 |
|---|---|
|
现有流定义的名称(必填) |
|
流中应用名称以扩展 |
|
所选流应用的实例数(必需) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/streams/deployments/scale/timelog/log/instances/1' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"app.time.timestamp.format":"YYYY"}'
响应结构
HTTP/1.1 201 Created
44.8. 任务定义
任务定义端点提供关于已注册于Spring Cloud数据流服务器的任务定义的信息。 以下主题提供更多细节:
44.8.1. 创建新的任务定义
任务定义端点允许你创建一个新的任务定义。 以下主题提供更多细节:
请求结构
POST /tasks/definitions HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
name=my-task&definition=timestamp+--format%3D%27YYYY+MM+DD%27&description=Demo+task+definition+for+testing
请求参数
| 参数 | 描述 |
|---|---|
|
创建任务定义的名称 |
|
任务定义,使用数据流DSL |
|
任务定义的描述 |
示例请求
$ curl 'http://localhost:9393/tasks/definitions' -i -X POST \
-d 'name=my-task&definition=timestamp+--format%3D%27YYYY+MM+DD%27&description=Demo+task+definition+for+testing'
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 342
{
"name" : "my-task",
"dslText" : "timestamp --format='YYYY MM DD'",
"description" : "Demo task definition for testing",
"composed" : false,
"composedTaskElement" : false,
"lastTaskExecution" : null,
"status" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions/my-task"
}
}
}
44.8.2. 列出所有任务定义
任务定义端点允许你获取所有任务定义。 以下主题提供更多细节:
请求结构
GET /tasks/definitions?page=0&size=10&sort=taskName%2CASC&search=&manifest=true HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
|
对名称执行的搜索字符串(可选) |
|
列表中的排序(可选) |
|
将任务清单包含在最新任务执行中的标志(可选) |
示例请求
$ curl 'http://localhost:9393/tasks/definitions?page=0&size=10&sort=taskName%2CASC&search=&manifest=true' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 689
{
"_embedded" : {
"taskDefinitionResourceList" : [ {
"name" : "my-task",
"dslText" : "timestamp --format='YYYY MM DD'",
"description" : "Demo task definition for testing",
"composed" : false,
"composedTaskElement" : false,
"lastTaskExecution" : null,
"status" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions/my-task"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions?page=0&size=10&sort=taskName,asc"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.8.3. 检索任务定义细节
任务定义端点允许你获得一个单一的任务定义。 以下主题提供更多细节:
请求结构
GET /tasks/definitions/my-task?manifest=true HTTP/1.1
Host: localhost:9393
/tasks/definitions/{my-task}
| 参数 | 描述 |
|---|---|
|
现有任务定义的名称(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/tasks/definitions/my-task?manifest=true' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 342
{
"name" : "my-task",
"dslText" : "timestamp --format='YYYY MM DD'",
"description" : "Demo task definition for testing",
"composed" : false,
"composedTaskElement" : false,
"lastTaskExecution" : null,
"status" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/definitions/my-task"
}
}
}
44.8.4. 删除任务定义
任务定义端点允许你删除单个任务定义。 以下主题提供更多细节:
请求结构
DELETE /tasks/definitions/my-task?cleanup=true HTTP/1.1
Host: localhost:9393
/tasks/definitions/{my-task}
| 参数 | 描述 |
|---|---|
|
现有任务定义的名称(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/tasks/definitions/my-task?cleanup=true' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.9. 任务调度器
任务调度器端点提供与调度器实现注册的任务调度信息。 以下主题提供更多细节:
44.9.1. 创建新的任务计划
任务计划端点允许你创建新的任务计划。 以下主题提供更多细节:
请求结构
POST /tasks/schedules HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
scheduleName=myschedule&taskDefinitionName=mytaskname&properties=scheduler.cron.expression%3D00+22+17+%3F+*&arguments=--foo%3Dbar
请求参数
| 参数 | 描述 |
|---|---|
|
该日程表的名称 |
|
待调度任务定义的名称 |
|
调度和启动任务所需的属性 |
|
用于启动任务的命令行参数 |
示例请求
$ curl 'http://localhost:9393/tasks/schedules' -i -X POST \
-d 'scheduleName=myschedule&taskDefinitionName=mytaskname&properties=scheduler.cron.expression%3D00+22+17+%3F+*&arguments=--foo%3Dbar'
响应结构
HTTP/1.1 201 Created
44.9.2. 列出所有赛程表
任务计划终端允许你获取所有任务计划。 以下主题提供更多细节:
请求结构
GET /tasks/schedules?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/tasks/schedules?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 587
{
"_embedded" : {
"scheduleInfoResourceList" : [ {
"scheduleName" : "FOO",
"taskDefinitionName" : "BAR",
"scheduleProperties" : {
"scheduler.AAA.spring.cloud.scheduler.cron.expression" : "00 41 17 ? * *"
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules/FOO"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.9.3. 筛选排程列表
任务计划端点允许你获取所有带有指定任务定义名称的任务计划。 以下主题提供更多细节:
请求结构
GET /tasks/schedules/instances/FOO?page=0&size=10 HTTP/1.1
Host: localhost:9393
/任务/计划/实例/{task-definition-name}
| 参数 | 描述 |
|---|---|
|
根据指定任务定义过滤调度(必修) |
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/tasks/schedules/instances/FOO?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 599
{
"_embedded" : {
"scheduleInfoResourceList" : [ {
"scheduleName" : "FOO",
"taskDefinitionName" : "BAR",
"scheduleProperties" : {
"scheduler.AAA.spring.cloud.scheduler.cron.expression" : "00 41 17 ? * *"
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules/FOO"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/schedules/instances/FOO?page=0&size=1"
}
},
"page" : {
"size" : 1,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.9.4. 删除任务计划
任务计划端点允许你删除单个任务计划。 以下主题提供更多细节:
请求结构
DELETE /tasks/schedules/mytestschedule HTTP/1.1
Host: localhost:9393
/tasks/schedules/{scheduleName}
| 参数 | 描述 |
|---|---|
|
现有时间表名称(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/tasks/schedules/mytestschedule' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.10. 任务验证
任务验证端点允许你在任务定义中验证应用。 以下主题提供更多细节:
44.10.1. 请求结构
GET /tasks/validation/taskC HTTP/1.1
Host: localhost:9393
44.10.2. 路径参数
/tasks/validation/{name}
| 参数 | 描述 |
|---|---|
|
待验证任务定义的名称(必修) |
44.10.3. 示例请求
$ curl 'http://localhost:9393/tasks/validation/taskC' -i -X GET
44.10.4. 响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 144
{
"appName" : "taskC",
"dsl" : "timestamp --format='yyyy MM dd'",
"description" : "",
"appStatuses" : {
"task:taskC" : "valid"
}
}
44.11. 任务执行
任务执行端点提供注册在 Spring Cloud 数据流服务器上的任务执行信息。 以下主题提供更多细节:
44.11.1. 启动任务
启动任务时,通过请求创建新的任务执行来完成。 以下主题提供更多细节:
请求结构
POST /tasks/executions HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
name=taskA&properties=app.my-task.foo%3Dbar%2Cdeployer.my-task.something-else%3D3&arguments=--server.port%3D8080+--foo%3Dbar
请求参数
| 参数 | 描述 |
|---|---|
|
任务定义的名称 |
|
启动时使用的应用程序和部署器属性 |
|
传递给任务的命令行参数 |
示例请求
$ curl 'http://localhost:9393/tasks/executions' -i -X POST \
-d 'name=taskA&properties=app.my-task.foo%3Dbar%2Cdeployer.my-task.something-else%3D3&arguments=--server.port%3D8080+--foo%3Dbar'
响应结构
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1
1
44.11.2. 停止任务
停止任务是通过发布已有任务执行的 ID 来完成的。 以下主题提供更多细节:
请求结构
POST /tasks/executions/1 HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
platform=default
路径参数
/tasks/executions/{id}
| 参数 | 描述 |
|---|---|
|
现有任务执行的ID(必需) |
请求参数
| 参数 | 描述 |
|---|---|
|
与任务执行相关的平台(可选) |
示例请求
$ curl 'http://localhost:9393/tasks/executions/1' -i -X POST \
-d 'platform=default'
响应结构
HTTP/1.1 200 OK
44.11.3. 列出所有任务执行
任务执行端点允许你列出所有任务执行。 以下主题提供更多细节:
请求结构
GET /tasks/executions?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/tasks/executions?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2263
{
"_embedded" : {
"taskExecutionResourceList" : [ {
"executionId" : 2,
"exitCode" : null,
"taskName" : "taskB",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskB-d87c2154-43ae-47c2-8668-711abe2372f4",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.cloud.task.name" : "taskB",
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/2"
}
}
}, {
"executionId" : 1,
"exitCode" : null,
"taskName" : "taskA",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskA-34fee112-b14b-490d-818f-72cb6a998997",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.cloud.task.name" : "taskA",
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.11.4. 列出所有指定任务名称的任务执行
任务执行端点允许你列出指定任务名称的任务执行。 以下主题提供更多细节:
请求结构
GET /tasks/executions?name=taskB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
|
与任务执行相关的名称 |
示例请求
$ curl 'http://localhost:9393/tasks/executions?name=taskB&page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1268
{
"_embedded" : {
"taskExecutionResourceList" : [ {
"executionId" : 2,
"exitCode" : null,
"taskName" : "taskB",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskB-d87c2154-43ae-47c2-8668-711abe2372f4",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.cloud.task.name" : "taskB",
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.11.5. 任务执行小组
任务执行端点让你获取任务执行的详细信息。 以下主题提供更多细节:
请求结构
GET /tasks/executions/1 HTTP/1.1
Host: localhost:9393
/tasks/executions/{id}
| 参数 | 描述 |
|---|---|
|
现有任务执行的ID(必需) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/tasks/executions/1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 873
{
"executionId" : 1,
"exitCode" : null,
"taskName" : "taskA",
"startTime" : null,
"endTime" : null,
"exitMessage" : null,
"arguments" : [ ],
"jobExecutionIds" : [ ],
"errorMessage" : null,
"externalExecutionId" : "taskA-34fee112-b14b-490d-818f-72cb6a998997",
"parentExecutionId" : null,
"resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
"appProperties" : {
"timestamp.format" : "yyyy MM dd",
"spring.datasource.username" : null,
"spring.cloud.task.name" : "taskA",
"spring.datasource.url" : null,
"spring.datasource.driverClassName" : null
},
"deploymentProperties" : {
"app.my-task.foo" : "bar",
"deployer.my-task.something-else" : "3"
},
"taskExecutionStatus" : "UNKNOWN",
"_links" : {
"self" : {
"href" : "http://localhost:9393/tasks/executions/1"
}
}
}
44.11.6. 删除任务执行
任务执行端点允许您:
-
清理部署任务所需的资源
-
从持久存储中移除相关任务数据以及可能关联的春季批处理作业数据
| 清理实现(第一个选项)是针对特定平台的。这两种作都可以被触发 立即或分开。 |
以下主题提供更多细节:
请参考以下关于删除任务执行数据的部分。
请求结构
DELETE /tasks/executions/1,2?action=CLEANUP,REMOVE_DATA HTTP/1.1
Host: localhost:9393
/tasks/executions/{ids}
| 参数 | 描述 |
|---|---|
|
提供两个逗号间隔的任务执行ID值。 |
|
你必须提供实际存在的任务执行ID。否则, |
请求参数
该端点支持一个可选的请求参数,名为动作。这是一个枚举,支持以下观点 值:
-
清理
-
REMOVE_DATA
| 参数 | 描述 |
|---|---|
|
同时使用CLEANUP和REMOVE_DATA动作。 |
示例请求
$ curl 'http://localhost:9393/tasks/executions/1,2?action=CLEANUP,REMOVE_DATA' -i -X DELETE
响应结构
HTTP/1.1 200 OK
44.11.7. 删除任务执行数据
你不仅可以清理用于部署任务的资源,还可以删除与 相关的数据 任务执行来自底层持久存储。此外,如果任务执行与某个或 更多的批作业执行也会被移除。
以下示例展示了如何使用多个任务执行ID和多个动作来发起请求:
$ curl 'http://localhost:9393/tasks/executions/1,2?action=CLEANUP,REMOVE_DATA' -i -X DELETE
/tasks/executions/{ids}
| 参数 | 描述 |
|---|---|
|
提供两个逗号间隔的任务执行ID值。 |
| 参数 | 描述 |
|---|---|
|
同时使用CLEANUP和REMOVE_DATA动作。 |
当从持久存储中删除数据时,使用REMOVE_DATA动作参数,你必须提供
代表父任务执行的任务执行ID。当你提供子任务执行(作为组合任务的一部分执行)时,
一个400(糟糕的请求)返回了HTTP状态。 |
44.11.8. 任务执行当前计数
任务执行当前端点允许你获取当前运行执行次数。 以下主题提供更多细节:
请求结构
GET /tasks/executions/current HTTP/1.1
Host: localhost:9393
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/tasks/executions/current' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 111
[ {
"name" : "default",
"type" : "Local",
"maximumTaskExecutions" : 20,
"runningExecutionCount" : 1
} ]
44.12. 作业执行
作业执行端点提供注册在 Spring Cloud 数据流服务器上的作业执行信息。 以下主题提供更多细节:
44.12.1. 列出所有作业执行
作业执行端点允许你列出所有作业执行。 以下主题提供更多细节:
请求结构
GET /jobs/executions?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/jobs/executions?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3381
{
"_embedded" : {
"jobExecutionResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"name" : "DOCJOB_1",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 2,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 2,
"version" : null,
"jobName" : "DOCJOB_1",
"instanceId" : 2
},
"stepExecutions" : [ ],
"status" : "STOPPED",
"startTime" : "2020-11-25T02:27:19.265+0000",
"createTime" : "2020-11-25T02:27:19.263+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:27:19.265+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 2,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 2,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : null,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STOPPING",
"startTime" : "2020-11-25T02:27:19.252+0000",
"createTime" : "2020-11-25T02:27:19.240+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:27:19.579+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : true,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.12.2. 列出所有不含步执行的作业执行
作业执行端点允许你列出所有不含步骤执行的作业执行。 以下主题提供更多细节:
请求结构
GET /jobs/thinexecutions?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1605
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"instanceId" : 2,
"name" : "DOCJOB_1",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"startDateTime" : "2020-11-25T02:27:19.265+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"status" : "STOPPED",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/2"
}
}
}, {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"startDateTime" : "2020-11-25T02:27:19.252+0000",
"duration" : "00:00:00",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC",
"status" : "STARTED",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
44.12.3. 列出所有指定作业名称的作业执行
作业执行端点允许你列出所有作业执行。 以下主题提供更多细节:
请求结构
GET /jobs/executions?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
|
与作业执行关联的名称 |
示例请求
$ curl 'http://localhost:9393/jobs/executions?name=DOCJOB&page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1825
{
"_embedded" : {
"jobExecutionResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"duration" : "00:00:01",
"jobExecution" : {
"id" : 1,
"version" : 2,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : null,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STOPPING",
"startTime" : "2020-11-25T02:27:19.252+0000",
"createTime" : "2020-11-25T02:27:19.240+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:27:19.579+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : true,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.12.4. 列出所有指定作业名称的作业执行,但不含步骤执行
作业执行端点允许你列出所有作业执行。 以下主题提供更多细节:
请求结构
GET /jobs/thinexecutions?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
|
与作业执行关联的名称 |
示例请求
$ curl 'http://localhost:9393/jobs/thinexecutions?name=DOCJOB&page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 943
{
"_embedded" : {
"jobExecutionThinResourceList" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"instanceId" : 1,
"name" : "DOCJOB",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"startDateTime" : "2020-11-25T02:27:19.252+0000",
"duration" : "00:00:01",
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : true,
"stoppable" : false,
"defined" : false,
"timeZone" : "UTC",
"status" : "STOPPING",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.12.5. 作业执行细节
作业执行端点可以让你获取关于作业执行的详细信息。 以下主题提供更多细节:
请求结构
GET /jobs/executions/2 HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}
| 参数 | 描述 |
|---|---|
|
现有作业执行的ID(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/jobs/executions/2' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1323
{
"executionId" : 2,
"stepExecutionCount" : 0,
"jobId" : 2,
"taskExecutionId" : 2,
"name" : "DOCJOB_1",
"startDate" : "2020-11-25",
"startTime" : "02:27:19",
"duration" : "00:00:01",
"jobExecution" : {
"id" : 2,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 2,
"version" : 0,
"jobName" : "DOCJOB_1",
"instanceId" : 2
},
"stepExecutions" : [ ],
"status" : "STOPPED",
"startTime" : "2020-11-25T02:27:19.265+0000",
"createTime" : "2020-11-25T02:27:19.263+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:27:19.265+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 2,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : true,
"abandonable" : true,
"stoppable" : false,
"defined" : true,
"timeZone" : "UTC",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/2"
}
}
}
44.12.6. 停止作业执行
作业执行端点允许你停止作业执行。 以下主题提供更多细节:
请求结构
PUT /jobs/executions/1 HTTP/1.1
Accept: application/json
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
stop=true
/jobs/executions/{id}
| 参数 | 描述 |
|---|---|
|
现有作业执行的ID(必填) |
请求参数
| 参数 | 描述 |
|---|---|
|
如果设置为true,会发送停止作业的信号 |
示例请求
$ curl 'http://localhost:9393/jobs/executions/1' -i -X PUT \
-H 'Accept: application/json' \
-d 'stop=true'
反应结构
HTTP/1.1 200 OK
44.12.7. 重启作业执行
作业执行端点允许你重启作业执行。 以下主题提供更多细节:
请求结构
PUT /jobs/executions/2 HTTP/1.1
Accept: application/json
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded
restart=true
/jobs/executions/{id}
| 参数 | 描述 |
|---|---|
|
现有作业执行的ID(必填) |
请求参数
| 参数 | 描述 |
|---|---|
|
如果设置为true,会发送重启作业的信号 |
示例请求
$ curl 'http://localhost:9393/jobs/executions/2' -i -X PUT \
-H 'Accept: application/json' \
-d 'restart=true'
响应结构
HTTP/1.1 200 OK
44.13. 工作实例
作业实例端点提供关于与 Spring Cloud 数据流服务器注册的作业实例的信息。 以下主题提供更多细节:
44.13.1. 列出所有作业实例
作业实例端点允许你列出所有作业实例。 以下主题提供更多细节:
请求结构
GET /jobs/instances?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
|
与作业实例关联的名称 |
示例请求
$ curl 'http://localhost:9393/jobs/instances?name=DOCJOB&page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2014
{
"_embedded" : {
"jobInstanceResourceList" : [ {
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2020-11-25",
"startTime" : "02:27:04",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : 0,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2020-11-25T02:27:04.043+0000",
"createTime" : "2020-11-25T02:27:04.031+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:27:04.043+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.13.2. 作业实例详情
作业实例端点允许你列出所有作业实例。 以下主题提供更多细节:
请求结构
GET /jobs/instances/1 HTTP/1.1
Host: localhost:9393
/jobs/instances/{id}
| 参数 | 描述 |
|---|---|
|
现有工作实例的ID(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/jobs/instances/1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1499
{
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [ {
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2020-11-25",
"startTime" : "02:27:04",
"duration" : "00:00:00",
"jobExecution" : {
"id" : 1,
"version" : 1,
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobInstance" : {
"id" : 1,
"version" : 0,
"jobName" : "DOCJOB",
"instanceId" : 1
},
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2020-11-25T02:27:04.043+0000",
"createTime" : "2020-11-25T02:27:04.031+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:27:04.043+0000",
"exitStatus" : {
"exitCode" : "UNKNOWN",
"exitDescription" : "",
"running" : true
},
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"running" : true,
"jobId" : 1,
"stopping" : false,
"allFailureExceptions" : [ ]
},
"jobParameters" : { },
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/instances/1"
}
}
}
44.14. 作业步骤执行
作业步骤执行端点提供关于已注册在 Spring Cloud 数据流服务器的作业步骤执行信息。 以下主题提供更多细节:
44.14.1. 列出作业执行的所有步骤执行
作业步骤执行端点允许你列出所有作业步骤执行。 以下主题提供更多细节:
请求结构
GET /jobs/executions/1/steps?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
基于零的页码(可选) |
|
请求的页面大小(可选) |
示例请求
$ curl 'http://localhost:9393/jobs/executions/1/steps?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1677
{
"_embedded" : {
"stepExecutionResourceList" : [ {
"jobExecutionId" : 1,
"stepExecution" : {
"id" : 1,
"version" : 0,
"stepName" : "DOCJOB_STEP",
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2020-11-25T02:26:18.530+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:26:18.530+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : "",
"running" : true
},
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobExecutionId" : 1,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
},
"stepType" : "",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps?page=0&size=10"
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
44.14.2. 作业步骤执行细节
作业步骤执行端点让你获取关于某个作业步骤执行的详细信息。 以下主题提供更多细节:
请求结构
GET /jobs/executions/1/steps/1 HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}/steps/{stepid}
| 参数 | 描述 |
|---|---|
|
现有作业执行的ID(必填) |
|
特定作业执行的现有步骤执行ID(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/jobs/executions/1/steps/1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1219
{
"jobExecutionId" : 1,
"stepExecution" : {
"id" : 1,
"version" : 0,
"stepName" : "DOCJOB_STEP",
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2020-11-25T02:26:18.530+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:26:18.530+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : "",
"running" : true
},
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobExecutionId" : 1,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
},
"stepType" : "",
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
}
44.14.3. 作业步骤执行进展
作业步骤执行端点让你获得作业步骤执行进度的详细信息。 以下主题提供更多细节:
请求结构
GET /jobs/executions/1/steps/1/progress HTTP/1.1
Host: localhost:9393
/jobs/executions/{id}/steps/{stepid}/progress
| 参数 | 描述 |
|---|---|
|
现有作业执行的ID(必填) |
|
特定作业执行的现有步骤执行ID(必填) |
请求参数
该端点没有请求参数。
示例请求
$ curl 'http://localhost:9393/jobs/executions/1/steps/1/progress' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2722
{
"stepExecution" : {
"id" : 1,
"version" : 0,
"stepName" : "DOCJOB_STEP",
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2020-11-25T02:26:18.530+0000",
"endTime" : null,
"lastUpdated" : "2020-11-25T02:26:18.530+0000",
"executionContext" : {
"dirty" : false,
"empty" : true,
"values" : [ ]
},
"exitStatus" : {
"exitCode" : "EXECUTING",
"exitDescription" : "",
"running" : true
},
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobParameters" : {
"parameters" : { },
"empty" : true
},
"jobExecutionId" : 1,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
},
"stepExecutionHistory" : {
"stepName" : "DOCJOB_STEP",
"count" : 0,
"commitCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"rollbackCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"readCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"writeCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"filterCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"readSkipCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"writeSkipCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"processSkipCount" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"duration" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
},
"durationPerRead" : {
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
}
},
"percentageComplete" : 0.5,
"finished" : false,
"duration" : 339.0,
"_links" : {
"self" : {
"href" : "http://localhost:9393/jobs/executions/1/steps/1"
}
}
}
44.15. 应用程序运行时信息
你可以获得系统已知应用的运行信息,无论是全局还是单独的。 以下主题提供更多细节:
44.15.1. 运行时列出所有应用程序
要获取所有应用实例的信息,请查询/runtime/apps端点通过使用获取.
以下主题提供更多细节:
请求结构
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/runtime/apps' -i -X GET \
-H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"_links" : {
"self" : {
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}
44.15.2. 查询单个应用的所有实例
要获取关于某一应用所有实例的信息,请查询/runtime/apps/<appId>/instances端点通过使用获取.
以下主题提供更多细节:
请求结构
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/runtime/apps' -i -X GET \
-H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"_links" : {
"self" : {
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}
44.15.3. 查询单个应用实例
要获取特定应用实例的信息,请查询/runtime/apps/<appId>/instances/<instanceId>端点通过使用获取.
以下主题提供更多细节:
请求结构
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/runtime/apps' -i -X GET \
-H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"_links" : {
"self" : {
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0
}
}
44.16. 直播日志
你可以获取整个流或流内特定应用的应用日志。 以下主题提供更多细节:
44.16.1. 通过流名获取应用程序日志
使用HTTP获取方法/streams/logs/<streamName>REST 端点用于获取所有应用程序对该流名称的日志。
以下主题提供更多细节:
请求结构
GET /streams/logs/ticktock HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/streams/logs/ticktock' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93
{
"logs" : {
"ticktock-time-v1" : "Logs-time",
"ticktock-log-v1" : "Logs-log"
}
}
44.16.2. 从流中获取特定应用的日志
要从流中获取特定应用的日志,请查询/streams/logs/<streamName>/<appName>端点使用获取HTTP 方法。
以下主题提供更多细节:
请求结构
GET /streams/logs/ticktock/ticktock-log-v1 HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/streams/logs/ticktock/ticktock-log-v1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 55
{
"logs" : {
"ticktock-log-v1" : "Logs-log"
}
}
44.17. 任务日志
你可以获取特定任务执行的任务日志。
以下主题提供了更多细节:
44.17.1. 获取任务执行日志
要获取任务执行日志,请查询/tasks/logs/<ExternalTaskExecutionId>通过使用 HTTP 来终止获取方法。。
以下主题提供更多细节:
请求结构
GET /tasks/logs/taskA-6b69deee-52b6-49e8-999e-23db51023ca5?platformName=default HTTP/1.1
Host: localhost:9393
请求参数
| 参数 | 描述 |
|---|---|
|
任务启动的平台名称。 |
示例请求
$ curl 'http://localhost:9393/tasks/logs/taskA-6b69deee-52b6-49e8-999e-23db51023ca5?platformName=default' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 10034
"2020-11-25 02:22:50.997 INFO 3700 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1b9e1916: startup date [Wed Nov 25 02:22:50 UTC 2020]; root of context hierarchy\n2020-11-25 02:22:51.242 INFO 3700 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$bed7307a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n\n . ____ _ __ _ _\n /\\\\ / ___'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\\n( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n \\\\/ ___)| |_)| | | | | || (_| | ) ) ) )\n ' |____| .__|_| |_|_| |_\\__, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot :: (v1.5.2.RELEASE)\n\n2020-11-25 02:22:51.422 INFO 3700 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888\n2020-11-25 02:22:51.477 WARN 3700 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for \"http://localhost:8888/timestamp-task/default\": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)\n2020-11-25 02:22:51.479 INFO 3700 --- [ main] o.s.c.t.a.t.TimestampTaskApplication : No active profile set, falling back to default profiles: default\n2020-11-25 02:22:51.491 INFO 3700 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@233c0b17: startup date [Wed Nov 25 02:22:51 UTC 2020]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1b9e1916\n2020-11-25 02:22:51.873 INFO 3700 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=1e36064f-ccbe-3d2f-9196-128427cc78a0\n2020-11-25 02:22:51.925 INFO 3700 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$bed7307a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2020-11-25 02:22:51.931 INFO 3700 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$a2bd2d7d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2020-11-25 02:22:52.443 INFO 3700 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql]\n2020-11-25 02:22:52.474 INFO 3700 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql] in 30 ms.\n2020-11-25 02:22:52.743 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup\n2020-11-25 02:22:52.748 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure\n2020-11-25 02:22:52.749 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure\n2020-11-25 02:22:52.749 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure\n2020-11-25 02:22:52.751 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [taskA-6b69deee-52b6-49e8-999e-23db51023ca5:name=environmentManager,type=EnvironmentManager]\n2020-11-25 02:22:52.760 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [taskA-6b69deee-52b6-49e8-999e-23db51023ca5:name=refreshScope,type=RefreshScope]\n2020-11-25 02:22:52.766 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [taskA-6b69deee-52b6-49e8-999e-23db51023ca5:name=configurationPropertiesRebinder,context=233c0b17,type=ConfigurationPropertiesRebinder]\n2020-11-25 02:22:52.913 INFO 3700 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0\n2020-11-25 02:22:52.924 WARN 3700 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'taskLifecycleListener'; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n2020-11-25 02:22:52.925 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown\n2020-11-25 02:22:52.925 INFO 3700 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans\n2020-11-25 02:22:52.925 ERROR 3700 --- [ main] o.s.c.t.listener.TaskLifecycleListener : An event to end a task has been received for a task that has not yet started.\n2020-11-25 02:22:52.931 INFO 3700 --- [ main] utoConfigurationReportLoggingInitializer : \n\nError starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.\n2020-11-25 02:22:52.936 ERROR 3700 --- [ main] o.s.boot.SpringApplication : Application startup failed\n\norg.springframework.context.ApplicationContextException: Failed to start bean 'taskLifecycleListener'; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:348) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:151) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:114) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.cloud.task.app.timestamp.TimestampTaskApplication.main(TimestampTaskApplication.java:29) [classes!/:1.2.0.RELEASE]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]\n\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\nCaused by: java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n\tat org.springframework.util.Assert.notNull(Assert.java:134) ~[spring-core-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.cloud.task.listener.TaskLifecycleListener.doTaskStart(TaskLifecycleListener.java:200) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\n\tat org.springframework.cloud.task.listener.TaskLifecycleListener.start(TaskLifecycleListener.java:282) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:175) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\t... 20 common frames omitted\n\n"