REST API 指南

本节介绍 Spring Cloud Data Flow REST API。spring-doc.cadn.net.cn

42. 概述

Spring Cloud Data Flow 提供了一个 REST API,可让您访问服务器的所有功能。 事实上,Spring Cloud Data Flow 的 Shell 就是该 API 的首要使用者。spring-doc.cadn.net.cn

如果你计划在 Java 中使用 REST API,应考虑使用所提供的 Java 客户端(DataflowTemplate),该客户端在内部使用 REST API。

42.1. HTTP 版本

Spring Cloud Data Flow 会建立一个 RESTful API 版本,当 API 发生破坏性变更时,该版本号将被更新。 API 版本可以在 Spring Cloud Data Flow 主页末尾处查看,如下例所示:spring-doc.cadn.net.cn

{
  "_links": {
      "dashboard": { "href" : "http://localhost:9393/dashboard" },
      ...
  },
  "api.revision":15
}

下表显示了 SCDF 发布版本及其当前的 RESTful API 版本。spring-doc.cadn.net.cn

SCDF 版本 API 版本

2.11.xspring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.10.xspring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.9.xspring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.8.xspring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.7.xspring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

42.2. HTTP 动词

Spring Cloud Data Flow 在使用 HTTP 动词时,尽可能严格遵循标准的 HTTP 和 REST 约定,如下表所述:spring-doc.cadn.net.cn

动词 用法

GETspring-doc.cadn.net.cn

用于检索资源。spring-doc.cadn.net.cn

POSTspring-doc.cadn.net.cn

用于创建新资源。spring-doc.cadn.net.cn

PUTspring-doc.cadn.net.cn

用于更新现有资源,包括部分更新。也用于那些隐含restarts概念的资源,例如任务。spring-doc.cadn.net.cn

DELETEspring-doc.cadn.net.cn

用于删除现有资源。spring-doc.cadn.net.cn

42.3. HTTP 状态码

Spring Cloud Data Flow 在使用 HTTP 状态码时,尽可能严格遵循标准的 HTTP 和 REST 规范,如下表所示:spring-doc.cadn.net.cn

状态码 用法

200 OKspring-doc.cadn.net.cn

请求已成功完成。spring-doc.cadn.net.cn

201 Createdspring-doc.cadn.net.cn

已成功创建一个新资源。该资源的 URI 可从响应的 Location 头部中获取。spring-doc.cadn.net.cn

204 No Contentspring-doc.cadn.net.cn

对现有资源的更新已成功应用。spring-doc.cadn.net.cn

400 Bad Requestspring-doc.cadn.net.cn

请求格式不正确。响应正文包含一个错误描述,提供进一步的信息。spring-doc.cadn.net.cn

404 Not Foundspring-doc.cadn.net.cn

请求的资源不存在。spring-doc.cadn.net.cn

409 Conflictspring-doc.cadn.net.cn

请求的资源已存在。例如,任务已存在,或流已在部署中。spring-doc.cadn.net.cn

422 Unprocessable Entityspring-doc.cadn.net.cn

在作业执行无法停止或重新启动的情况下返回。spring-doc.cadn.net.cn

42.4 头部

每个响应都包含以下标头:spring-doc.cadn.net.cn

姓名 描述

Content-Typespring-doc.cadn.net.cn

有效载荷的 Content-Type,例如 application/hal+jsonspring-doc.cadn.net.cn

42.5. 错误

路径 类型 描述

errorspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

发生的 HTTP 错误,例如 Bad Requestspring-doc.cadn.net.cn

messagespring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

错误原因的描述spring-doc.cadn.net.cn

pathspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

请求所发送到的路径spring-doc.cadn.net.cn

statusspring-doc.cadn.net.cn

Numberspring-doc.cadn.net.cn

HTTP 状态码,例如 400spring-doc.cadn.net.cn

timestampspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

发生错误时的时间(以毫秒为单位)spring-doc.cadn.net.cn

42.6 超媒体

Spring Cloud Data Flow 使用超媒体(hypermedia),资源在其响应中包含指向其他资源的链接。 响应采用超文本应用语言(HAL,Hypertext Application Language)格式。 链接位于 _links 键下。 API 的使用者不应自行构造 URI。 相反,应使用上述链接进行导航。spring-doc.cadn.net.cn

43. 资源

该 API 包含以下资源:spring-doc.cadn.net.cn

43.1 索引

索引提供了进入 Spring Cloud Data Flow REST API 的入口点。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.1.1. 访问索引

使用 GET 请求访问索引。spring-doc.cadn.net.cn

请求结构
GET / HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/' -i -X GET
响应结构
路径 类型 描述

_linksspring-doc.cadn.net.cn

Objectspring-doc.cadn.net.cn

链接到其他资源spring-doc.cadn.net.cn

['api.revision']spring-doc.cadn.net.cn

Numberspring-doc.cadn.net.cn

每次在此 REST API 中实施更改时递增spring-doc.cadn.net.cn

_links.audit-records.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

审计记录链接spring-doc.cadn.net.cn

_links.dashboard.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到仪表板spring-doc.cadn.net.cn

_links.schema/versions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 schema/versionsspring-doc.cadn.net.cn

_links.schema/targets.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 schema/targetsspring-doc.cadn.net.cn

_links.streams/definitions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到流/定义spring-doc.cadn.net.cn

_links.streams/definitions/definition.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/definitions/definitionspring-doc.cadn.net.cn

_links.streams/definitions/definition.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/definitions/definition 是模板化的spring-doc.cadn.net.cn

_links.runtime/apps.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/appsspring-doc.cadn.net.cn

_links.runtime/apps/{appId}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/apps/{appId}spring-doc.cadn.net.cn

_links.runtime/apps/{appId}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

运行时/apps链接是模板化的spring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/apps/{appId}/instancesspring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 runtime/apps/{appId}/instances 是模板化的spring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances/{instanceId}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/apps/{appId}/instances/{instanceId}spring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances/{instanceId}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 runtime/apps/{appId}/instances/{instanceId} 是模板化的spring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances/{instanceId}/post.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/apps/{appId}/instances/{instanceId}/postspring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances/{instanceId}/post.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 runtime/apps/{appId}/instances/{instanceId}/post 是模板化的spring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances/{instanceId}/actuator[].hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/apps/{appId}/instances/{instanceId}/actuatorspring-doc.cadn.net.cn

_links.runtime/apps/{appId}/instances/{instanceId}/actuator[].templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 runtime/apps/{appId}/instances/{instanceId}/actuator 是模板化的spring-doc.cadn.net.cn

_links.runtime/streams.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/streamsspring-doc.cadn.net.cn

_links.runtime/streams.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 runtime/streams 是模板化的spring-doc.cadn.net.cn

_links.runtime/streams/{streamNames}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 runtime/streams/{streamNames}spring-doc.cadn.net.cn

_links.runtime/streams/{streamNames}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 runtime/streams/{streamNames} 是模板化的spring-doc.cadn.net.cn

_links.streams/logs.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到流/日志spring-doc.cadn.net.cn

_links.streams/logs/{streamName}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/logs/{streamName}spring-doc.cadn.net.cn

_links.streams/logs/{streamName}/{appName}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/logs/{streamName}/{appName}spring-doc.cadn.net.cn

_links.streams/logs/{streamName}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/logs/{streamName} 是模板化的spring-doc.cadn.net.cn

_links.streams/logs/{streamName}/{appName}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/logs/{streamName}/{appName} 是模板化的spring-doc.cadn.net.cn

_links.streams/deploymentsspring-doc.cadn.net.cn

Objectspring-doc.cadn.net.cn

链接到 streams/deploymentsspring-doc.cadn.net.cn

_links.streams/deployments.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deploymentsspring-doc.cadn.net.cn

_links.streams/deployments/{name}spring-doc.cadn.net.cn

Objectspring-doc.cadn.net.cn

链接 streams/deployments/{name} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/{name}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接 streams/deployments/{name} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/{name}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/{name} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/{name}{?reuse-deployment-properties}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接 streams/deployments/{name} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/{name}{?reuse-deployment-properties}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/{name} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/deployment.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/deploymentspring-doc.cadn.net.cn

_links.streams/deployments/deployment.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/deployment 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/manifest/{name}/{version}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/manifest/{name}/{version}spring-doc.cadn.net.cn

_links.streams/deployments/manifest/{name}/{version}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/manifest/{name}/{version} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/history/{name}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/history/{name}spring-doc.cadn.net.cn

_links.streams/deployments/history/{name}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/history 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/rollback/{name}/{version}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/rollback/{name}/{version}spring-doc.cadn.net.cn

_links.streams/deployments/rollback/{name}/{version}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/rollback/{name}/{version} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/update/{name}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/update/{name}spring-doc.cadn.net.cn

_links.streams/deployments/update/{name}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/update/{name} 是模板化的spring-doc.cadn.net.cn

_links.streams/deployments/platform/list.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/platform/listspring-doc.cadn.net.cn

_links.streams/deployments/scale/{streamName}/{appName}/instances/{count}.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/deployments/scale/{streamName}/{appName}/instances/{count}spring-doc.cadn.net.cn

_links.streams/deployments/scale/{streamName}/{appName}/instances/{count}.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 streams/deployments/scale/{streamName}/{appName}/instances/{count} 是模板化的spring-doc.cadn.net.cn

_links.streams/validation.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 streams/validationspring-doc.cadn.net.cn

_links.streams/validation.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接流/validation 是模板化的spring-doc.cadn.net.cn

_links.tasks/platforms.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/平台spring-doc.cadn.net.cn

_links.tasks/definitions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/定义spring-doc.cadn.net.cn

_links.tasks/definitions/definition.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tasks/definitions/definitionspring-doc.cadn.net.cn

_links.tasks/definitions/definition.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接任务/定义/definition 是模板化的spring-doc.cadn.net.cn

_links.tasks/executions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/执行spring-doc.cadn.net.cn

_links.tasks/executions/launch.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/执行/启动spring-doc.cadn.net.cn

_links.tasks/executions/launch.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

表示链接任务/执行/启动是模板化的spring-doc.cadn.net.cn

_links.tasks/executions/name.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tasks/executions/namespring-doc.cadn.net.cn

_links.tasks/executions/name.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接任务/执行/名称是模板化的spring-doc.cadn.net.cn

_links.tasks/executions/current.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tasks/executions/currentspring-doc.cadn.net.cn

_links.tasks/executions/execution.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/执行/执行实例spring-doc.cadn.net.cn

_links.tasks/executions/execution.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接任务/执行/执行实例是模板化的spring-doc.cadn.net.cn

_links.tasks/executions/external.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/执行/外部spring-doc.cadn.net.cn

_links.tasks/executions/external.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 tasks/executions/external 是模板化的spring-doc.cadn.net.cn

_links.tasks/info/executions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/信息/执行spring-doc.cadn.net.cn

_links.tasks/info/executions.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 tasks/info 是模板化的spring-doc.cadn.net.cn

