REST API 指南

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

41. 概述

Spring Cloud Data Flow 提供了一个 REST API,允许您访问服务器的所有方面。 事实上,Spring Cloud Data Flow shell 是该 API 的一流使用者。spring-doc.cadn.net.cn

如果您计划将 REST API 与 Java 一起使用,则应考虑使用 提供的 Java 客户端 (DataflowTemplate),该 API 在内部使用 REST API。

41.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":14}

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

SCDF 版本 API 版本

2.10.x 版本spring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.9.x 版本spring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.8.x 版本spring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

2.7.x 版本spring-doc.cadn.net.cn

14spring-doc.cadn.net.cn

41.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,例如 Tasks。spring-doc.cadn.net.cn

DELETEspring-doc.cadn.net.cn

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

41.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

41.4. 标头

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

名字 描述

Content-Typespring-doc.cadn.net.cn

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

41.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

41.6. 超媒体

Spring Cloud Data Flow 使用超媒体,并且资源包含指向其他资源的链接 在他们的回答中。 响应采用 Hypertext Application from resource-to-resource Language (HAL) 格式。 链接可以在_links钥匙。 API 的用户不应自行创建 URI。 相反,他们应该使用上述链接进行导航。spring-doc.cadn.net.cn

42. 资源

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

42.1. 索引

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

42.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.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

链接流/定义/定义已模板化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

链接 runtime/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

链接运行时/流已模板化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

链接到流/部署spring-doc.cadn.net.cn

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

Stringspring-doc.cadn.net.cn

链接到流/部署spring-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

链接流/部署/部署已模板化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

链接流/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

链接流/部署/历史记录已模板化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

链接流/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

链接流/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

链接流/验证已模板化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

链接任务/定义/定义已模板化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/name.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

指向 tasks/executions/name 的链接spring-doc.cadn.net.cn

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

Booleanspring-doc.cadn.net.cn

链接 tasks/executions/name 已模板化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

链接到 tasks/executions/executionspring-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/info/executions.hrefspring-doc.cadn.net.cn

Stringspring-doc.cadn.net.cn

链接到 tasks/info/executionsspring-doc.cadn.net.cn

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

Booleanspring-doc.cadn.net.cn

链接任务/信息已模板化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/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

链接到 tasks/schedules/instancesspring-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

链接作业/执行/状态已模板化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

链接作业/执行/执行已模板化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/name 的链接spring-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

链接完成数/流已模板化spring-doc.cadn.net.cn

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

Stringspring-doc.cadn.net.cn

链接到完成/任务spring-doc.cadn.net.cn

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

Booleanspring-doc.cadn.net.cn

链接完成数/任务已模板化spring-doc.cadn.net.cn

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