_links.tasks/logs.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/日志spring-doc.cadn.net.cn

_links.tasks/logs.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接任务/日志是模板化的spring-doc.cadn.net.cn

_links.tasks/thinexecutions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tasks/thinexecutionsspring-doc.cadn.net.cn

_links.tasks/schedules.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/执行/调度spring-doc.cadn.net.cn

_links.tasks/schedules/instances.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到任务/计划/实例spring-doc.cadn.net.cn

_links.tasks/schedules/instances.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接任务/计划/实例是模板化的spring-doc.cadn.net.cn

_links.tasks/validation.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tasks/validationspring-doc.cadn.net.cn

_links.tasks/validation.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接任务/验证是模板化的spring-doc.cadn.net.cn

_links.jobs/executions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到作业/执行spring-doc.cadn.net.cn

_links.jobs/thinexecutions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/thinexecutionsspring-doc.cadn.net.cn

_links.jobs/executions/name.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/executions/namespring-doc.cadn.net.cn

_links.jobs/executions/name.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/name 是模板化的spring-doc.cadn.net.cn

_links.jobs/executions/status.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/executions/statusspring-doc.cadn.net.cn

_links.jobs/executions/status.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/status 是模板化的spring-doc.cadn.net.cn

_links.jobs/thinexecutions/name.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/thinexecutions/namespring-doc.cadn.net.cn

_links.jobs/thinexecutions/name.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/name 是模板化的spring-doc.cadn.net.cn

_links.jobs/thinexecutions/jobInstanceId.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/thinexecutions/jobInstanceIdspring-doc.cadn.net.cn

_links.jobs/thinexecutions/jobInstanceId.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/jobInstanceId 是模板化的spring-doc.cadn.net.cn

_links.jobs/thinexecutions/taskExecutionId.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/thinexecutions/taskExecutionIdspring-doc.cadn.net.cn

_links.jobs/thinexecutions/taskExecutionId.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/taskExecutionId 是模板化的spring-doc.cadn.net.cn

_links.jobs/executions/execution.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/executions/executionspring-doc.cadn.net.cn

_links.jobs/executions/execution.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/execution 是模板化的spring-doc.cadn.net.cn

_links.jobs/executions/execution/steps.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/executions/execution/stepsspring-doc.cadn.net.cn

_links.jobs/executions/execution/steps.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/execution/steps 是模板化的spring-doc.cadn.net.cn

_links.jobs/executions/execution/steps/step.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/executions/execution/steps/stepspring-doc.cadn.net.cn

_links.jobs/executions/execution/steps/step.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/execution/steps/step 是模板化的spring-doc.cadn.net.cn

_links.jobs/executions/execution/steps/step/progress.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/executions/execution/steps/step/progressspring-doc.cadn.net.cn

_links.jobs/executions/execution/steps/step/progress.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/executions/execution/steps/step/progress 是模板化的spring-doc.cadn.net.cn

_links.jobs/instances/name.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/instances/namespring-doc.cadn.net.cn

_links.jobs/instances/name.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/instances/name 是模板化的spring-doc.cadn.net.cn

_links.jobs/instances/instance.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 jobs/instances/instancespring-doc.cadn.net.cn

_links.jobs/instances/instance.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 jobs/instances/instance 是模板化的spring-doc.cadn.net.cn

_links.tools/parseTaskTextToGraph.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tools/parseTaskTextToGraphspring-doc.cadn.net.cn

_links.tools/convertTaskGraphToText.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tools/convertTaskGraphToTextspring-doc.cadn.net.cn

_links.apps.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到应用程序spring-doc.cadn.net.cn

_links.about.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

关于页面的链接spring-doc.cadn.net.cn

_links.completions/stream.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 completions/streamspring-doc.cadn.net.cn

_links.completions/stream.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 completions/stream 是模板化的spring-doc.cadn.net.cn

_links.completions/task.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 completions/taskspring-doc.cadn.net.cn

_links.completions/task.templatedspring-doc.cadn.net.cn

Booleanspring-doc.cadn.net.cn

链接 completions/task 是模板化的spring-doc.cadn.net.cn

示例响应
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 8220

{
  "_links" : {
    "dashboard" : {
      "href" : "http://localhost:9393/dashboard"
    },
    "audit-records" : {
      "href" : "http://localhost:9393/audit-records"
    },
    "schema/versions" : {
      "href" : "http://localhost:9393/schema/versions"
    },
    "schema/targets" : {
      "href" : "http://localhost:9393/schema/targets"
    },
    "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
    },
    "runtime/apps/{appId}/instances/{instanceId}/actuator" : [ {
      "href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}/actuator?endpoint={endpoint}",
      "templated" : true
    }, {
      "href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}/actuator",
      "templated" : true
    } ],
    "runtime/apps/{appId}/instances/{instanceId}/post" : {
      "href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}/post",
      "templated" : true
    },
    "streams/deployments" : {
      "href" : "http://localhost:9393/streams/deployments"
    },
    "streams/deployments/{name}{?reuse-deployment-properties}" : {
      "href" : "http://localhost:9393/streams/deployments/{name}?reuse-deployment-properties=false",
      "templated" : true
    },
    "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/external" : {
      "href" : "http://localhost:9393/tasks/executions/external/{externalExecutionId}{?platform}",
      "templated" : true
    },
    "tasks/executions/launch" : {
      "href" : "http://localhost:9393/tasks/executions/launch?name={name}{&properties,arguments}",
      "templated" : true
    },
    "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}{?schemaTarget}",
      "templated" : true
    },
    "tasks/validation" : {
      "href" : "http://localhost:9393/tasks/validation/{name}",
      "templated" : true
    },
    "tasks/info/executions" : {
      "href" : "http://localhost:9393/tasks/info/executions{?completed,name,days}",
      "templated" : true
    },
    "tasks/logs" : {
      "href" : "http://localhost:9393/tasks/logs/{taskExternalExecutionId}{?platformName,schemaTarget}",
      "templated" : true
    },
    "tasks/thinexecutions" : {
      "href" : "http://localhost:9393/tasks/thinexecutions"
    },
    "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
    },
    "jobs/thinexecutions/jobInstanceId" : {
      "href" : "http://localhost:9393/jobs/thinexecutions{?jobInstanceId}",
      "templated" : true
    },
    "jobs/thinexecutions/taskExecutionId" : {
      "href" : "http://localhost:9393/jobs/thinexecutions{?taskExecutionId}",
      "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 并执行所需的功能:spring-doc.cadn.net.cn

关系 描述

aboutspring-doc.cadn.net.cn

访问元信息,包括已启用的功能、安全信息和版本信息spring-doc.cadn.net.cn

dashboardspring-doc.cadn.net.cn

访问仪表板用户界面spring-doc.cadn.net.cn

audit-recordsspring-doc.cadn.net.cn

提供审计跟踪信息spring-doc.cadn.net.cn

appsspring-doc.cadn.net.cn

处理已注册的应用程序spring-doc.cadn.net.cn

completions/streamspring-doc.cadn.net.cn

为 Stream 暴露 DSL 补全功能spring-doc.cadn.net.cn

completions/taskspring-doc.cadn.net.cn

为 Task 公开 DSL 补全功能spring-doc.cadn.net.cn

jobs/executionsspring-doc.cadn.net.cn

提供 JobExecution 资源spring-doc.cadn.net.cn

jobs/thinexecutionsspring-doc.cadn.net.cn

提供不包含步骤执行信息的 JobExecution 精简资源spring-doc.cadn.net.cn

jobs/executions/executionspring-doc.cadn.net.cn

提供特定 JobExecution 的详细信息spring-doc.cadn.net.cn

jobs/executions/execution/stepsspring-doc.cadn.net.cn

提供 JobExecution 的步骤spring-doc.cadn.net.cn

jobs/executions/execution/steps/stepspring-doc.cadn.net.cn

返回特定步骤的详细信息spring-doc.cadn.net.cn

jobs/executions/execution/steps/step/progressspring-doc.cadn.net.cn

为特定步骤提供进度信息spring-doc.cadn.net.cn

jobs/executions/namespring-doc.cadn.net.cn

根据作业名称检索作业执行记录spring-doc.cadn.net.cn

jobs/executions/statusspring-doc.cadn.net.cn

根据作业状态检索作业执行记录spring-doc.cadn.net.cn

jobs/thinexecutions/namespring-doc.cadn.net.cn

根据作业名称检索作业执行记录,不包含步骤执行信息spring-doc.cadn.net.cn

jobs/thinexecutions/jobInstanceIdspring-doc.cadn.net.cn

根据作业实例 ID 检索作业执行记录,且不包含步骤执行信息spring-doc.cadn.net.cn

jobs/thinexecutions/taskExecutionIdspring-doc.cadn.net.cn

根据任务执行ID检索作业执行信息,且不包含步骤执行信息spring-doc.cadn.net.cn

jobs/instances/instancespring-doc.cadn.net.cn

为特定作业实例提供作业实例资源spring-doc.cadn.net.cn

jobs/instances/namespring-doc.cadn.net.cn

为指定的作业名称提供 Job 实例资源spring-doc.cadn.net.cn

runtime/streamsspring-doc.cadn.net.cn

暴露流运行时状态spring-doc.cadn.net.cn

runtime/streams/{streamNames}spring-doc.cadn.net.cn

暴露给定流名称的流运行时状态spring-doc.cadn.net.cn

runtime/appsspring-doc.cadn.net.cn

提供运行时应用程序资源spring-doc.cadn.net.cn

runtime/apps/{appId}spring-doc.cadn.net.cn

公开特定应用的运行时状态spring-doc.cadn.net.cn

runtime/apps/{appId}/instancesspring-doc.cadn.net.cn

提供应用程序实例的状态spring-doc.cadn.net.cn

runtime/apps/{appId}/instances/{instanceId}spring-doc.cadn.net.cn

提供特定应用实例的状态spring-doc.cadn.net.cn

runtime/apps/{appId}/instances/{instanceId}/actuatorspring-doc.cadn.net.cn

实验性功能:允许在特定应用实例上调用 Actuator 端点spring-doc.cadn.net.cn

runtime/apps/{appId}/instances/{instanceId}/postspring-doc.cadn.net.cn

实验性功能:允许在 HTTP 接收器上使用 POSTspring-doc.cadn.net.cn

tasks/definitionsspring-doc.cadn.net.cn

提供任务定义资源spring-doc.cadn.net.cn

tasks/definitions/definitionspring-doc.cadn.net.cn

提供特定任务定义的详细信息spring-doc.cadn.net.cn

tasks/validationspring-doc.cadn.net.cn

提供任务定义的验证spring-doc.cadn.net.cn

tasks/executionsspring-doc.cadn.net.cn

返回任务执行信息spring-doc.cadn.net.cn

tasks/executions/launchspring-doc.cadn.net.cn

提供启动任务执行的功能spring-doc.cadn.net.cn

tasks/executions/externalspring-doc.cadn.net.cn

根据外部 ID 返回任务执行信息spring-doc.cadn.net.cn

tasks/executions/currentspring-doc.cadn.net.cn

提供当前正在运行的任务数量spring-doc.cadn.net.cn

tasks/info/executionsspring-doc.cadn.net.cn

提供任务执行信息spring-doc.cadn.net.cn

tasks/schedulesspring-doc.cadn.net.cn

提供任务的调度信息spring-doc.cadn.net.cn

tasks/schedules/instancesspring-doc.cadn.net.cn

提供特定任务的调度信息spring-doc.cadn.net.cn

tasks/executions/namespring-doc.cadn.net.cn

返回给定任务名称的所有任务执行记录spring-doc.cadn.net.cn

tasks/executions/executionspring-doc.cadn.net.cn

提供特定任务执行的详细信息spring-doc.cadn.net.cn

tasks/platformsspring-doc.cadn.net.cn

提供用于启动任务的平台账户。可以通过添加请求参数 'schedulesEnabled=true' 来筛选结果,以仅显示支持调度的平台。spring-doc.cadn.net.cn

tasks/logsspring-doc.cadn.net.cn

获取任务应用程序日志spring-doc.cadn.net.cn

tasks/thinexecutionsspring-doc.cadn.net.cn

返回精简的 Task 执行信息spring-doc.cadn.net.cn

schema/versionsspring-doc.cadn.net.cn

Spring Boot 相关 schema 列表spring-doc.cadn.net.cn

schema/targetsspring-doc.cadn.net.cn

架构目标列表spring-doc.cadn.net.cn

streams/definitionsspring-doc.cadn.net.cn

暴露 Streams 资源spring-doc.cadn.net.cn

streams/definitions/definitionspring-doc.cadn.net.cn

处理特定的 Stream 定义spring-doc.cadn.net.cn

streams/validationspring-doc.cadn.net.cn

提供对流定义的验证spring-doc.cadn.net.cn

streams/deploymentsspring-doc.cadn.net.cn

提供流部署操作spring-doc.cadn.net.cn

streams/deployments/{name}spring-doc.cadn.net.cn

请求流定义的部署信息spring-doc.cadn.net.cn

streams/deployments/{name}{?reuse-deployment-properties}spring-doc.cadn.net.cn

请求流定义的部署信息spring-doc.cadn.net.cn

streams/deployments/deploymentspring-doc.cadn.net.cn

请求(取消)部署一个已存在的流定义spring-doc.cadn.net.cn

streams/deployments/manifest/{name}/{version}spring-doc.cadn.net.cn

返回一个发布版本的清单信息spring-doc.cadn.net.cn

streams/deployments/history/{name}spring-doc.cadn.net.cn

获取该发布版本的流部署历史记录列表或发布信息spring-doc.cadn.net.cn

streams/deployments/rollback/{name}/{version}spring-doc.cadn.net.cn

将流回滚到之前的版本或指定的版本spring-doc.cadn.net.cn

streams/deployments/update/{name}spring-doc.cadn.net.cn

更新流。spring-doc.cadn.net.cn

streams/deployments/platform/listspring-doc.cadn.net.cn

支持的部署平台列表spring-doc.cadn.net.cn

streams/deployments/scale/{streamName}/{appName}/instances/{count}spring-doc.cadn.net.cn

为所选流扩展或缩减应用程序实例的数量spring-doc.cadn.net.cn

streams/logsspring-doc.cadn.net.cn

获取该流的应用程序日志spring-doc.cadn.net.cn

streams/logs/{streamName}spring-doc.cadn.net.cn

获取该流的应用程序日志spring-doc.cadn.net.cn

streams/logs/{streamName}/{appName}spring-doc.cadn.net.cn

获取流的特定应用程序日志spring-doc.cadn.net.cn

tools/parseTaskTextToGraphspring-doc.cadn.net.cn

将任务定义解析为图结构spring-doc.cadn.net.cn

tools/convertTaskGraphToTextspring-doc.cadn.net.cn

将图格式转换为DSL文本格式spring-doc.cadn.net.cn

43.2. 服务器元信息

服务器元信息端点提供了有关服务器本身的更多信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.2.1. 获取服务器信息

一个 GET 请求会返回 Spring Cloud Data Flow 的元信息,包括:spring-doc.cadn.net.cn

请求结构
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: 2635

{
  "featureInfo" : {
    "analyticsEnabled" : true,
    "streamsEnabled" : true,
    "tasksEnabled" : true,
    "schedulesEnabled" : true,
    "monitoringDashboardType" : "NONE"
  },
  "versionInfo" : {
    "implementation" : {
      "name" : "${info.app.name}",
      "version" : "2.11.5"
    },
    "core" : {
      "name" : "Spring Cloud Data Flow Core",
      "version" : "2.11.5"
    },
    "dashboard" : {
      "name" : "Spring Cloud Dataflow UI",
      "version" : "3.4.6"
    },
    "shell" : {
      "name" : "Spring Cloud Data Flow Shell",
      "version" : "2.11.5",
      "url" : "https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.11.5/spring-cloud-dataflow-shell-2.11.5.jar"
    }
  },
  "securityInfo" : {
    "authenticationEnabled" : false,
    "authenticated" : false,
    "username" : null,
    "roles" : [ ]
  },
  "runtimeEnvironment" : {
    "appDeployer" : {
      "deployerImplementationVersion" : "Test Version",
      "deployerName" : "Test Server",
      "deployerSpiVersion" : "2.11.5",
      "javaVersion" : "1.8.0_422",
      "platformApiVersion" : "",
      "platformClientVersion" : "",
      "platformHostVersion" : "",
      "platformSpecificInfo" : {
        "default" : "local"
      },
      "platformType" : "Skipper Managed",
      "springBootVersion" : "2.7.18",
      "springVersion" : "5.3.39"
    },
    "taskLaunchers" : [ {
      "deployerImplementationVersion" : "unknown",
      "deployerName" : "LocalTaskLauncher",
      "deployerSpiVersion" : "unknown",
      "javaVersion" : "1.8.0_422",
      "platformApiVersion" : "Linux 6.5.0-1025-azure",
      "platformClientVersion" : "6.5.0-1025-azure",
      "platformHostVersion" : "6.5.0-1025-azure",
      "platformSpecificInfo" : { },
      "platformType" : "Local",
      "springBootVersion" : "2.7.18",
      "springVersion" : "5.3.39"
    } ]
  },
  "monitoringDashboardInfo" : {
    "url" : "",
    "refreshInterval" : 15,
    "dashboardType" : "NONE",
    "source" : "default-scdf-source"
  },
  "gitAndBuildInfo" : {
    "git" : {
      "commit" : {
        "time" : "2024-04-24T11:35:29Z",
        "id" : {
          "abbrev" : "fddafed",
          "full" : "fddafed39b919981cbb5bd04bd7fb5266fa25309"
        }
      },
      "branch" : "main"
    },
    "build" : {
      "version" : "2.11.3-SNAPSHOT",
      "artifact" : "spring-cloud-dataflow-server",
      "name" : "Spring Cloud Data Flow Server",
      "group" : "org.springframework.cloud",
      "time" : "2024-04-25T12:36:37.169Z"
    }
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/about"
    }
  }
}

43.3. 已注册的应用程序

注册的应用程序端点提供有关向 Spring Cloud Data Flow 服务器注册的应用程序的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.3.1. 列出应用程序

一个 GET 请求会列出 Spring Cloud Data Flow 所知的所有应用程序。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /apps?search=&type=source&defaultVersion=true&page=0&size=10&sort=name%2CASC HTTP/1.1
Accept: application/json
Host: localhost:9393
请求参数
参数 描述

searchspring-doc.cadn.net.cn

在名称上执行的搜索字符串(可选)spring-doc.cadn.net.cn

typespring-doc.cadn.net.cn

将返回的应用限制为指定类型。可选值包括:[app, source, processor, sink, task]spring-doc.cadn.net.cn

defaultVersionspring-doc.cadn.net.cn

用于设置的布尔标志,以仅检索默认版本的应用(可选)spring-doc.cadn.net.cn

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sortspring-doc.cadn.net.cn

列表上的排序(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ 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: 1151

{
  "_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,
      "bootVersion" : "2",
      "versions" : [ "1.2.0.RELEASE" ],
      "label" : null,
      "_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,
      "bootVersion" : "2",
      "versions" : [ "1.2.0.RELEASE" ],
      "label" : null,
      "_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
  }
}

43.3.2. 获取特定应用程序的信息

GET 发起一个 /apps/<type>/<name> 请求,可获取特定应用程序的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /apps/source/http?exhaustive=false HTTP/1.1
Accept: application/json
Host: localhost:9393
请求参数
参数 描述

exhaustivespring-doc.cadn.net.cn

返回所有应用程序属性,包括常见的 Spring Boot 属性spring-doc.cadn.net.cn

路径参数

/apps/{type}/{name}spring-doc.cadn.net.cn

参数 描述

typespring-doc.cadn.net.cn

要查询的应用程序类型。可选值包括:[app, source, processor, sink, task]spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

要查询的应用程序名称spring-doc.cadn.net.cn

示例请求
$ 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: 382

{
  "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,
  "bootVersion" : "2",
  "versions" : null,
  "label" : null,
  "options" : [ ],
  "shortDescription" : null,
  "inboundPortNames" : [ ],
  "outboundPortNames" : [ ],
  "optionGroups" : { }
}

43.3.3. 注册新应用

POST 发起一个 /apps/<type>/<name> 请求可用于注册一个新的应用。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
POST /apps/source/http?bootVersion=2 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
请求参数
参数 描述

urispring-doc.cadn.net.cn

应用程序文件所在的 URIspring-doc.cadn.net.cn

metadata-urispring-doc.cadn.net.cn

可找到应用程序元数据 JAR 文件的 URIspring-doc.cadn.net.cn

bootVersionspring-doc.cadn.net.cn

应用程序的 Spring Boot 版本。默认值为 2。spring-doc.cadn.net.cn

forcespring-doc.cadn.net.cn

如果已存在具有相同名称和类型的注册项,则必须为 true,否则将发生错误spring-doc.cadn.net.cn

路径参数

/apps/{type}/{name}spring-doc.cadn.net.cn

参数 描述

typespring-doc.cadn.net.cn

要注册的应用程序类型。可选值包括:[app, source, processor, sink, task]spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

要注册的应用程序名称spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/apps/source/http?bootVersion=2' -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

43.3.4. 注册带有版本的新应用

POST 发起一个 /apps/<type>/<name>/<version> 请求可用于注册一个新的应用。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
POST /apps/source/http/1.1.0.RELEASE?bootVersion=2 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
请求参数
参数 描述

urispring-doc.cadn.net.cn

应用程序文件所在的 URIspring-doc.cadn.net.cn

metadata-urispring-doc.cadn.net.cn

可找到应用程序元数据 JAR 文件的 URIspring-doc.cadn.net.cn

forcespring-doc.cadn.net.cn