{
  "_links" : {
    "dashboard" : {
      "href" : "http://localhost:9393/dashboard"
    },
    "audit-records" : {
      "href" : "http://localhost:9393/audit-records"
    },
    "streams/definitions" : {
      "href" : "http://localhost:9393/streams/definitions"
    },
    "streams/definitions/definition" : {
      "href" : "http://localhost:9393/streams/definitions/{name}",
      "templated" : true
    },
    "streams/validation" : {
      "href" : "http://localhost:9393/streams/validation/{name}",
      "templated" : true
    },
    "runtime/streams" : {
      "href" : "http://localhost:9393/runtime/streams{?names}",
      "templated" : true
    },
    "runtime/streams/{streamNames}" : {
      "href" : "http://localhost:9393/runtime/streams/{streamNames}",
      "templated" : true
    },
    "runtime/apps" : {
      "href" : "http://localhost:9393/runtime/apps"
    },
    "runtime/apps/{appId}" : {
      "href" : "http://localhost:9393/runtime/apps/{appId}",
      "templated" : true
    },
    "runtime/apps/{appId}/instances" : {
      "href" : "http://localhost:9393/runtime/apps/{appId}/instances",
      "templated" : true
    },
    "runtime/apps/{appId}/instances/{instanceId}" : {
      "href" : "http://localhost:9393/runtime/apps/{appId}/instances/{instanceId}",
      "templated" : true
    },
    "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/name" : {
      "href" : "http://localhost:9393/tasks/executions{?name}",
      "templated" : true
    },
    "tasks/executions/current" : {
      "href" : "http://localhost:9393/tasks/executions/current"
    },
    "tasks/executions/execution" : {
      "href" : "http://localhost:9393/tasks/executions/{id}",
      "templated" : true
    },
    "tasks/validation" : {
      "href" : "http://localhost:9393/tasks/validation/{name}",
      "templated" : true
    },
    "tasks/info/executions" : {
      "href" : "http://localhost:9393/tasks/info/executions{?completed,name}",
      "templated" : true
    },
    "tasks/logs" : {
      "href" : "http://localhost:9393/tasks/logs/{taskExternalExecutionId}{?platformName}",
      "templated" : true
    },
    "tasks/schedules" : {
      "href" : "http://localhost:9393/tasks/schedules"
    },
    "tasks/schedules/instances" : {
      "href" : "http://localhost:9393/tasks/schedules/instances/{taskDefinitionName}",
      "templated" : true
    },
    "jobs/executions" : {
      "href" : "http://localhost:9393/jobs/executions"
    },
    "jobs/executions/name" : {
      "href" : "http://localhost:9393/jobs/executions{?name}",
      "templated" : true
    },
    "jobs/executions/status" : {
      "href" : "http://localhost:9393/jobs/executions{?status}",
      "templated" : true
    },
    "jobs/executions/execution" : {
      "href" : "http://localhost:9393/jobs/executions/{id}",
      "templated" : true
    },
    "jobs/executions/execution/steps" : {
      "href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps",
      "templated" : true
    },
    "jobs/executions/execution/steps/step" : {
      "href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps/{stepId}",
      "templated" : true
    },
    "jobs/executions/execution/steps/step/progress" : {
      "href" : "http://localhost:9393/jobs/executions/{jobExecutionId}/steps/{stepId}/progress",
      "templated" : true
    },
    "jobs/instances/name" : {
      "href" : "http://localhost:9393/jobs/instances{?name}",
      "templated" : true
    },
    "jobs/instances/instance" : {
      "href" : "http://localhost:9393/jobs/instances/{id}",
      "templated" : true
    },
    "tools/parseTaskTextToGraph" : {
      "href" : "http://localhost:9393/tools"
    },
    "tools/convertTaskGraphToText" : {
      "href" : "http://localhost:9393/tools"
    },
    "jobs/thinexecutions" : {
      "href" : "http://localhost:9393/jobs/thinexecutions"
    },
    "jobs/thinexecutions/name" : {
      "href" : "http://localhost:9393/jobs/thinexecutions{?name}",
      "templated" : true
    },
    "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

访问仪表板 UIspring-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

为特定作业名称提供作业实例资源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 接收器上执行 POST作spring-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/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

返回给定 Task name 的所有任务执行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

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

提供 Stream 部署作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

返回 release 版本的清单信息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

42.2. 服务器元信息

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

42.2.1. 检索有关服务器的信息

一个GETrequest 返回 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: 2696

{
  "featureInfo" : {
    "analyticsEnabled" : true,
    "streamsEnabled" : true,
    "tasksEnabled" : true,
    "schedulesEnabled" : true,
    "monitoringDashboardType" : "NONE"
  },
  "versionInfo" : {
    "implementation" : {
      "name" : "${info.app.name}",
      "version" : "${info.app.version}"
    },
    "core" : {
      "name" : "Spring Cloud Data Flow Core",
      "version" : "2.10.4-SNAPSHOT"
    },
    "dashboard" : {
      "name" : "Spring Cloud Dataflow UI",
      "version" : "3.3.4-SNAPSHOT"
    },
    "shell" : {
      "name" : "Spring Cloud Data Flow Shell",
      "version" : "2.10.4-SNAPSHOT",
      "url" : "https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-dataflow-shell/2.10.4-SNAPSHOT/spring-cloud-dataflow-shell-2.10.4-SNAPSHOT.jar"
    }
  },
  "securityInfo" : {
    "authenticationEnabled" : false,
    "authenticated" : false,
    "username" : null,
    "roles" : [ ]
  },
  "runtimeEnvironment" : {
    "appDeployer" : {
      "deployerImplementationVersion" : "Test Version",
      "deployerName" : "Test Server",
      "deployerSpiVersion" : "2.9.4-SNAPSHOT",
      "javaVersion" : "1.8.0_372",
      "platformApiVersion" : "",
      "platformClientVersion" : "",
      "platformHostVersion" : "",
      "platformSpecificInfo" : {
        "default" : "local"
      },
      "platformType" : "Skipper Managed",
      "springBootVersion" : "2.7.13",
      "springVersion" : "5.3.28"
    },
    "taskLaunchers" : [ {
      "deployerImplementationVersion" : "2.8.4-SNAPSHOT",
      "deployerName" : "LocalTaskLauncher",
      "deployerSpiVersion" : "2.8.4-SNAPSHOT",
      "javaVersion" : "1.8.0_372",
      "platformApiVersion" : "Linux 5.15.0-1041-azure",
      "platformClientVersion" : "5.15.0-1041-azure",
      "platformHostVersion" : "5.15.0-1041-azure",
      "platformSpecificInfo" : { },
      "platformType" : "Local",
      "springBootVersion" : "2.7.13",
      "springVersion" : "5.3.28"
    }, {
      "deployerImplementationVersion" : "2.8.4-SNAPSHOT",
      "deployerName" : "LocalTaskLauncher",
      "deployerSpiVersion" : "2.8.4-SNAPSHOT",
      "javaVersion" : "1.8.0_372",
      "platformApiVersion" : "Linux 5.15.0-1041-azure",
      "platformClientVersion" : "5.15.0-1041-azure",
      "platformHostVersion" : "5.15.0-1041-azure",
      "platformSpecificInfo" : { },
      "platformType" : "Local",
      "springBootVersion" : "2.7.13",
      "springVersion" : "5.3.28"
    } ]
  },
  "monitoringDashboardInfo" : {
    "url" : "",
    "refreshInterval" : 15,
    "dashboardType" : "NONE",
    "source" : "default-scdf-source"
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/about"
    }
  }
}

42.3. 注册应用程序

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

42.3.1. 列出应用程序

一个GETrequest 列出了 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: 1097

{
  "_embedded" : {
    "appRegistrationResourceList" : [ {
      "name" : "http",
      "type" : "source",
      "uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE",
      "version" : "1.2.0.RELEASE",
      "defaultVersion" : true,
      "versions" : [ "1.2.0.RELEASE" ],
      "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,
      "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
  }
}

42.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: 2100

{
  "name" : "http",
  "type" : "source",
  "uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.2.0.RELEASE",
  "version" : "1.2.0.RELEASE",
  "defaultVersion" : true,
  "versions" : null,
  "label" : null,
  "options" : [ {
    "id" : "http.path-pattern",
    "name" : "path-pattern",
    "type" : "java.lang.String",
    "description" : "An Ant-Style pattern to determine which http requests will be captured.",
    "shortDescription" : "An Ant-Style pattern to determine which http requests will be captured.",
    "defaultValue" : "/",
    "hints" : {
      "keyHints" : [ ],
      "keyProviders" : [ ],
      "valueHints" : [ ],
      "valueProviders" : [ ]
    },
    "deprecation" : null,
    "deprecated" : false
  }, {
    "id" : "http.mapped-request-headers",
    "name" : "mapped-request-headers",
    "type" : "java.lang.String[]",
    "description" : "Headers that will be mapped.",
    "shortDescription" : "Headers that will be mapped.",
    "defaultValue" : null,
    "hints" : {
      "keyHints" : [ ],
      "keyProviders" : [ ],
      "valueHints" : [ ],
      "valueProviders" : [ ]
    },
    "deprecation" : null,
    "deprecated" : false
  }, {
    "id" : "http.secured",
    "name" : "secured",
    "type" : "java.lang.Boolean",
    "description" : "Secure or not HTTP source path.",
    "shortDescription" : "Secure or not HTTP source path.",
    "defaultValue" : false,
    "hints" : {
      "keyHints" : [ ],
      "keyProviders" : [ ],
      "valueHints" : [ ],
      "valueProviders" : [ ]
    },
    "deprecation" : null,
    "deprecated" : false
  }, {
    "id" : "server.port",
    "name" : "port",
    "type" : "java.lang.Integer",
    "description" : "Server HTTP port.",
    "shortDescription" : "Server HTTP port.",
    "defaultValue" : null,
    "hints" : {
      "keyHints" : [ ],
      "keyProviders" : [ ],
      "valueHints" : [ ],
      "valueProviders" : [ ]
    },
    "deprecation" : null,
    "deprecated" : false
  } ],
  "shortDescription" : null,
  "inboundPortNames" : [ ],
  "outboundPortNames" : [ ],
  "optionGroups" : { }
}

42.3.3. 注册新应用程序

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

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

uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE
请求参数
参数 描述

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

路径参数

/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' -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

42.3.4. 使用

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

请求结构
POST /apps/source/http/1.1.0.RELEASE HTTP/1.1
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded

uri=maven%3A%2F%2Forg.springframework.cloud.stream.app%3Ahttp-source-rabbit%3A1.1.0.RELEASE
请求参数
参数 描述

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

路径参数

/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' -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

42.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: 658

{
  "_embedded" : {
    "appRegistrationResourceList" : [ {
      "name" : "http",
      "type" : "source",
      "uri" : "maven://org.springframework.cloud.stream.app:http-source-rabbit:1.1.0.RELEASE",
      "version" : "1.1.0.RELEASE",
      "defaultVersion" : true,
      "versions" : null,
      "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
  }
}

42.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

42.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

42.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

42.4. 审计记录

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

42.4.1. 列出所有审计记录

的 audit records 端点允许您检索审计跟踪信息。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

日期筛选器 (ex.: 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" : "2023-07-12T03:28:10.285Z",
      "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
  }
}

42.4.2. 检索审计记录详细信息

的 audit record 端点允许您获取单个审计记录。以下主题提供了更多详细信息: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" : "2023-07-12T03:28:10.285Z",
  "auditAction" : "CREATE",
  "auditOperation" : "STREAM",
  "platformName" : null,
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/audit-records/5"
    }
  }
}

42.4.3. 列出所有审计作类型

Audit record 终端节点允许您获取作类型。以下主题提供了更多详细信息: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"
} ]