如果已存在具有相同名称和类型的注册项,则必须为 true,否则将发生错误spring-doc.cadn.net.cn

bootVersionspring-doc.cadn.net.cn

Spring Boot 版本。值为 2 或 3。若大于 2,则必须提供该值。spring-doc.cadn.net.cn

路径参数

/apps/{type}/{name}/{version:.+}spring-doc.cadn.net.cn

参数 描述

typespring-doc.cadn.net.cn

要注册的应用程序类型。可选值包括 [app, source, processor, sink, task](可选)spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

要注册的应用程序名称spring-doc.cadn.net.cn

versionspring-doc.cadn.net.cn

要注册的应用程序版本spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/apps/source/http/1.1.0.RELEASE?bootVersion=2' -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

43.3.5. 批量注册应用程序

POST 发起的 /apps 请求允许一次性注册多个应用程序。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
请求参数
参数 描述

urispring-doc.cadn.net.cn

可用于获取包含注册信息的属性文件的 URI。与 apps 互斥。spring-doc.cadn.net.cn

appsspring-doc.cadn.net.cn

内联的注册集合。与 uri 互斥。spring-doc.cadn.net.cn

forcespring-doc.cadn.net.cn

如果已存在具有相同名称和类型的注册项,则必须为 true,否则将发生错误spring-doc.cadn.net.cn

示例请求
$ 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: 685

{
  "_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,
      "bootVersion" : "2",
      "versions" : null,
      "label" : 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
  }
}

43.3.6. 设置默认应用程序版本

对于具有相同 nametype 的应用程序,您可以注册多个版本。 在这种情况下,您可以选择其中一个版本作为默认应用程序。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
PUT /apps/source/http/1.2.0.RELEASE HTTP/1.1
Accept: application/json
Host: localhost:9393
路径参数

/apps/{type}/{name}/{version:.+}spring-doc.cadn.net.cn

参数 描述

typespring-doc.cadn.net.cn

应用程序的类型。可选值包括:[app, source, processor, sink, task]spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

应用程序的名称spring-doc.cadn.net.cn

versionspring-doc.cadn.net.cn

应用程序的版本spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/apps/source/http/1.2.0.RELEASE' -i -X PUT \
    -H 'Accept: application/json'
响应结构
HTTP/1.1 202 Accepted

43.3.7. 注销应用程序

DELETE 发起的 /apps/<type>/<name> 请求会注销一个先前已注册的应用程序。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /apps/source/http/1.2.0.RELEASE HTTP/1.1
Host: localhost:9393
路径参数

/apps/{type}/{name}/{version}spring-doc.cadn.net.cn

参数 描述

typespring-doc.cadn.net.cn

要注销的应用程序类型。可选值包括:[app, source, processor, sink, task]spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

要注销的应用程序名称spring-doc.cadn.net.cn

versionspring-doc.cadn.net.cn

要注销的应用程序版本(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/apps/source/http/1.2.0.RELEASE' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.3.8. 注销所有应用程序

DELETE 发送一个 /apps 请求将注销所有应用程序。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /apps HTTP/1.1
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/apps' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.4. 架构信息

架构信息端点提供有关任务(Task)和批处理(Batch)应用程序所支持的 Spring Boot 架构版本以及可用架构目标的信息。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.4.1. 列出所有架构版本

架构端点用于列出受支持的 Spring Boot 版本。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /schema/versions HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/schema/versions' -i -X GET \
    -H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 63

{
  "defaultSchemaVersion" : "2",
  "versions" : [ "2", "3" ]
}

43.4.2. 列出所有架构目标

模式端点用于列出支持的模式目标。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /schema/targets HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl 'http://localhost:9393/schema/targets' -i -X GET \
    -H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 660

{
  "defaultSchemaTarget" : "boot2",
  "schemas" : [ {
    "name" : "boot3",
    "schemaVersion" : "3",
    "taskPrefix" : "BOOT3_TASK_",
    "batchPrefix" : "BOOT3_BATCH_",
    "datasource" : null,
    "_links" : {
      "self" : {
        "href" : "http://localhost:9393/schema/targets/boot3"
      }
    }
  }, {
    "name" : "boot2",
    "schemaVersion" : "2",
    "taskPrefix" : "TASK_",
    "batchPrefix" : "BATCH_",
    "datasource" : null,
    "_links" : {
      "self" : {
        "href" : "http://localhost:9393/schema/targets/boot2"
      }
    }
  } ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/schema/targets"
    }
  }
}

43.5. 审计记录

审计记录端点提供有关审计记录的信息。以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.5.1. 列出所有审计记录

审计记录端点允许您检索审计跟踪信息。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

operationsspring-doc.cadn.net.cn

逗号分隔的审计操作列表(可选)spring-doc.cadn.net.cn

actionsspring-doc.cadn.net.cn

以逗号分隔的审计操作列表(可选)spring-doc.cadn.net.cn

fromDatespring-doc.cadn.net.cn

起始日期筛选器(例如:2019-02-03T00:00:30)(可选)spring-doc.cadn.net.cn

toDatespring-doc.cadn.net.cn

截止日期筛选器(例如:2019-02-03T00:00:30)(可选)spring-doc.cadn.net.cn

示例请求
$ 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" : "2024-09-13T10:11:46.663Z",
      "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
  }
}

43.5.2. 检索审计记录详情

审计记录端点允许您获取单条审计记录。以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /audit-records/5 HTTP/1.1
Host: localhost:9393
路径参数

/audit-records/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

要查询的审计记录的 ID(必填)spring-doc.cadn.net.cn

示例请求
$ 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" : "2024-09-13T10:11:45.673Z",
  "auditAction" : "CREATE",
  "auditOperation" : "STREAM",
  "platformName" : null,
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/audit-records/5"
    }
  }
}

43.5.3. 列出所有审计操作类型

审计记录端点允许您获取操作类型。以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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: 1111

[ {
  "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"
}, {
  "id" : 700,
  "name" : "SuccessfulLogin",
  "description" : "Successful login",
  "nameWithDescription" : "SuccessfulLogin (Successful login)",
  "key" : "LOGIN_SUCCESS"
} ]

43.5.4. 列出所有审计操作类型

审计记录端点允许您获取操作类型。以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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: 315

[ {
  "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"
}, {
  "id" : 500,
  "name" : "Login",
  "key" : "LOGIN"
} ]

43.6. 流定义

已注册的应用程序端点提供有关在 Spring Cloud Data Flow 服务器中注册的流定义的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.6.1. 创建新的流定义

通过向流定义端点发送 POST 请求来创建流定义。 一个用于 ticktock 流的 curl 请求可能如下所示:spring-doc.cadn.net.cn

curl -X POST -d "name=ticktock&definition=time | log" localhost:9393/streams/definitions?deploy=false

流定义还可以包含额外的参数。 例如,在“请求结构”一节所示的示例中,我们还提供了日期时间格式。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
请求参数
参数 描述

namespring-doc.cadn.net.cn

所创建任务定义的名称spring-doc.cadn.net.cn

definitionspring-doc.cadn.net.cn

使用 Data Flow DSL 定义流spring-doc.cadn.net.cn

descriptionspring-doc.cadn.net.cn

流定义的描述spring-doc.cadn.net.cn

deployspring-doc.cadn.net.cn

如果为 true,则流在创建时即被部署(默认为 false)spring-doc.cadn.net.cn

示例请求
$ 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"
    }
  }
}

43.6.2. 列出所有流定义

流(streams)端点允许您列出所有流定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /streams/definitions?page=0&sort=name%2CASC&search=&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

searchspring-doc.cadn.net.cn

在名称上执行的搜索字符串(可选)spring-doc.cadn.net.cn

sortspring-doc.cadn.net.cn

列表上的排序(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ 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: 730

{
  "_embedded" : {
    "streamDefinitionResourceList" : [ {
      "name" : "timelog",
      "dslText" : "time --format='YYYY MM DD' | log",
      "originalDslText" : "time --format='YYYY MM DD' | 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/timelog"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/streams/definitions?page=0&size=10&sort=name,asc"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

流(streams)端点允许您列出相关的流定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

GET /streams/definitions/timelog/related?page=0&sort=name%2CASC&search=&size=10&nested=true HTTP/1.1
Host: localhost:9393
参数 描述

nestedspring-doc.cadn.net.cn

是否应递归地为相关流定义执行 findByTaskNameContains 操作(可选)spring-doc.cadn.net.cn

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

searchspring-doc.cadn.net.cn

在名称上执行的搜索字符串(可选)spring-doc.cadn.net.cn

sortspring-doc.cadn.net.cn

列表上的排序(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

$ 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: 746

{
  "_embedded" : {
    "streamDefinitionResourceList" : [ {
      "name" : "timelog",
      "dslText" : "time --format='YYYY MM DD' | log",
      "originalDslText" : "time --format='YYYY MM DD' | 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/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
  }
}

43.6.4. 检索流定义详情

流定义端点允许您获取单个流定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /streams/definitions/timelog HTTP/1.1
Host: localhost:9393
路径参数

/streams/definitions/{name}spring-doc.cadn.net.cn

参数 描述

namespring-doc.cadn.net.cn

要查询的流定义的名称(必填)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/definitions/timelog' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 387

{
  "name" : "timelog",
  "dslText" : "time --format='YYYY MM DD' | log",
  "originalDslText" : "time --format='YYYY MM DD' | 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/timelog"
    }
  }
}

43.6.5. 删除单个流定义

流(streams)端点允许您删除单个流定义。 (另请参阅:删除所有流定义。) 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /streams/definitions/timelog HTTP/1.1
Host: localhost:9393
请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/definitions/timelog' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.6.6. 删除所有流定义

流(streams)端点允许您删除所有单个流定义。 (另请参阅:删除单个流定义。) 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /streams/definitions HTTP/1.1
Host: localhost:9393
请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/definitions' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.7. 流验证

流验证端点允许您验证流定义中的应用。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.7.1. 请求结构

GET /streams/validation/timelog HTTP/1.1
Host: localhost:9393

43.7.2. 路径参数

/streams/validation/{name}spring-doc.cadn.net.cn

参数 描述

namespring-doc.cadn.net.cn

要验证的流定义的名称(必填)spring-doc.cadn.net.cn

43.7.3. 示例请求

$ curl 'http://localhost:9393/streams/validation/timelog' -i -X GET

43.7.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"
  }
}

43.8. 流式部署

部署定义端点提供有关已注册到 Spring Cloud Data Flow 服务器的部署信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.8.1. 部署流定义

流定义端点允许您部署单个流定义。 可选地,您可以在请求体中以属性的形式传递应用程序参数。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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}spring-doc.cadn.net.cn

参数 描述

timelogspring-doc.cadn.net.cn

现有流定义的名称(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ 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

43.8.2. 取消部署流定义

流定义端点允许您取消部署单个流定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /streams/deployments/timelog HTTP/1.1
Host: localhost:9393

/streams/deployments/{timelog}spring-doc.cadn.net.cn

参数 描述

timelogspring-doc.cadn.net.cn

现有流定义的名称(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/deployments/timelog' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.8.3. 取消部署所有流定义

流定义端点允许您取消部署所有单个流定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /streams/deployments HTTP/1.1
Host: localhost:9393
请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/deployments' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.8.4. 更新已部署的流

借助 Skipper,您可以更新已部署的流,并提供额外的部署属性。spring-doc.cadn.net.cn

请求结构
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}spring-doc.cadn.net.cn

参数 描述

timelog1spring-doc.cadn.net.cn

现有流定义的名称(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ 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

43.8.5. 回滚流定义

将流回滚到之前的版本或指定的版本。spring-doc.cadn.net.cn

请求结构
POST /streams/deployments/rollback/timelog1/1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393

/streams/deployments/rollback/{name}/{version}spring-doc.cadn.net.cn

参数 描述

namespring-doc.cadn.net.cn

现有流定义的名称(必填)spring-doc.cadn.net.cn

versionspring-doc.cadn.net.cn

要回滚到的版本spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/deployments/rollback/timelog1/1' -i -X POST \
    -H 'Content-Type: application/json'
响应结构
HTTP/1.1 201 Created

43.8.6. 获取清单

返回一个已发布版本的清单。对于包含依赖项的包,该清单包含这些依赖项的内容。spring-doc.cadn.net.cn

请求结构
GET /streams/deployments/manifest/timelog1/1 HTTP/1.1
Content-Type: application/json
Host: localhost:9393

/streams/deployments/manifest/{name}/{version}spring-doc.cadn.net.cn

参数 描述

namespring-doc.cadn.net.cn

现有流定义的名称(必填)spring-doc.cadn.net.cn

versionspring-doc.cadn.net.cn

流的版本spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/streams/deployments/manifest/timelog1/1' -i -X GET \
    -H 'Content-Type: application/json'
响应结构
HTTP/1.1 200 OK

43.8.7. 获取部署历史

获取该流的部署历史。spring-doc.cadn.net.cn

请求结构
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
} ]

43.8.8. 获取部署平台

获取支持的部署平台列表。spring-doc.cadn.net.cn

请求结构
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" : [ ]
} ]

43.8.9. 扩展流定义

流定义端点允许您对流定义中的单个应用进行扩缩容。 您还可以选择在请求体中以属性的形式传递应用程序参数。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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}spring-doc.cadn.net.cn

参数 描述

streamNamespring-doc.cadn.net.cn

现有流定义的名称(必填)spring-doc.cadn.net.cn

appNamespring-doc.cadn.net.cn

要缩放的流应用程序名称spring-doc.cadn.net.cn

countspring-doc.cadn.net.cn

所选流应用程序的实例数量(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ 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

43.9. 任务定义

任务定义端点提供有关已注册到 Spring Cloud Data Flow 服务器的任务定义的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.9.1. 创建新任务定义

任务定义端点允许您创建一个新的任务定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
请求参数
参数 描述

namespring-doc.cadn.net.cn

所创建任务定义的名称spring-doc.cadn.net.cn

definitionspring-doc.cadn.net.cn

使用 Data Flow DSL 定义的任务spring-doc.cadn.net.cn

descriptionspring-doc.cadn.net.cn

任务定义的描述spring-doc.cadn.net.cn

示例请求
$ 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"
    }
  }
}

43.9.2. 列出所有任务定义

任务定义端点允许您获取所有任务定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/definitions?page=0&size=10&sort=taskName%2CASC&search=&manifest=true HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

searchspring-doc.cadn.net.cn

在名称上执行的搜索字符串(可选)spring-doc.cadn.net.cn

sortspring-doc.cadn.net.cn

列表上的排序(可选)spring-doc.cadn.net.cn

manifestspring-doc.cadn.net.cn

用于指定是否将任务清单包含到最新任务执行中的标志(可选)spring-doc.cadn.net.cn

示例请求
$ 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
  }
}

43.9.3. 获取任务定义详情

任务定义端点允许您获取单个任务定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/definitions/my-task?manifest=true HTTP/1.1
Host: localhost:9393

/tasks/definitions/{my-task}spring-doc.cadn.net.cn

参数 描述

my-taskspring-doc.cadn.net.cn

现有任务定义的名称(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ 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"
    }
  }
}

43.9.4. 删除任务定义

任务定义端点允许您删除单个任务定义。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /tasks/definitions/my-task?cleanup=true HTTP/1.1
Host: localhost:9393

/tasks/definitions/{my-task}spring-doc.cadn.net.cn

参数 描述

my-taskspring-doc.cadn.net.cn

现有任务定义的名称(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/definitions/my-task?cleanup=true' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.10. 任务调度器

任务调度器端点提供有关已注册到调度器实现(Scheduler Implementation)中的任务调度信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.10.1. 创建新任务调度

任务调度端点允许您创建一个新的任务调度。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
POST /tasks/schedules HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded

scheduleName=myschedule&taskDefinitionName=mytaskname&platform=default&properties=scheduler.cron.expression%3D00+22+17+%3F+*&arguments=--foo%3Dbar
请求参数
参数 描述

scheduleNamespring-doc.cadn.net.cn

所创建计划的名称spring-doc.cadn.net.cn

platformspring-doc.cadn.net.cn

任务启动的平台名称spring-doc.cadn.net.cn

taskDefinitionNamespring-doc.cadn.net.cn

要调度的任务定义的名称spring-doc.cadn.net.cn

propertiesspring-doc.cadn.net.cn

用于调度和启动任务所需的属性spring-doc.cadn.net.cn

argumentsspring-doc.cadn.net.cn

用于启动任务的命令行参数spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/schedules' -i -X POST \
    -d 'scheduleName=myschedule&taskDefinitionName=mytaskname&platform=default&properties=scheduler.cron.expression%3D00+22+17+%3F+*&arguments=--foo%3Dbar'
响应结构
HTTP/1.1 201 Created

43.10.2. 列出所有调度

任务调度端点允许您获取所有任务调度。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/schedules?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ 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
  }
}

43.10.3. 列出过滤后的调度

任务调度端点允许您获取所有具有指定任务定义名称的任务调度。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/schedules/instances/FOO?page=0&size=10 HTTP/1.1
Host: localhost:9393

/tasks/schedules/instances/{task-definition-name}spring-doc.cadn.net.cn

参数 描述

task-definition-namespring-doc.cadn.net.cn

根据指定的任务定义筛选调度(必填)spring-doc.cadn.net.cn

请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ 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
  }
}

43.10.4. 删除任务调度

任务调度端点允许您删除单个任务调度。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
DELETE /tasks/schedules/mytestschedule HTTP/1.1
Host: localhost:9393

/tasks/schedules/{scheduleName}spring-doc.cadn.net.cn

参数 描述

scheduleNamespring-doc.cadn.net.cn

现有调度的名称(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/schedules/mytestschedule' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.11. 任务验证

任务验证端点允许您验证任务定义中的应用。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.11.1. 请求结构

GET /tasks/validation/taskC HTTP/1.1
Host: localhost:9393

43.11.2. 路径参数

/tasks/validation/{name}spring-doc.cadn.net.cn

参数 描述

namespring-doc.cadn.net.cn

要验证的任务定义的名称(必填)spring-doc.cadn.net.cn

43.11.3. 示例请求

$ curl 'http://localhost:9393/tasks/validation/taskC' -i -X GET

43.11.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"
  }
}

43.12. 任务执行

任务执行端点提供有关已注册到 Spring Cloud Data Flow 服务器的任务执行的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.12.1. 启动任务(遗留)

启动任务是通过请求创建一个新的任务执行来完成的。如果该任务注册为 Spring Boot 3 应用程序,此端点将失败。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
请求参数
参数 描述

namespring-doc.cadn.net.cn

要启动的任务定义的名称spring-doc.cadn.net.cn

propertiesspring-doc.cadn.net.cn

启动时要使用的应用程序和部署器属性。(可选)spring-doc.cadn.net.cn

argumentsspring-doc.cadn.net.cn

要传递给任务的命令行参数。(可选)spring-doc.cadn.net.cn

示例请求
$ 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

3

43.12.2. 启动任务

启动一个任务是通过请求创建一个新的任务执行来完成的。响应将包含一个执行 ID 和一个 schema 目标。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
POST /tasks/executions/launch 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
请求参数
参数 描述

namespring-doc.cadn.net.cn

要启动的任务定义的名称spring-doc.cadn.net.cn

propertiesspring-doc.cadn.net.cn

启动时要使用的应用程序和部署器属性。(可选)spring-doc.cadn.net.cn

argumentsspring-doc.cadn.net.cn

要传递给任务的命令行参数。(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/executions/launch' -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/hal+json
Content-Length: 169

{
  "executionId" : 3,
  "schemaTarget" : "boot2",
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/tasks/executions/3?schemaTarget=boot2"
    }
  }
}

43.12.3. 停止任务

通过提交现有任务执行的 ID 来停止一个任务。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
POST /tasks/executions/1?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393
路径参数

/tasks/executions/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有任务执行的 ID(必填)spring-doc.cadn.net.cn

请求参数
参数 描述

schemaTargetspring-doc.cadn.net.cn