42.4.4. 列出所有审计作类型

Audit record 终端节点允许您获取作类型。以下主题提供了更多详细信息: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"
} ]

42.5. 流定义

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

42.5.1. 创建新的 Stream 定义

创建流定义是通过创建对流定义终端节点的 POST 请求来实现的。 对ticktockstream 可能类似于以下内容:spring-doc.cadn.net.cn

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

流定义还可以包含其他参数。 例如,在 “Request Structure” 下显示的示例中,我们还提供了日期时间格式。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 DSLspring-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"
    }
  }
}

42.5.2. 列出所有 Stream 定义

的 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: 1160

{
  "_embedded" : {
    "streamDefinitionResourceList" : [ {
      "name" : "mysamplestream",
      "dslText" : "time | log",
      "originalDslText" : "time | log",
      "status" : "undeployed",
      "description" : "",
      "statusDescription" : "The app or group is known to the system, but is not currently deployed",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/streams/definitions/mysamplestream"
        }
      }
    }, {
      "name" : "timelog",
      "dslText" : "time --format='YYYY MM DD' | log",
      "originalDslText" : "time --format='YYYY MM DD' | log",
      "status" : "undeployed",
      "description" : "Demo stream for testing",
      "statusDescription" : "The app or group is known to the system, but is not currently deployed",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/streams/definitions/timelog"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/streams/definitions?page=0&size=10&sort=name,asc"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

的 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

我们是否应该递归地查找相关流定义 (可选)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: 769

{
  "_embedded" : {
    "streamDefinitionResourceList" : [ {
      "name" : "timelog",
      "dslText" : "time --format='YYYY MM DD' | log",
      "originalDslText" : "time --format='YYYY MM DD' | log",
      "status" : "undeployed",
      "description" : "Demo stream for testing",
      "statusDescription" : "The app or group is known to the system, but is not currently deployed",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/streams/definitions/timelog"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/streams/definitions/timelog/related?page=0&size=10&sort=name,asc"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.5.4. 检索 Stream Definition Detail

流定义终端节点允许您获取单个流定义。 以下主题提供了更多详细信息: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: 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"
    }
  }
}

42.5.5. 删除单个 Stream 定义

的 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

42.5.6. 删除所有 Stream 定义

的 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

42.6. 流验证

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

42.6.1. 请求结构

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

42.6.2. 路径参数

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

参数 描述

namespring-doc.cadn.net.cn

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

42.6.3. 示例请求

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

42.6.4. 响应结构

HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 197

{
  "appName" : "timelog",
  "dsl" : "time --format='YYYY MM DD' | log",
  "description" : "Demo stream for testing",
  "appStatuses" : {
    "source:time" : "valid",
    "sink:log" : "valid"
  }
}

42.7. 流式部署

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

42.7.1. 部署 Stream 定义

流定义终端节点允许您部署单个流定义。 (可选)您可以将应用程序参数作为请求正文中的属性传递。 以下主题提供了更多详细信息: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/{时间日志}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

42.7.2. 取消部署流定义

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

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

/streams/deployments/{时间日志}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

42.7.3. 取消部署所有 Stream Definitions

流定义终端节点允许您取消部署所有单个流定义。 以下主题提供了更多详细信息: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

42.7.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

42.7.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}/{版本}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

42.7.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

42.7.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
} ]