任务执行详情中提供的 schemaTarget。(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/executions/1?schemaTarget=boot2' -i -X POST
响应结构
HTTP/1.1 200 OK

43.12.4. 列出所有任务执行

任务执行端点允许您列出所有任务执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/executions?page=1&size=2 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/executions?page=1&size=2' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2497

{
  "_embedded" : {
    "taskExecutionResourceList" : [ {
      "executionId" : 1,
      "exitCode" : null,
      "taskName" : "taskA",
      "startTime" : null,
      "endTime" : null,
      "exitMessage" : null,
      "arguments" : [ ],
      "jobExecutionIds" : [ ],
      "errorMessage" : null,
      "externalExecutionId" : "taskA-e4fc87e5-dbd7-450e-935e-69470d10afe9",
      "parentExecutionId" : null,
      "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
      "appProperties" : {
        "spring.datasource.driverClassName" : null,
        "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
        "format" : "yyyy MM dd",
        "spring.cloud.task.name" : "taskA",
        "spring.cloud.deployer.bootVersion" : "2",
        "management.metrics.tags.service" : "task-application",
        "spring.datasource.username" : null,
        "spring.datasource.url" : null,
        "spring.cloud.task.initialize-enabled" : "false",
        "spring.cloud.task.schemaTarget" : "boot2",
        "spring.batch.jdbc.table-prefix" : "BATCH_",
        "spring.cloud.task.tablePrefix" : "TASK_"
      },
      "deploymentProperties" : {
        "app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
        "app.timestamp.spring.cloud.deployer.bootVersion" : "2",
        "app.timestamp.spring.cloud.task.initialize-enabled" : "false",
        "app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
        "app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
      },
      "platformName" : "default",
      "taskExecutionStatus" : "UNKNOWN",
      "schemaTarget" : "boot2",
      "_links" : {
        "tasks/logs" : {
          "href" : "http://localhost:9393/tasks/logs/taskA-e4fc87e5-dbd7-450e-935e-69470d10afe9?platformName=default&schemaTarget=boot2"
        },
        "self" : {
          "href" : "http://localhost:9393/tasks/executions/1?schemaTarget=boot2"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:9393/tasks/executions?page=0&size=2"
    },
    "prev" : {
      "href" : "http://localhost:9393/tasks/executions?page=0&size=2"
    },
    "self" : {
      "href" : "http://localhost:9393/tasks/executions?page=1&size=2"
    },
    "last" : {
      "href" : "http://localhost:9393/tasks/executions?page=1&size=2"
    }
  },
  "page" : {
    "size" : 2,
    "totalElements" : 3,
    "totalPages" : 2,
    "number" : 1
  }
}

43.12.5. 列出具有指定任务名称的所有任务执行

任务执行端点允许您列出具有指定任务名称的任务执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/executions?name=taskB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

与任务执行关联的名称spring-doc.cadn.net.cn

示例请求
$ 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: 2222

{
  "_embedded" : {
    "taskExecutionResourceList" : [ {
      "executionId" : 2,
      "exitCode" : null,
      "taskName" : "taskB",
      "startTime" : null,
      "endTime" : null,
      "exitMessage" : null,
      "arguments" : [ ],
      "jobExecutionIds" : [ ],
      "errorMessage" : null,
      "externalExecutionId" : "taskB-cd70929e-1495-4f72-bc22-008f919e2b5a",
      "parentExecutionId" : null,
      "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
      "appProperties" : {
        "spring.datasource.driverClassName" : null,
        "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
        "format" : "yyyy MM dd",
        "spring.cloud.task.name" : "taskB",
        "spring.cloud.deployer.bootVersion" : "2",
        "management.metrics.tags.service" : "task-application",
        "spring.datasource.username" : null,
        "spring.datasource.url" : null,
        "spring.cloud.task.initialize-enabled" : "false",
        "spring.cloud.task.schemaTarget" : "boot2",
        "spring.batch.jdbc.table-prefix" : "BATCH_",
        "spring.cloud.task.tablePrefix" : "TASK_"
      },
      "deploymentProperties" : {
        "app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
        "app.timestamp.spring.cloud.deployer.bootVersion" : "2",
        "app.timestamp.spring.cloud.task.initialize-enabled" : "false",
        "app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
        "app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
      },
      "platformName" : "default",
      "taskExecutionStatus" : "UNKNOWN",
      "schemaTarget" : "boot2",
      "_links" : {
        "tasks/logs" : {
          "href" : "http://localhost:9393/tasks/logs/taskB-cd70929e-1495-4f72-bc22-008f919e2b5a?platformName=default&schemaTarget=boot2"
        },
        "self" : {
          "href" : "http://localhost:9393/tasks/executions/2?schemaTarget=boot2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/tasks/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

43.12.6. 任务执行详情

任务执行端点允许您获取有关任务执行的详细信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/executions/1?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393

/tasks/executions/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有任务执行的 ID(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/executions/1?schemaTarget=boot2' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1767

{
  "executionId" : 1,
  "exitCode" : null,
  "taskName" : "taskA",
  "startTime" : null,
  "endTime" : null,
  "exitMessage" : null,
  "arguments" : [ ],
  "jobExecutionIds" : [ ],
  "errorMessage" : null,
  "externalExecutionId" : "taskA-43aeab47-b46a-49ba-ba7b-f045dec094e4",
  "parentExecutionId" : null,
  "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
  "appProperties" : {
    "spring.datasource.driverClassName" : null,
    "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
    "format" : "yyyy MM dd",
    "spring.cloud.task.name" : "taskA",
    "spring.cloud.deployer.bootVersion" : "2",
    "management.metrics.tags.service" : "task-application",
    "spring.datasource.username" : null,
    "spring.datasource.url" : null,
    "spring.cloud.task.initialize-enabled" : "false",
    "spring.cloud.task.schemaTarget" : "boot2",
    "spring.batch.jdbc.table-prefix" : "BATCH_",
    "spring.cloud.task.tablePrefix" : "TASK_"
  },
  "deploymentProperties" : {
    "app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
    "app.timestamp.spring.cloud.deployer.bootVersion" : "2",
    "app.timestamp.spring.cloud.task.initialize-enabled" : "false",
    "app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
    "app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
  },
  "platformName" : "default",
  "taskExecutionStatus" : "UNKNOWN",
  "schemaTarget" : "boot2",
  "_links" : {
    "tasks/logs" : {
      "href" : "http://localhost:9393/tasks/logs/taskA-43aeab47-b46a-49ba-ba7b-f045dec094e4?platformName=default&schemaTarget=boot2"
    },
    "self" : {
      "href" : "http://localhost:9393/tasks/executions/1?schemaTarget=boot2"
    }
  }
}

43.12.7. 通过外部 ID 获取任务执行详情

任务执行端点允许您获取有关任务执行的详细信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/executions/external/taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8?platform=default HTTP/1.1
Host: localhost:9393

/tasks/executions/external/{externalExecutionId}spring-doc.cadn.net.cn

参数 描述

externalExecutionIdspring-doc.cadn.net.cn

现有任务执行的外部 ExecutionId(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/executions/external/taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8?platform=default' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1767

{
  "executionId" : 2,
  "exitCode" : null,
  "taskName" : "taskB",
  "startTime" : null,
  "endTime" : null,
  "exitMessage" : null,
  "arguments" : [ ],
  "jobExecutionIds" : [ ],
  "errorMessage" : null,
  "externalExecutionId" : "taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8",
  "parentExecutionId" : null,
  "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
  "appProperties" : {
    "spring.datasource.driverClassName" : null,
    "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
    "format" : "yyyy MM dd",
    "spring.cloud.task.name" : "taskB",
    "spring.cloud.deployer.bootVersion" : "2",
    "management.metrics.tags.service" : "task-application",
    "spring.datasource.username" : null,
    "spring.datasource.url" : null,
    "spring.cloud.task.initialize-enabled" : "false",
    "spring.cloud.task.schemaTarget" : "boot2",
    "spring.batch.jdbc.table-prefix" : "BATCH_",
    "spring.cloud.task.tablePrefix" : "TASK_"
  },
  "deploymentProperties" : {
    "app.timestamp.spring.cloud.task.tablePrefix" : "TASK_",
    "app.timestamp.spring.cloud.deployer.bootVersion" : "2",
    "app.timestamp.spring.cloud.task.initialize-enabled" : "false",
    "app.timestamp.spring.batch.jdbc.table-prefix" : "BATCH_",
    "app.timestamp.spring.cloud.task.schemaTarget" : "boot2"
  },
  "platformName" : "default",
  "taskExecutionStatus" : "UNKNOWN",
  "schemaTarget" : "boot2",
  "_links" : {
    "tasks/logs" : {
      "href" : "http://localhost:9393/tasks/logs/taskB-026bd08c-18b8-4255-ad77-c2fcc9d09bb8?platformName=default&schemaTarget=boot2"
    },
    "self" : {
      "href" : "http://localhost:9393/tasks/executions/2?schemaTarget=boot2"
    }
  }
}

43.12.8. 删除任务执行

任务执行端点允许您:spring-doc.cadn.net.cn

清理实现(第一种选项)是平台特定的。这两种操作可以同时触发,也可以分别触发。

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请参阅以下关于删除任务执行数据的部分。spring-doc.cadn.net.cn

请求结构
DELETE /tasks/executions/1,2?schemaTarget=boot2&action=CLEANUP,REMOVE_DATA HTTP/1.1
Host: localhost:9393

/tasks/executions/{ids}spring-doc.cadn.net.cn

参数 描述

idsspring-doc.cadn.net.cn

提供两个以逗号分隔的任务执行 ID 值。spring-doc.cadn.net.cn

您必须提供实际存在的任务执行 ID。否则,将返回 404(未找到)HTTP 状态码。 当提交多个任务执行 ID 时,只要其中任意一个任务执行 ID 无效,整个请求就会失败, 且不会执行任何操作。spring-doc.cadn.net.cn

请求参数

该端点支持一个名为 action 的可选请求参数。它是一个枚举类型,支持以下值:spring-doc.cadn.net.cn

参数 描述

actionspring-doc.cadn.net.cn

同时使用 CLEANUP 和 REMOVE_DATA 两种操作。spring-doc.cadn.net.cn

schemaTargetspring-doc.cadn.net.cn

任务的 Schema 目标。(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/executions/1,2?schemaTarget=boot2&action=CLEANUP,REMOVE_DATA' -i -X DELETE
响应结构
HTTP/1.1 200 OK

43.12.9. 删除任务执行数据

你不仅可以清理用于部署任务所使用的资源,还可以从底层持久化存储中删除与任务执行相关的数据。此外,如果某个任务执行关联了一个或多个批处理作业执行,这些作业执行也会一并被移除。spring-doc.cadn.net.cn

以下示例说明了如何使用多个任务执行ID和多个操作发起请求:spring-doc.cadn.net.cn

$ curl 'http://localhost:9393/tasks/executions/1,2?schemaTarget=boot2&action=CLEANUP,REMOVE_DATA' -i -X DELETE

/tasks/executions/{ids}spring-doc.cadn.net.cn

参数 描述

idsspring-doc.cadn.net.cn

提供两个以逗号分隔的任务执行 ID 值。spring-doc.cadn.net.cn

参数 描述

actionspring-doc.cadn.net.cn

同时使用 CLEANUP 和 REMOVE_DATA 两种操作。spring-doc.cadn.net.cn

schemaTargetspring-doc.cadn.net.cn

任务的 Schema 目标。(可选)spring-doc.cadn.net.cn

使用 REMOVE_DATA 操作参数从持久化存储中删除数据时,您必须提供代表父任务执行的任务执行 ID。如果您提供的是子任务执行(作为组合任务的一部分执行),系统将返回 400(错误请求)HTTP 状态码。
在删除大量任务执行记录时,某些数据库类型会限制 IN 子句中的条目数量(Spring Cloud Data Flow 使用该方法来删除任务执行的相关记录)。 Spring Cloud Data Flow 支持对 SQL Server(最多 2100 条)和 Oracle 数据库(最多 1000 条)的删除操作进行分块处理。 然而,Spring Cloud Data Flow 也允许用户自行设置分块大小。为此,请将 spring.cloud.dataflow.task.executionDeleteChunkSize 属性设置为合适的分块大小。 默认值为 0,表示 Spring Cloud Data Flow 不会对任务执行的删除操作进行分块处理(Oracle 和 SQL Server 数据库除外)。

43.12.10. 任务执行当前计数

任务执行当前端点允许您检索当前正在运行的执行数量。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/executions/current HTTP/1.1
Host: localhost:9393
请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ 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" : 50,
  "runningExecutionCount" : 2
} ]

43.13. 作业执行

作业执行(job executions)端点提供有关在 Spring Cloud Data Flow 服务器中注册的作业执行的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.13.1. 列出所有作业执行

作业执行端点允许您列出所有作业执行记录。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/executions?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/executions?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3658

{
  "_embedded" : {
    "jobExecutionResourceList" : [ {
      "executionId" : 2,
      "stepExecutionCount" : 0,
      "jobId" : 2,
      "taskExecutionId" : 2,
      "name" : "DOCJOB1",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:18",
      "duration" : "00:00:00",
      "jobExecution" : {
        "id" : 2,
        "version" : 1,
        "jobParameters" : {
          "parameters" : { }
        },
        "jobInstance" : {
          "id" : 2,
          "jobName" : "DOCJOB1",
          "version" : null
        },
        "stepExecutions" : [ ],
        "status" : "STOPPED",
        "startTime" : "2024-09-13T10:11:18.778+0000",
        "createTime" : "2024-09-13T10:11:18.777+0000",
        "endTime" : null,
        "lastUpdated" : "2024-09-13T10:11:18.778+0000",
        "exitStatus" : {
          "exitCode" : "UNKNOWN",
          "exitDescription" : ""
        },
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "jobConfigurationName" : null,
        "failureExceptions" : [ ],
        "allFailureExceptions" : [ ]
      },
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : true,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : true,
      "timeZone" : "UTC",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
        },
        "restart" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&restart=true"
        }
      }
    }, {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:18",
      "duration" : "00:00:00",
      "jobExecution" : {
        "id" : 1,
        "version" : 1,
        "jobParameters" : {
          "parameters" : { }
        },
        "jobInstance" : {
          "id" : 1,
          "jobName" : "DOCJOB",
          "version" : null
        },
        "stepExecutions" : [ ],
        "status" : "STARTED",
        "startTime" : "2024-09-13T10:11:18.773+0000",
        "createTime" : "2024-09-13T10:11:18.772+0000",
        "endTime" : null,
        "lastUpdated" : "2024-09-13T10:11:18.773+0000",
        "exitStatus" : {
          "exitCode" : "UNKNOWN",
          "exitDescription" : ""
        },
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "jobConfigurationName" : null,
        "failureExceptions" : [ ],
        "allFailureExceptions" : [ ]
      },
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        },
        "restart" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&restart=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.2. 列出所有作业执行(不包含步骤执行)

作业执行端点允许您列出所有作业执行,且不包含步骤执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/thinexecutions?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1937

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 2,
      "stepExecutionCount" : 0,
      "jobId" : 2,
      "taskExecutionId" : 2,
      "instanceId" : 2,
      "name" : "DOCJOB1",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:14",
      "startDateTime" : "2024-09-13T10:11:14.840+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : true,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STOPPED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
        }
      }
    }, {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:14",
      "startDateTime" : "2024-09-13T10:11:14.752+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STARTED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.3. 列出具有指定作业名称的所有作业执行

作业执行端点允许您列出所有作业执行记录。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/executions?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

与作业执行关联的名称spring-doc.cadn.net.cn

示例请求
$ 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: 1964

{
  "_embedded" : {
    "jobExecutionResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:20",
      "duration" : "00:00:00",
      "jobExecution" : {
        "id" : 1,
        "version" : 1,
        "jobParameters" : {
          "parameters" : { }
        },
        "jobInstance" : {
          "id" : 1,
          "jobName" : "DOCJOB",
          "version" : null
        },
        "stepExecutions" : [ ],
        "status" : "STARTED",
        "startTime" : "2024-09-13T10:11:20.627+0000",
        "createTime" : "2024-09-13T10:11:20.626+0000",
        "endTime" : null,
        "lastUpdated" : "2024-09-13T10:11:20.627+0000",
        "exitStatus" : {
          "exitCode" : "UNKNOWN",
          "exitDescription" : ""
        },
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "jobConfigurationName" : null,
        "failureExceptions" : [ ],
        "allFailureExceptions" : [ ]
      },
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        },
        "restart" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&restart=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.4. 列出指定作业名称的所有作业执行记录(不包含步骤执行记录)

作业执行端点允许您列出所有作业执行记录。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/thinexecutions?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

与作业执行关联的名称spring-doc.cadn.net.cn

示例请求
$ 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: 1108

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:23",
      "startDateTime" : "2024-09-13T10:11:23.869+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STARTED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.5. 列出指定日期范围内的所有作业执行(不包含步骤执行)

作业执行端点允许您列出所有作业执行记录。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/thinexecutions?page=0&size=10&fromDate=2000-09-24T17%3A00%3A45%2C000&toDate=2050-09-24T18%3A00%3A45%2C000 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

fromDatespring-doc.cadn.net.cn

从格式为 'yyyy-MM-dd’T’HH:mm:ss,SSS' 的起始日期过滤结果spring-doc.cadn.net.cn

toDatespring-doc.cadn.net.cn

将结果过滤至格式为 'yyyy-MM-dd’T’HH:mm:ss,SSS' 的 to 日期spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10&fromDate=2000-09-24T17%3A00%3A45%2C000&toDate=2050-09-24T18%3A00%3A45%2C000' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1937

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 2,
      "stepExecutionCount" : 0,
      "jobId" : 2,
      "taskExecutionId" : 2,
      "instanceId" : 2,
      "name" : "DOCJOB1",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:22",
      "startDateTime" : "2024-09-13T10:11:22.807+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : true,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STOPPED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
        }
      }
    }, {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:22",
      "startDateTime" : "2024-09-13T10:11:22.802+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STARTED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.6. 列出指定作业实例 ID 的所有作业执行记录(不包含步骤执行记录)

作业执行端点允许您列出所有作业执行记录。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/thinexecutions?page=0&size=10&jobInstanceId=1 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

jobInstanceIdspring-doc.cadn.net.cn

按作业实例 ID 筛选结果spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10&jobInstanceId=1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1108

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:21",
      "startDateTime" : "2024-09-13T10:11:21.794+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STARTED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.7. 列出指定任务执行 ID 的所有作业执行(不包含步骤执行)

作业执行端点允许您列出所有作业执行记录。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/thinexecutions?page=0&size=10&taskExecutionId=1 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

taskExecutionIdspring-doc.cadn.net.cn

按任务执行 ID 筛选结果spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/thinexecutions?page=0&size=10&taskExecutionId=1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1108

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2024-09-13",
      "startTime" : "10:11:24",
      "startDateTime" : "2024-09-13T10:11:24.914+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STARTED",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2"
        },
        "stop" : {
          "href" : "http://localhost:9393/jobs/executions/1?schemaTarget=boot2&stop=true"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

43.13.8. 作业执行详情

作业执行端点允许您获取有关作业执行的详细信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/executions/2?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393

/jobs/executions/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有作业执行的 ID(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/executions/2?schemaTarget=boot2' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1460

{
  "executionId" : 2,
  "stepExecutionCount" : 0,
  "jobId" : 2,
  "taskExecutionId" : 2,
  "name" : "DOCJOB1",
  "startDate" : "2024-09-13",
  "startTime" : "10:11:25",
  "duration" : "00:00:00",
  "jobExecution" : {
    "id" : 2,
    "version" : 1,
    "jobParameters" : {
      "parameters" : { }
    },
    "jobInstance" : {
      "id" : 2,
      "jobName" : "DOCJOB1",
      "version" : null
    },
    "stepExecutions" : [ ],
    "status" : "STOPPED",
    "startTime" : "2024-09-13T10:11:25.966+0000",
    "createTime" : "2024-09-13T10:11:25.966+0000",
    "endTime" : null,
    "lastUpdated" : "2024-09-13T10:11:25.966+0000",
    "exitStatus" : {
      "exitCode" : "UNKNOWN",
      "exitDescription" : ""
    },
    "executionContext" : {
      "dirty" : false,
      "empty" : true,
      "values" : [ ]
    },
    "jobConfigurationName" : null,
    "failureExceptions" : [ ],
    "allFailureExceptions" : [ ]
  },
  "jobParameters" : { },
  "jobParametersString" : "",
  "restartable" : true,
  "abandonable" : true,
  "stoppable" : false,
  "defined" : true,
  "timeZone" : "UTC",
  "schemaTarget" : "boot2",
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2"
    },
    "stop" : {
      "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&stop=true"
    },
    "restart" : {
      "href" : "http://localhost:9393/jobs/executions/2?schemaTarget=boot2&restart=true"
    }
  }
}

43.13.9. 停止任务执行

作业执行端点允许您停止一次作业执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
PUT /jobs/executions/1?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded

stop=true

/jobs/executions/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有作业执行的 ID(必填)spring-doc.cadn.net.cn

请求参数
参数 描述

schemaTargetspring-doc.cadn.net.cn

作业执行的模式目标spring-doc.cadn.net.cn

stopspring-doc.cadn.net.cn

如果设置为 true,则发送信号以停止该作业spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/executions/1?schemaTarget=boot2' -i -X PUT \
    -d 'stop=true'
响应结构
HTTP/1.1 200 OK

43.13.10. 重新启动作业执行

作业执行端点允许您重新启动一次作业执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
PUT /jobs/executions/2?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded

restart=true

/jobs/executions/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有作业执行的 ID(必填)spring-doc.cadn.net.cn

请求参数
参数 描述

schemaTargetspring-doc.cadn.net.cn

作业执行的模式目标spring-doc.cadn.net.cn

restartspring-doc.cadn.net.cn

如果设置为 true,则发送信号以重新启动作业spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/executions/2?schemaTarget=boot2' -i -X PUT \
    -d 'restart=true'
响应结构
HTTP/1.1 200 OK

43.14. 作业实例

作业实例端点提供有关已注册到 Spring Cloud Data Flow 服务器的作业实例的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.14.1. 列出所有作业实例

作业实例端点允许您列出所有作业实例。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/instances?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

namespring-doc.cadn.net.cn

与作业实例关联的名称spring-doc.cadn.net.cn

示例请求
$ 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: 1807

{
  "_embedded" : {
    "jobInstanceResourceList" : [ {
      "jobName" : "DOCJOB",
      "jobInstanceId" : 1,
      "jobExecutions" : [ {
        "executionId" : 1,
        "stepExecutionCount" : 0,
        "jobId" : 1,
        "taskExecutionId" : 1,
        "name" : "DOCJOB",
        "startDate" : "",
        "startTime" : "",
        "duration" : "",
        "jobExecution" : {
          "id" : 1,
          "version" : null,
          "jobParameters" : {
            "parameters" : { }
          },
          "jobInstance" : {
            "id" : 1,
            "jobName" : "DOCJOB",
            "version" : null
          },
          "stepExecutions" : [ ],
          "status" : "STARTING",
          "startTime" : null,
          "createTime" : "2024-09-13T10:11:41.775+0000",
          "endTime" : null,
          "lastUpdated" : null,
          "exitStatus" : {
            "exitCode" : "UNKNOWN",
            "exitDescription" : ""
          },
          "executionContext" : {
            "dirty" : false,
            "empty" : true,
            "values" : [ ]
          },
          "jobConfigurationName" : null,
          "failureExceptions" : [ ],
          "allFailureExceptions" : [ ]
        },
        "jobParameters" : { },
        "jobParametersString" : "",
        "restartable" : false,
        "abandonable" : false,
        "stoppable" : true,
        "defined" : true,
        "timeZone" : "UTC",
        "schemaTarget" : "boot2"
      } ],
      "_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
  }
}

43.14.2. 作业实例详情

作业实例端点允许您列出所有作业实例。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/instances/1?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393

/jobs/instances/{id}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有作业实例的 ID(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/instances/1?schemaTarget=boot2' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1312

{
  "jobName" : "DOCJOB",
  "jobInstanceId" : 1,
  "jobExecutions" : [ {
    "executionId" : 1,
    "stepExecutionCount" : 0,
    "jobId" : 1,
    "taskExecutionId" : 1,
    "name" : "DOCJOB",
    "startDate" : "",
    "startTime" : "",
    "duration" : "",
    "jobExecution" : {
      "id" : 1,
      "version" : null,
      "jobParameters" : {
        "parameters" : { }
      },
      "jobInstance" : {
        "id" : 1,
        "jobName" : "DOCJOB",
        "version" : null
      },
      "stepExecutions" : [ ],
      "status" : "STARTING",
      "startTime" : null,
      "createTime" : "2024-09-13T10:11:42.763+0000",
      "endTime" : null,
      "lastUpdated" : null,
      "exitStatus" : {
        "exitCode" : "UNKNOWN",
        "exitDescription" : ""
      },
      "executionContext" : {
        "dirty" : false,
        "empty" : true,
        "values" : [ ]
      },
      "jobConfigurationName" : null,
      "failureExceptions" : [ ],
      "allFailureExceptions" : [ ]
    },
    "jobParameters" : { },
    "jobParametersString" : "",
    "restartable" : false,
    "abandonable" : false,
    "stoppable" : true,
    "defined" : true,
    "timeZone" : "UTC",
    "schemaTarget" : "boot2"
  } ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/instances/1"
    }
  }
}

43.15. 作业步骤执行

作业步骤执行端点提供有关在 Spring Cloud Data Flow 服务器中注册的作业步骤执行的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.15.1. 列出作业执行的所有步骤执行

作业步骤执行端点允许您列出所有作业步骤执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/executions/1/steps?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

pagespring-doc.cadn.net.cn

从零开始的页码(可选)spring-doc.cadn.net.cn

sizespring-doc.cadn.net.cn

请求的页面大小(可选)spring-doc.cadn.net.cn

示例请求
$ 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: 1805

{
  "_embedded" : {
    "stepExecutionResourceList" : [ {
      "jobExecutionId" : 1,
      "stepExecution" : {
        "stepName" : "DOCJOB_STEP",
        "id" : 1,
        "version" : 0,
        "status" : "STARTING",
        "readCount" : 0,
        "writeCount" : 0,
        "commitCount" : 0,
        "rollbackCount" : 0,
        "readSkipCount" : 0,
        "processSkipCount" : 0,
        "writeSkipCount" : 0,
        "startTime" : "2024-09-13T10:11:35.706+0000",
        "endTime" : null,
        "lastUpdated" : "2024-09-13T10:11:35.707+0000",
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "exitStatus" : {
          "exitCode" : "EXECUTING",
          "exitDescription" : ""
        },
        "terminateOnly" : false,
        "filterCount" : 0,
        "jobParameters" : {
          "parameters" : { }
        },
        "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",
        "failureExceptions" : [ ]
      },
      "stepType" : "",
      "schemaTarget" : "boot2",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1/steps/1?schemaTarget=boot2"
        },
        "progress" : {
          "href" : "http://localhost:9393/jobs/executions/1/steps/1/progress?schemaTarget=boot2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

43.15.2. 作业步骤执行详情

作业步骤执行端点允许您获取有关作业步骤执行的详细信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/executions/1/steps/1?schemaTarget=boot2 HTTP/1.1
Host: localhost:9393

/jobs/executions/{id}/steps/{stepid}spring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有作业执行的 ID(必填)spring-doc.cadn.net.cn

stepidspring-doc.cadn.net.cn

特定作业执行的现有步骤执行的 ID(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/jobs/executions/1/steps/1?schemaTarget=boot2' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1339

{
  "jobExecutionId" : 1,
  "stepExecution" : {
    "stepName" : "DOCJOB_STEP",
    "id" : 1,
    "version" : 0,
    "status" : "STARTING",
    "readCount" : 0,
    "writeCount" : 0,
    "commitCount" : 0,
    "rollbackCount" : 0,
    "readSkipCount" : 0,
    "processSkipCount" : 0,
    "writeSkipCount" : 0,
    "startTime" : "2024-09-13T10:11:34.601+0000",
    "endTime" : null,
    "lastUpdated" : "2024-09-13T10:11:34.601+0000",
    "executionContext" : {
      "dirty" : false,
      "empty" : true,
      "values" : [ ]
    },
    "exitStatus" : {
      "exitCode" : "EXECUTING",
      "exitDescription" : ""
    },
    "terminateOnly" : false,
    "filterCount" : 0,
    "jobParameters" : {
      "parameters" : { }
    },
    "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",
    "failureExceptions" : [ ]
  },
  "stepType" : "",
  "schemaTarget" : "boot2",
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps/1?schemaTarget=boot2"
    },
    "progress" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps/1/progress?schemaTarget=boot2"
    }
  }
}

43.15.3. 作业步骤执行进度

作业步骤执行端点允许您获取有关作业步骤执行进度的详细信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /jobs/executions/1/steps/1/progress HTTP/1.1
Host: localhost:9393

/jobs/executions/{id}/steps/{stepid}/progressspring-doc.cadn.net.cn

参数 描述

idspring-doc.cadn.net.cn

现有作业执行的 ID(必填)spring-doc.cadn.net.cn

stepidspring-doc.cadn.net.cn

特定作业执行的现有步骤执行的 ID(必填)spring-doc.cadn.net.cn

请求参数

该端点没有请求参数。spring-doc.cadn.net.cn

示例请求
$ 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: 2794

{
  "stepExecution" : {
    "stepName" : "DOCJOB_STEP",
    "id" : 1,
    "version" : 0,
    "status" : "STARTING",
    "readCount" : 0,
    "writeCount" : 0,
    "commitCount" : 0,
    "rollbackCount" : 0,
    "readSkipCount" : 0,
    "processSkipCount" : 0,
    "writeSkipCount" : 0,
    "startTime" : "2024-09-13T10:11:36.711+0000",
    "endTime" : null,
    "lastUpdated" : "2024-09-13T10:11:36.711+0000",
    "executionContext" : {
      "dirty" : false,
      "empty" : true,
      "values" : [ ]
    },
    "exitStatus" : {
      "exitCode" : "EXECUTING",
      "exitDescription" : ""
    },
    "terminateOnly" : false,
    "filterCount" : 0,
    "jobParameters" : {
      "parameters" : { }
    },
    "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",
    "failureExceptions" : [ ]
  },
  "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" : 18.0,
  "_links" : {
    "progress" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps/1/progress?schemaTarget=boot2"
    },
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps/1"
    }
  }
}
步骤执行历史(stepExecutionHistory)中的以下字段已被弃用,并将在未来的版本中移除:rollbackCount、readCount、writeCount、filterCount、readSkipCount、writeSkipCount、processSkipCount、durationPerRead。

43.16. 应用程序的运行时信息

您可以获取系统所知的正在运行的应用程序的信息,既可以全局获取,也可以单独获取。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.16.1. 运行时列出所有应用程序

要获取所有应用的所有实例的信息,请使用 /runtime/apps 方法查询 GET 端点。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
  }
}

43.16.2. 查询单个应用的所有实例

要获取某个特定应用所有实例的信息,请使用 /runtime/apps/<appId>/instances 方法查询 GET 端点。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
  }
}

43.16.3. 查询单个应用的单个实例

要获取某个特定应用程序实例的信息,请使用 /runtime/apps/<appId>/instances/<instanceId> 方法查询 GET 端点。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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
  }
}

43.17. 流式日志

您可以获取整个流或流中特定应用程序的应用程序日志。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.17.1. 通过流名称获取应用程序日志

使用 HTTP GET 方法访问 /streams/logs/<streamName> REST 端点,以获取指定流名称下所有应用程序的日志。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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"
  }
}

43.17.2. 从流中获取特定应用程序的日志

要从流中检索特定应用程序的日志,请使用 /streams/logs/<streamName>/<appName> HTTP 方法查询 GET 端点。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
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"
  }
}