42.7.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" : [ ]
} ]

42.7.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

在 Stream 应用程序名称中进行扩展spring-doc.cadn.net.cn

countspring-doc.cadn.net.cn

所选 Stream 应用程序的实例数(必需)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

42.8. 任务定义

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

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

42.8.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
  }
}

42.8.3. 检索任务定义详细信息

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

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

/tasks/definitions/{我的任务}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"
    }
  }
}

42.8.4. 删除任务定义

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

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

/tasks/definitions/{我的任务}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

42.9. 任务调度程序

任务计划程序端点提供有关向计划程序实施注册的任务计划的信息。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

42.9.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

42.9.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
  }
}

42.9.3. 列出过滤的 schedules

任务计划端点允许您获取具有指定任务定义名称的所有任务计划。 以下主题提供了更多详细信息: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
  }
}

42.9.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

42.10. 任务验证

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

42.10.1. 请求结构

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

42.10.2. 路径参数

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

参数 描述

namespring-doc.cadn.net.cn

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

42.10.3. 示例请求

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

42.10.4. 响应结构

HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 144

{
  "appName" : "taskC",
  "dsl" : "timestamp --format='yyyy MM dd'",
  "description" : "",
  "appStatuses" : {
    "task:taskC" : "valid"
  }
}

42.11. 任务执行

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

42.11.1. 启动任务

通过请求创建新任务执行来完成启动任务。 以下主题提供了更多详细信息: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

启动时使用的 Application 和 Deployer 属性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

1

42.11.2. 停止任务

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

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

platform=default
路径参数

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

参数 描述

idspring-doc.cadn.net.cn

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

请求参数
参数 描述

platformspring-doc.cadn.net.cn

与任务执行关联的平台(可选)spring-doc.cadn.net.cn

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

42.11.3. 列出所有任务执行

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

请求结构
GET /tasks/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/tasks/executions?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 3289

{
  "_embedded" : {
    "taskExecutionResourceList" : [ {
      "executionId" : 2,
      "exitCode" : null,
      "taskName" : "taskB",
      "startTime" : null,
      "endTime" : null,
      "exitMessage" : null,
      "arguments" : [ ],
      "jobExecutionIds" : [ ],
      "errorMessage" : null,
      "externalExecutionId" : "taskB-a36f5d64-a46f-4508-a8e0-0d95876183aa",
      "parentExecutionId" : null,
      "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
      "appProperties" : {
        "management.metrics.tags.service" : "task-application",
        "timestamp.format" : "yyyy MM dd",
        "spring.datasource.username" : null,
        "spring.datasource.url" : null,
        "spring.datasource.driverClassName" : null,
        "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
        "spring.cloud.task.name" : "taskB"
      },
      "deploymentProperties" : {
        "app.my-task.foo" : "bar",
        "deployer.my-task.something-else" : "3"
      },
      "platformName" : "default",
      "taskExecutionStatus" : "UNKNOWN",
      "_links" : {
        "tasks/logs" : [ {
          "href" : "http://localhost:9393/tasks/logs/taskB-a36f5d64-a46f-4508-a8e0-0d95876183aa?platformName=default"
        }, {
          "href" : "http://localhost:9393/tasks/logs/taskB-a36f5d64-a46f-4508-a8e0-0d95876183aa?platformName=default"
        } ],
        "self" : {
          "href" : "http://localhost:9393/tasks/executions/2"
        }
      }
    }, {
      "executionId" : 1,
      "exitCode" : null,
      "taskName" : "taskA",
      "startTime" : null,
      "endTime" : null,
      "exitMessage" : null,
      "arguments" : [ ],
      "jobExecutionIds" : [ ],
      "errorMessage" : null,
      "externalExecutionId" : "taskA-0af915af-fe7e-423e-b54e-390e46ed40c7",
      "parentExecutionId" : null,
      "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
      "appProperties" : {
        "management.metrics.tags.service" : "task-application",
        "timestamp.format" : "yyyy MM dd",
        "spring.datasource.username" : null,
        "spring.datasource.url" : null,
        "spring.datasource.driverClassName" : null,
        "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
        "spring.cloud.task.name" : "taskA"
      },
      "deploymentProperties" : {
        "app.my-task.foo" : "bar",
        "deployer.my-task.something-else" : "3"
      },
      "platformName" : "default",
      "taskExecutionStatus" : "UNKNOWN",
      "_links" : {
        "tasks/logs" : [ {
          "href" : "http://localhost:9393/tasks/logs/taskA-0af915af-fe7e-423e-b54e-390e46ed40c7?platformName=default"
        }, {
          "href" : "http://localhost:9393/tasks/logs/taskA-0af915af-fe7e-423e-b54e-390e46ed40c7?platformName=default"
        } ],
        "self" : {
          "href" : "http://localhost:9393/tasks/executions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/tasks/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

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

任务执行终端节点允许您列出具有指定任务名称的任务执行。 以下主题提供了更多详细信息: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: 1781

{
  "_embedded" : {
    "taskExecutionResourceList" : [ {
      "executionId" : 2,
      "exitCode" : null,
      "taskName" : "taskB",
      "startTime" : null,
      "endTime" : null,
      "exitMessage" : null,
      "arguments" : [ ],
      "jobExecutionIds" : [ ],
      "errorMessage" : null,
      "externalExecutionId" : "taskB-a36f5d64-a46f-4508-a8e0-0d95876183aa",
      "parentExecutionId" : null,
      "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
      "appProperties" : {
        "management.metrics.tags.service" : "task-application",
        "timestamp.format" : "yyyy MM dd",
        "spring.datasource.username" : null,
        "spring.datasource.url" : null,
        "spring.datasource.driverClassName" : null,
        "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
        "spring.cloud.task.name" : "taskB"
      },
      "deploymentProperties" : {
        "app.my-task.foo" : "bar",
        "deployer.my-task.something-else" : "3"
      },
      "platformName" : "default",
      "taskExecutionStatus" : "UNKNOWN",
      "_links" : {
        "tasks/logs" : [ {
          "href" : "http://localhost:9393/tasks/logs/taskB-a36f5d64-a46f-4508-a8e0-0d95876183aa?platformName=default"
        }, {
          "href" : "http://localhost:9393/tasks/logs/taskB-a36f5d64-a46f-4508-a8e0-0d95876183aa?platformName=default"
        } ],
        "self" : {
          "href" : "http://localhost:9393/tasks/executions/2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/tasks/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.11.5. 任务执行细节

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

请求结构
GET /tasks/executions/1 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' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1354

{
  "executionId" : 1,
  "exitCode" : null,
  "taskName" : "taskA",
  "startTime" : null,
  "endTime" : null,
  "exitMessage" : null,
  "arguments" : [ ],
  "jobExecutionIds" : [ ],
  "errorMessage" : null,
  "externalExecutionId" : "taskA-0af915af-fe7e-423e-b54e-390e46ed40c7",
  "parentExecutionId" : null,
  "resourceUrl" : "org.springframework.cloud.task.app:timestamp-task:jar:1.2.0.RELEASE",
  "appProperties" : {
    "management.metrics.tags.service" : "task-application",
    "timestamp.format" : "yyyy MM dd",
    "spring.datasource.username" : null,
    "spring.datasource.url" : null,
    "spring.datasource.driverClassName" : null,
    "management.metrics.tags.application" : "${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}",
    "spring.cloud.task.name" : "taskA"
  },
  "deploymentProperties" : {
    "app.my-task.foo" : "bar",
    "deployer.my-task.something-else" : "3"
  },
  "platformName" : "default",
  "taskExecutionStatus" : "UNKNOWN",
  "_links" : {
    "tasks/logs" : [ {
      "href" : "http://localhost:9393/tasks/logs/taskA-0af915af-fe7e-423e-b54e-390e46ed40c7?platformName=default"
    }, {
      "href" : "http://localhost:9393/tasks/logs/taskA-0af915af-fe7e-423e-b54e-390e46ed40c7?platformName=default"
    } ],
    "self" : {
      "href" : "http://localhost:9393/tasks/executions/1"
    }
  }
}

42.11.6. 删除任务执行

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

清理实现(第一个选项)特定于平台。两种作都可以触发 一次或分开。

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

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

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

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

参数 描述

idsspring-doc.cadn.net.cn

提供 2 个逗号分隔的任务执行 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

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

42.11.7. 删除任务执行数据

您不仅可以清理用于部署任务的资源,还可以删除与 来自底层持久性存储的任务执行。此外,如果任务执行与一个 或 更多 Batch Job 执行,这些也会被删除。spring-doc.cadn.net.cn

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

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

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

参数 描述

idsspring-doc.cadn.net.cn

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

参数 描述

actionspring-doc.cadn.net.cn

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

使用REMOVE_DATAaction 参数,则必须提供 表示父任务执行的任务执行 ID。当您提供子任务执行(作为组合任务的一部分执行)时, 一个400(错误请求)返回 HTTP 状态。
删除大量任务执行时,某些数据库类型会限制IN子句(Spring Cloud Data Flow 用于删除任务执行关系的方法)。 Spring Cloud Data Flow 支持 Sql Server(最多 2100 个条目)和 Oracle DB(最多 1000 个条目)的删除分块。 但是,Spring Cloud Data Flow 允许用户设置自己的分块因子。为此,请将spring.cloud.dataflow.task.executionDeleteChunkSize属性设置为适当的块大小。 默认值为0这意味着 Spring Cloud Data Flow 不会对任务执行删除进行分块(Oracle 和 Sql Server 数据库除外)。

42.11.8. 任务执行当前计数

任务执行当前终端节点允许您检索当前正在运行的执行数。 以下主题提供了更多详细信息: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" : 20,
  "runningExecutionCount" : 0
} ]

42.12. 任务执行

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

42.12.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: 3066

{
  "_embedded" : {
    "jobExecutionResourceList" : [ {
      "executionId" : 2,
      "stepExecutionCount" : 0,
      "jobId" : 2,
      "taskExecutionId" : 2,
      "name" : "DOCJOB1",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "duration" : "00:00:00",
      "jobExecution" : {
        "id" : 2,
        "version" : 1,
        "jobParameters" : {
          "parameters" : { }
        },
        "jobInstance" : {
          "id" : 2,
          "jobName" : "DOCJOB1",
          "version" : null
        },
        "stepExecutions" : [ ],
        "status" : "STOPPED",
        "startTime" : "2023-07-12T03:28:01.101+0000",
        "createTime" : "2023-07-12T03:28:01.100+0000",
        "endTime" : null,
        "lastUpdated" : "2023-07-12T03:28:01.101+0000",
        "exitStatus" : {
          "exitCode" : "UNKNOWN",
          "exitDescription" : ""
        },
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "failureExceptions" : [ ],
        "jobConfigurationName" : null,
        "allFailureExceptions" : [ ]
      },
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : true,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : true,
      "timeZone" : "UTC",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/2"
        }
      }
    }, {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "duration" : "00:00:00",
      "jobExecution" : {
        "id" : 1,
        "version" : 2,
        "jobParameters" : {
          "parameters" : { }
        },
        "jobInstance" : {
          "id" : 1,
          "jobName" : "DOCJOB",
          "version" : null
        },
        "stepExecutions" : [ ],
        "status" : "STOPPING",
        "startTime" : "2023-07-12T03:28:01.097+0000",
        "createTime" : "2023-07-12T03:28:01.096+0000",
        "endTime" : null,
        "lastUpdated" : "2023-07-12T03:28:01.165+0000",
        "exitStatus" : {
          "exitCode" : "UNKNOWN",
          "exitDescription" : ""
        },
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "failureExceptions" : [ ],
        "jobConfigurationName" : null,
        "allFailureExceptions" : [ ]
      },
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : false,
      "timeZone" : "UTC",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.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: 1604

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 2,
      "stepExecutionCount" : 0,
      "jobId" : 2,
      "taskExecutionId" : 2,
      "instanceId" : 2,
      "name" : "DOCJOB1",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.101+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : true,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STOPPED",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/2"
        }
      }
    }, {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.097+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : false,
      "stoppable" : true,
      "defined" : false,
      "timeZone" : "UTC",
      "status" : "STARTED",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.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: 1669

{
  "_embedded" : {
    "jobExecutionResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "duration" : "00:00:00",
      "jobExecution" : {
        "id" : 1,
        "version" : 2,
        "jobParameters" : {
          "parameters" : { }
        },
        "jobInstance" : {
          "id" : 1,
          "jobName" : "DOCJOB",
          "version" : null
        },
        "stepExecutions" : [ ],
        "status" : "STOPPING",
        "startTime" : "2023-07-12T03:28:01.097+0000",
        "createTime" : "2023-07-12T03:28:01.096+0000",
        "endTime" : null,
        "lastUpdated" : "2023-07-12T03:28:01.165+0000",
        "exitStatus" : {
          "exitCode" : "UNKNOWN",
          "exitDescription" : ""
        },
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "failureExceptions" : [ ],
        "jobConfigurationName" : null,
        "allFailureExceptions" : [ ]
      },
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : false,
      "timeZone" : "UTC",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.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: 943

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.097+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : false,
      "timeZone" : "UTC",
      "status" : "STOPPING",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.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

将结果筛选到to格式为 'yyyy-MM-dd'T'HH:mm:ss,SSS' 的日期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: 1605

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 2,
      "stepExecutionCount" : 0,
      "jobId" : 2,
      "taskExecutionId" : 2,
      "instanceId" : 2,
      "name" : "DOCJOB1",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.101+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : true,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : true,
      "timeZone" : "UTC",
      "status" : "STOPPED",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/2"
        }
      }
    }, {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.097+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : false,
      "timeZone" : "UTC",
      "status" : "STOPPING",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.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: 943

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.097+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : false,
      "timeZone" : "UTC",
      "status" : "STOPPING",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.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: 943

{
  "_embedded" : {
    "jobExecutionThinResourceList" : [ {
      "executionId" : 1,
      "stepExecutionCount" : 0,
      "jobId" : 1,
      "taskExecutionId" : 1,
      "instanceId" : 1,
      "name" : "DOCJOB",
      "startDate" : "2023-07-12",
      "startTime" : "03:28:01",
      "startDateTime" : "2023-07-12T03:28:01.097+0000",
      "duration" : "00:00:00",
      "jobParameters" : { },
      "jobParametersString" : "",
      "restartable" : false,
      "abandonable" : true,
      "stoppable" : false,
      "defined" : false,
      "timeZone" : "UTC",
      "status" : "STOPPING",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/thinexecutions/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/thinexecutions?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.12.8. 任务执行细节

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

请求结构
GET /jobs/executions/2 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' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1188

{
  "executionId" : 2,
  "stepExecutionCount" : 0,
  "jobId" : 2,
  "taskExecutionId" : 2,
  "name" : "DOCJOB1",
  "startDate" : "2023-07-12",
  "startTime" : "03:28:01",
  "duration" : "00:00:00",
  "jobExecution" : {
    "id" : 2,
    "version" : 1,
    "jobParameters" : {
      "parameters" : { }
    },
    "jobInstance" : {
      "id" : 2,
      "jobName" : "DOCJOB1",
      "version" : 0
    },
    "stepExecutions" : [ ],
    "status" : "STOPPED",
    "startTime" : "2023-07-12T03:28:01.101+0000",
    "createTime" : "2023-07-12T03:28:01.100+0000",
    "endTime" : null,
    "lastUpdated" : "2023-07-12T03:28:01.101+0000",
    "exitStatus" : {
      "exitCode" : "UNKNOWN",
      "exitDescription" : ""
    },
    "executionContext" : {
      "dirty" : false,
      "empty" : true,
      "values" : [ ]
    },
    "failureExceptions" : [ ],
    "jobConfigurationName" : null,
    "allFailureExceptions" : [ ]
  },
  "jobParameters" : { },
  "jobParametersString" : "",
  "restartable" : true,
  "abandonable" : true,
  "stoppable" : false,
  "defined" : true,
  "timeZone" : "UTC",
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/2"
    }
  }
}

42.12.9. 停止任务执行

任务执行终端节点允许您停止任务执行。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
PUT /jobs/executions/1 HTTP/1.1
Accept: application/json
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded

stop=true

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

参数 描述

idspring-doc.cadn.net.cn

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

请求参数
参数 描述

stopspring-doc.cadn.net.cn

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

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

42.12.10. 重新启动任务执行

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

请求结构
PUT /jobs/executions/2 HTTP/1.1
Accept: application/json
Host: localhost:9393
Content-Type: application/x-www-form-urlencoded

restart=true

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

参数 描述

idspring-doc.cadn.net.cn

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

请求参数
参数 描述

restartspring-doc.cadn.net.cn

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

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

42.13. 作业实例

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

42.13.1. 列出所有 Job 实例

的 job instances 端点允许您列出所有 job 实例。 以下主题提供了更多详细信息: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: 1845

{
  "_embedded" : {
    "jobInstanceResourceList" : [ {
      "jobName" : "DOCJOB",
      "jobInstanceId" : 1,
      "jobExecutions" : [ {
        "executionId" : 1,
        "stepExecutionCount" : 0,
        "jobId" : 1,
        "taskExecutionId" : 1,
        "name" : "DOCJOB",
        "startDate" : "2023-07-12",
        "startTime" : "03:26:12",
        "duration" : "00:00:00",
        "jobExecution" : {
          "id" : 1,
          "version" : 1,
          "jobParameters" : {
            "parameters" : { }
          },
          "jobInstance" : {
            "id" : 1,
            "jobName" : "DOCJOB",
            "version" : 0
          },
          "stepExecutions" : [ ],
          "status" : "STARTED",
          "startTime" : "2023-07-12T03:26:12.884+0000",
          "createTime" : "2023-07-12T03:26:12.873+0000",
          "endTime" : null,
          "lastUpdated" : "2023-07-12T03:26:12.884+0000",
          "exitStatus" : {
            "exitCode" : "UNKNOWN",
            "exitDescription" : ""
          },
          "executionContext" : {
            "dirty" : false,
            "empty" : true,
            "values" : [ ]
          },
          "failureExceptions" : [ ],
          "jobConfigurationName" : null,
          "allFailureExceptions" : [ ]
        },
        "jobParameters" : { },
        "jobParametersString" : "",
        "restartable" : false,
        "abandonable" : false,
        "stoppable" : true,
        "defined" : false,
        "timeZone" : "UTC"
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/instances/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/instances?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.13.2. Job 实例详细信息

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

请求结构
GET /jobs/instances/1 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' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1354

{
  "jobName" : "DOCJOB",
  "jobInstanceId" : 1,
  "jobExecutions" : [ {
    "executionId" : 1,
    "stepExecutionCount" : 0,
    "jobId" : 1,
    "taskExecutionId" : 1,
    "name" : "DOCJOB",
    "startDate" : "2023-07-12",
    "startTime" : "03:26:12",
    "duration" : "00:00:00",
    "jobExecution" : {
      "id" : 1,
      "version" : 1,
      "jobParameters" : {
        "parameters" : { }
      },
      "jobInstance" : {
        "id" : 1,
        "jobName" : "DOCJOB",
        "version" : 0
      },
      "stepExecutions" : [ ],
      "status" : "STARTED",
      "startTime" : "2023-07-12T03:26:12.884+0000",
      "createTime" : "2023-07-12T03:26:12.873+0000",
      "endTime" : null,
      "lastUpdated" : "2023-07-12T03:26:12.884+0000",
      "exitStatus" : {
        "exitCode" : "UNKNOWN",
        "exitDescription" : ""
      },
      "executionContext" : {
        "dirty" : false,
        "empty" : true,
        "values" : [ ]
      },
      "failureExceptions" : [ ],
      "jobConfigurationName" : null,
      "allFailureExceptions" : [ ]
    },
    "jobParameters" : { },
    "jobParametersString" : "",
    "restartable" : false,
    "abandonable" : false,
    "stoppable" : true,
    "defined" : false,
    "timeZone" : "UTC"
  } ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/instances/1"
    }
  }
}

42.14. 作业步骤执行

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

42.14.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: 1623

{
  "_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" : "2023-07-12T03:27:59.080+0000",
        "endTime" : null,
        "lastUpdated" : "2023-07-12T03:27:59.080+0000",
        "executionContext" : {
          "dirty" : false,
          "empty" : true,
          "values" : [ ]
        },
        "exitStatus" : {
          "exitCode" : "EXECUTING",
          "exitDescription" : ""
        },
        "terminateOnly" : false,
        "filterCount" : 0,
        "failureExceptions" : [ ],
        "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"
      },
      "stepType" : "",
      "_links" : {
        "self" : {
          "href" : "http://localhost:9393/jobs/executions/1/steps/1"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps?page=0&size=10"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

42.14.2. 作业步骤执行细节

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

请求结构
GET /jobs/executions/1/steps/1 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' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1173

{
  "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" : "2023-07-12T03:27:59.080+0000",
    "endTime" : null,
    "lastUpdated" : "2023-07-12T03:27:59.080+0000",
    "executionContext" : {
      "dirty" : false,
      "empty" : true,
      "values" : [ ]
    },
    "exitStatus" : {
      "exitCode" : "EXECUTING",
      "exitDescription" : ""
    },
    "terminateOnly" : false,
    "filterCount" : 0,
    "failureExceptions" : [ ],
    "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"
  },
  "stepType" : "",
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps/1"
    }
  }
}

42.14.3. Job Step 执行进度

任务步骤执行终端节点允许您获取有关任务步骤执行进度的详细信息。 以下主题提供了更多详细信息: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: 2675

{
  "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" : "2023-07-12T03:27:59.080+0000",
    "endTime" : null,
    "lastUpdated" : "2023-07-12T03:27:59.080+0000",
    "executionContext" : {
      "dirty" : false,
      "empty" : true,
      "values" : [ ]
    },
    "exitStatus" : {
      "exitCode" : "EXECUTING",
      "exitDescription" : ""
    },
    "terminateOnly" : false,
    "filterCount" : 0,
    "failureExceptions" : [ ],
    "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"
  },
  "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" : 82.0,
  "_links" : {
    "self" : {
      "href" : "http://localhost:9393/jobs/executions/1/steps/1"
    }
  }
}
stepExecutionHistory 中的以下字段已弃用,并将在未来版本中删除:rollbackCount、readCount、writeCount、filterCount、readSkipCount、writeSkipCount、processSkipCount、durationPerRead。

42.15. 有关应用程序的运行时信息

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

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

要检索有关所有应用程序的所有实例的信息,请查询/runtime/appsendpoint 结合使用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
  }
}

42.15.2. 查询单个应用程序的所有实例

要检索有关特定应用程序的所有实例的信息,请查询/runtime/apps/<appId>/instancesendpoint 结合使用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
  }
}

42.15.3. 查询单个应用程序的单个实例

要检索有关特定应用程序的特定实例的信息,请查询/runtime/apps/<appId>/instances/<instanceId>endpoint 结合使用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
  }
}

42.16. 流日志

您可以获取整个流或流中特定应用程序的流的应用程序日志。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

42.16.1. 通过流名称获取应用程序的日志

使用 HTTPGET方法与/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"
  }
}

42.16.2. 从流中获取特定应用程序的日志

要从流中检索特定应用程序的日志,请查询/streams/logs/<streamName>/<appName>端点使用GETHTTP 方法。 以下主题提供了更多详细信息: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"
  }
}

42.17. 任务日志

您可以获取特定任务执行的任务执行日志。spring-doc.cadn.net.cn

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

42.17.1. 获取任务执行日志

要检索任务执行的日志,请查询/tasks/logs/<ExternalTaskExecutionId>端点GET方法。。 以下主题提供了更多详细信息:spring-doc.cadn.net.cn

请求结构
GET /tasks/logs/taskA-1143b445-0a86-468b-b6af-244713cd39b9?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-1143b445-0a86-468b-b6af-244713cd39b9?platformName=default' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 10041

"stdout:\n2023-07-12 03:28:13.092  INFO 9534 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@ba8a1dc: startup date [Wed Jul 12 03:28:13 UTC 2023]; root of context hierarchy\n2023-07-12 03:28:13.397  INFO 9534 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f850fffa] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n\n  .   ____          _            __ _ _\n /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n  '  |____| .__|_| |_|_| |_\\__, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot ::        (v1.5.2.RELEASE)\n\n2023-07-12 03:28:13.591  INFO 9534 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888\n2023-07-12 03:28:13.646  WARN 9534 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for \"http://localhost:8888/timestamp-task/default\": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)\n2023-07-12 03:28:13.647  INFO 9534 --- [           main] o.s.c.t.a.t.TimestampTaskApplication     : No active profile set, falling back to default profiles: default\n2023-07-12 03:28:13.660  INFO 9534 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@63d4e2ba: startup date [Wed Jul 12 03:28:13 UTC 2023]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@ba8a1dc\n2023-07-12 03:28:14.134  INFO 9534 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=1e36064f-ccbe-3d2f-9196-128427cc78a0\n2023-07-12 03:28:14.208  INFO 9534 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f850fffa] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2023-07-12 03:28:14.216  INFO 9534 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$dc36fcfd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2023-07-12 03:28:14.648  INFO 9534 --- [           main] o.s.jdbc.datasource.init.ScriptUtils     : Executing SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql]\n2023-07-12 03:28:14.673  INFO 9534 --- [           main] o.s.jdbc.datasource.init.ScriptUtils     : Executed SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql] in 25 ms.\n2023-07-12 03:28:14.992  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup\n2023-07-12 03:28:15.000  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure\n2023-07-12 03:28:15.001  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'environmentManager' has been autodetected for JMX exposure\n2023-07-12 03:28:15.004  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'refreshScope' has been autodetected for JMX exposure\n2023-07-12 03:28:15.006  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'environmentManager': registering with JMX server as MBean [taskA-1143b445-0a86-468b-b6af-244713cd39b9:name=environmentManager,type=EnvironmentManager]\n2023-07-12 03:28:15.025  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'refreshScope': registering with JMX server as MBean [taskA-1143b445-0a86-468b-b6af-244713cd39b9:name=refreshScope,type=RefreshScope]\n2023-07-12 03:28:15.035  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [taskA-1143b445-0a86-468b-b6af-244713cd39b9:name=configurationPropertiesRebinder,context=63d4e2ba,type=ConfigurationPropertiesRebinder]\n2023-07-12 03:28:15.137  INFO 9534 --- [           main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 0\n2023-07-12 03:28:15.151  WARN 9534 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'taskLifecycleListener'; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n2023-07-12 03:28:15.151  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown\n2023-07-12 03:28:15.151  INFO 9534 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans\n2023-07-12 03:28:15.152 ERROR 9534 --- [           main] o.s.c.t.listener.TaskLifecycleListener   : An event to end a task has been received for a task that has not yet started.\n2023-07-12 03:28:15.159  INFO 9534 --- [           main] utoConfigurationReportLoggingInitializer : \n\nError starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.\n2023-07-12 03:28:15.166 ERROR 9534 --- [           main] o.s.boot.SpringApplication               : Application startup failed\n\norg.springframework.context.ApplicationContextException: Failed to start bean 'taskLifecycleListener'; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:348) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:151) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:114) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\n\tat org.springframework.cloud.task.app.timestamp.TimestampTaskApplication.main(TimestampTaskApplication.java:29) [classes!/:1.2.0.RELEASE]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_372]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_372]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_372]\n\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_372]\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\nCaused by: java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\n\tat org.springframework.util.Assert.notNull(Assert.java:134) ~[spring-core-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\tat org.springframework.cloud.task.listener.TaskLifecycleListener.doTaskStart(TaskLifecycleListener.java:200) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\n\tat org.springframework.cloud.task.listener.TaskLifecycleListener.start(TaskLifecycleListener.java:282) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\n\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:175) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\n\t... 20 common frames omitted\n\n"

43. 开放API

Springdoc 库以选择加入的方式与服务器集成。启用后,它将提供 OpenAPI3 文档和 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.htmlURI 的 URI (例如。localhost:9393/v3/api-docs 的 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