43.18. 任务日志

您可以获取特定任务执行的日志。spring-doc.cadn.net.cn

以下主题提供了更多详细信息:spring-doc.cadn.net.cn

43.18.1. 获取任务执行日志

要获取任务执行的日志,请使用 HTTP /tasks/logs/<ExternalTaskExecutionId> 方法查询 GET 端点。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/logs/taskA-69b2b37c-9d98-4f49-a43d-708c4cd2c02f?platformName=default HTTP/1.1
Host: localhost:9393
请求参数
参数 描述

platformNamespring-doc.cadn.net.cn

任务启动的平台名称。spring-doc.cadn.net.cn

示例请求
$ curl 'http://localhost:9393/tasks/logs/taskA-69b2b37c-9d98-4f49-a43d-708c4cd2c02f?platformName=default' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 277

"stdout:\n2024-09-13 10:11:29.011  INFO 9073 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@ba8a1dc: startup date [Fri Sep 13 10:11:29 UTC 2024]; root of context hierarchy\n"

44. OpenAPI

Springdoc 库以选择性启用的方式与服务器集成。一旦启用,它将提供 OpenAPI 3 文档和 Swagger UI。spring-doc.cadn.net.cn

要在启动服务器之前启用,请在您的 application.yml 中设置以下属性:spring-doc.cadn.net.cn

springdoc:
  api-docs:
    enabled: true
  swagger-ui:
    enabled: true

也可以在命令行上设置这些属性:spring-doc.cadn.net.cn

-Dspringdoc.api-docs.enabled=true -Dspringdoc.swagger-ui.enabled=true

或作为环境变量:spring-doc.cadn.net.cn

SPRINGDOC_APIDOCS_ENABLED=true
SPRINGDOC_SWAGGERUI_ENABLED=true

启用后,OpenAPI3 文档和 Swagger UI 分别可通过 /v3/api-docs/swagger-ui/index.html 这两个 URI 访问(例如:localhost:9393/v3/api-docs)。spring-doc.cadn.net.cn

Swagger UI 初始时将为空白。在“Explore”(探索)栏中输入“/v3/api-docs/”,然后点击“Explore”(探索)。
如果你在 Swagger UI 中尝试这些 API 时遇到与 "No property string found for type" 相关的错误,请尝试将 pageable 参数替换为 { },或移除其 "sort" 属性。

有大量可用的 OpenAPISwagger UI 属性可用于配置该功能。spring-doc.cadn.net.cn