REST API 指南

本节介绍 Spring Cloud Skipper REST API。spring-doc.cn

29. 概述

Spring Cloud Skipper 提供了一个 REST API,可让您访问服务器的所有方面。 Spring Cloud Skipper shell 是 API 的一等使用者。spring-doc.cn

29.1. HTTP 动词

Spring Cloud Skipper 在使用 HTTP 动词时尝试尽可能严格遵守标准 HTTP 和 REST 约定。 下表显示了每个动词以及 Skipper 如何使用它:spring-doc.cn

动词 用法

GETspring-doc.cn

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

POSTspring-doc.cn

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

PUTspring-doc.cn

用于更新现有资源,包括部分更新。 还用于隐含 概念 的资源。restartsspring-doc.cn

DELETEspring-doc.cn

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

29.2. HTTP 状态代码

Skipper 在使用 HTTP 状态代码时尽可能遵守标准 HTTP 和 REST 约定。 下表显示了 Skipper 中的每种状态及其含义:spring-doc.cn

状态代码 用法

200 OKspring-doc.cn

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

201 Createdspring-doc.cn

已成功创建新资源。 资源的 URI 可从响应的标头中获得。Locationspring-doc.cn

204 No Contentspring-doc.cn

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

400 Bad Requestspring-doc.cn

请求格式不正确。响应正文包含一个错误,该错误提供了更多信息。spring-doc.cn

404 Not Foundspring-doc.cn

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

29.3. 标头

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

名字 描述

Content-Typespring-doc.cn

的 payload (例如 )。Content-Typeapplication/hal+jsonspring-doc.cn

29.4. 错误

路径 类型 描述

errorspring-doc.cn

Stringspring-doc.cn

发生的 HTTP 错误(例如 )。Bad Requestspring-doc.cn

messagespring-doc.cn

Stringspring-doc.cn

错误原因的说明。spring-doc.cn

exceptionspring-doc.cn

Stringspring-doc.cn

异常类。spring-doc.cn

pathspring-doc.cn

Stringspring-doc.cn

发出请求的路径。spring-doc.cn

statusspring-doc.cn

Numberspring-doc.cn

HTTP 状态代码(例如 )。400spring-doc.cn

timestampspring-doc.cn

Numberspring-doc.cn

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

29.5. 超媒体

Spring Cloud Skipper 使用超媒体。 因此,资源在其响应中包含指向其他资源的链接。 更具体地说,响应采用从资源到资源语言 (HAL) 格式的超文本应用程序。 链接可以在密钥下方找到。 API 的使用者不应自行创建 URI。 相反,他们应该使用资源中的链接进行导航。_linksspring-doc.cn

30. 资源

30.1. 索引

该索引提供了 Spring Cloud Skipper 的 REST API 的入口点。spring-doc.cn

30.1.1. 访问索引

您可以使用请求来访问索引。GETspring-doc.cn

请求结构

以下内容spring-doc.cn

GET /api HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api' -i -X GET
示例响应
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 1366

{
  "_links" : {
    "repositories" : {
      "href" : "http://localhost:7577/api/repositories{?page,size,sort}",
      "templated" : true
    },
    "jpaRepositoryActions" : {
      "href" : "http://localhost:7577/api/jpaRepositoryActions"
    },
    "jpaRepositoryGuards" : {
      "href" : "http://localhost:7577/api/jpaRepositoryGuards"
    },
    "deployers" : {
      "href" : "http://localhost:7577/api/deployers{?page,size,sort}",
      "templated" : true
    },
    "jpaRepositoryStates" : {
      "href" : "http://localhost:7577/api/jpaRepositoryStates"
    },
    "releases" : {
      "href" : "http://localhost:7577/api/releases{?page,size,sort}",
      "templated" : true
    },
    "packageMetadata" : {
      "href" : "http://localhost:7577/api/packageMetadata{?page,size,sort,projection}",
      "templated" : true
    },
    "jpaRepositoryStateMachines" : {
      "href" : "http://localhost:7577/api/jpaRepositoryStateMachines"
    },
    "jpaRepositoryTransitions" : {
      "href" : "http://localhost:7577/api/jpaRepositoryTransitions"
    },
    "about" : {
      "href" : "http://localhost:7577/api/about"
    },
    "release" : {
      "href" : "http://localhost:7577/api/release"
    },
    "package" : {
      "href" : "http://localhost:7577/api/package"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile"
    }
  }
}

链接是索引的主要元素,因为它们允许您遍历 API 并调用所需的功能。 下表列出了这些链接:spring-doc.cn

关系 描述

repositoriesspring-doc.cn

公开 'package repository' 仓库。spring-doc.cn

deployersspring-doc.cn

公开 Deployer 存储库。spring-doc.cn

packageMetadataspring-doc.cn

公开包元数据存储库。spring-doc.cn

releasesspring-doc.cn

公开发布存储库。spring-doc.cn

profilespring-doc.cn

Entrypoint 提供 ALPS 元数据,用于定义应用程序级语义的简单描述。spring-doc.cn

aboutspring-doc.cn

提供有关服务器的元信息。spring-doc.cn

releasespring-doc.cn

公开 release 资源。spring-doc.cn

packagespring-doc.cn

公开包资源。spring-doc.cn

30.2. 服务器

Server 资源公开了 Server 的构建和版本信息。spring-doc.cn

30.2.1. 服务器信息

请求返回 Spring Cloud Skipper 的元信息,包括以下内容:GETspring-doc.cn

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

{
  "versionInfo" : {
    "server" : {
      "name" : "Spring Cloud Skipper Server",
      "version" : "fake-server-version"
    },
    "shell" : {
      "name" : "Spring Cloud Skipper Shell",
      "version" : "fake-shell-version"
    }
  },
  "links" : [ ]
}
响应字段
路径 类型 描述

versionInfo.server.namespring-doc.cn

Stringspring-doc.cn

Spring Cloud Skipper Server 依赖项。spring-doc.cn

versionInfo.server.versionspring-doc.cn

Stringspring-doc.cn

Spring Cloud Skipper Server 依赖项版本。spring-doc.cn

versionInfo.shell.namespring-doc.cn

Stringspring-doc.cn

Spring Cloud Skipper Shell 依赖项。spring-doc.cn

versionInfo.shell.versionspring-doc.cn

Stringspring-doc.cn

Spring Cloud Skipper Shell 依赖项版本。spring-doc.cn

linksspring-doc.cn

Arrayspring-doc.cn

链接。spring-doc.cn

30.3. 平台

平台(或 Platform Deployer)资源从 Spring Data Repository 导出,并由 Spring Data REST 公开。DeployerRepositoryspring-doc.cn

30.3.1. 查找全部

请求返回所有 Spring Cloud Skipper 平台部署程序的分页列表。GETspring-doc.cn

请求结构
GET /api/deployers?page=0&size=10 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/deployers?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 16050

{
  "_embedded" : {
    "deployers" : [ {
      "name" : "default",
      "type" : "local",
      "description" : "ShutdownTimeout = [30], EnvVarsToInherit = [TMP,LANG,LANGUAGE,LC_.*,PATH,SPRING_APPLICATION_JSON], JavaCmd = [java], WorkingDirectoriesRoot = [/tmp], DeleteFilesOnExit = [true]",
      "options" : [ {
        "id" : "spring.cloud.deployer.local.docker.network",
        "name" : "network",
        "type" : "java.lang.String",
        "description" : "Container network",
        "shortDescription" : "Container network",
        "defaultValue" : "bridge",
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.docker.volume-mounts",
        "name" : "volume-mounts",
        "type" : "java.lang.String",
        "description" : "Set volume mappings",
        "shortDescription" : "Set volume mappings",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.docker.port-mappings",
        "name" : "port-mappings",
        "type" : "java.lang.String",
        "description" : "Set port mappings for container",
        "shortDescription" : "Set port mappings for container",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.docker.additional-hosts",
        "name" : "additional-hosts",
        "type" : "java.lang.String",
        "description" : "Set additional hosts",
        "shortDescription" : "Set additional hosts",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.docker.delete-container-on-exit",
        "name" : "delete-container-on-exit",
        "type" : "java.lang.Boolean",
        "description" : "Whether to delete the container on container exit.",
        "shortDescription" : "Whether to delete the container on container exit.",
        "defaultValue" : true,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.docker.port-range.low",
        "name" : "low",
        "type" : "java.lang.Integer",
        "description" : "Lower bound for computing applications's random port.",
        "shortDescription" : "Lower bound for computing applications's random port.",
        "defaultValue" : 20000,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.docker.port-range.high",
        "name" : "high",
        "type" : "java.lang.Integer",
        "description" : "Upper bound for computing applications's random port.",
        "shortDescription" : "Upper bound for computing applications's random port.",
        "defaultValue" : 61000,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.working-directories-root",
        "name" : "working-directories-root",
        "type" : "java.nio.file.Path",
        "description" : "Directory in which all created processes will run and create log files.",
        "shortDescription" : "Directory in which all created processes will run and create log files.",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.use-spring-application-json",
        "name" : "use-spring-application-json",
        "type" : "java.lang.Boolean",
        "description" : "Flag to indicate whether application properties are passed as command line args or in a SPRING_APPLICATION_JSON environment variable. Default value is {@code true}.",
        "shortDescription" : "Flag to indicate whether application properties are passed as command line args or in a SPRING_APPLICATION_JSON environment variable.",
        "defaultValue" : true,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.env-vars-to-inherit",
        "name" : "env-vars-to-inherit",
        "type" : "java.lang.String[]",
        "description" : "Array of regular expression patterns for environment variables that should be passed to launched applications.",
        "shortDescription" : "Array of regular expression patterns for environment variables that should be passed to launched applications.",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.shutdown-timeout",
        "name" : "shutdown-timeout",
        "type" : "java.lang.Integer",
        "description" : "Maximum number of seconds to wait for application shutdown. via the {@code /shutdown} endpoint. A timeout value of 0 specifies an infinite timeout. Default is 30 seconds.",
        "shortDescription" : "Maximum number of seconds to wait for application shutdown. via the {@code /shutdown} endpoint.",
        "defaultValue" : 30,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.maximum-concurrent-tasks",
        "name" : "maximum-concurrent-tasks",
        "type" : "java.lang.Integer",
        "description" : "The maximum concurrent tasks allowed for this platform instance.",
        "shortDescription" : "The maximum concurrent tasks allowed for this platform instance.",
        "defaultValue" : 20,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.debug-suspend",
        "name" : "debug-suspend",
        "type" : "org.springframework.cloud.deployer.spi.local.LocalDeployerProperties$DebugSuspendType",
        "description" : "Suspend defines whether the JVM should suspend and wait for a debugger to attach or not",
        "shortDescription" : "Suspend defines whether the JVM should suspend and wait for a debugger to attach or not",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.java-opts",
        "name" : "java-opts",
        "type" : "java.lang.String",
        "description" : "The Java Options to pass to the JVM, e.g -Dtest=foo",
        "shortDescription" : "The Java Options to pass to the JVM, e.g -Dtest=foo",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.java-home-path",
        "name" : "java-home-path",
        "type" : "java.util.Map<java.lang.String,java.lang.String>",
        "description" : null,
        "shortDescription" : null,
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.inherit-logging",
        "name" : "inherit-logging",
        "type" : "java.lang.Boolean",
        "description" : null,
        "shortDescription" : null,
        "defaultValue" : false,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.app-admin",
        "name" : "app-admin",
        "type" : "org.springframework.cloud.deployer.spi.app.AppAdmin",
        "description" : null,
        "shortDescription" : null,
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.debug-port",
        "name" : "debug-port",
        "type" : "java.lang.Integer",
        "description" : "Set remote debugging port for JDK 8 runtimes. @deprecated Use the {@link #debugAddress} instead!",
        "shortDescription" : "Set remote debugging port for JDK 8 runtimes.",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.delete-files-on-exit",
        "name" : "delete-files-on-exit",
        "type" : "java.lang.Boolean",
        "description" : "Whether to delete created files and directories on JVM exit.",
        "shortDescription" : "Whether to delete created files and directories on JVM exit.",
        "defaultValue" : true,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.hostname",
        "name" : "hostname",
        "type" : "java.lang.String",
        "description" : "(optional) hostname to use when computing the URL of the deployed application. By default the {@link CommandBuilder} implementations decide how to build the hostname.",
        "shortDescription" : "(optional) hostname to use when computing the URL of the deployed application.",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.java-cmd",
        "name" : "java-cmd",
        "type" : "java.lang.String",
        "description" : "The command to run java.",
        "shortDescription" : "The command to run java.",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.debug-address",
        "name" : "debug-address",
        "type" : "java.lang.String",
        "description" : "Debugging address for the remote clients to attache to. Addresses have the format \"<name>:<port>\" where <name> is the host name and <port> is the socket port number at which it attaches or listens. For JDK 8 or earlier, the address consists of the port number alone (the host name is implicit to localhost). Example addresses for JDK version 9 or higher: <code>*:20075, 192.168.178.10:20075</code>. Example addresses for JDK version 8 or earlier: <code>20075</code>.",
        "shortDescription" : "Debugging address for the remote clients to attache to.",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.port-range.high",
        "name" : "high",
        "type" : "java.lang.Integer",
        "description" : "Upper bound for computing applications's random port.",
        "shortDescription" : "Upper bound for computing applications's random port.",
        "defaultValue" : 61000,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.port-range.low",
        "name" : "low",
        "type" : "java.lang.Integer",
        "description" : "Lower bound for computing applications's random port.",
        "shortDescription" : "Lower bound for computing applications's random port.",
        "defaultValue" : 20000,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.health-probe.path",
        "name" : "path",
        "type" : "java.lang.String",
        "description" : "Path to check as a probe",
        "shortDescription" : "Path to check as a probe",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      }, {
        "id" : "spring.cloud.deployer.local.startup-probe.path",
        "name" : "path",
        "type" : "java.lang.String",
        "description" : "Path to check as a probe",
        "shortDescription" : "Path to check as a probe",
        "defaultValue" : null,
        "hints" : {
          "keyHints" : [ ],
          "keyProviders" : [ ],
          "valueHints" : [ ],
          "valueProviders" : [ ]
        },
        "deprecation" : null,
        "deprecated" : false
      } ],
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/deployers/01bb2216-44bc-4621-abd2-0cc0d71389a5"
        },
        "deployer" : {
          "href" : "http://localhost:7577/api/deployers/01bb2216-44bc-4621-abd2-0cc0d71389a5"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/deployers"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/deployers"
    },
    "search" : {
      "href" : "http://localhost:7577/api/deployers/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}
响应字段
路径 类型 描述

pagespring-doc.cn

Objectspring-doc.cn

分页属性spring-doc.cn

page.sizespring-doc.cn

Numberspring-doc.cn

返回的页面大小spring-doc.cn

page.totalElementsspring-doc.cn

Numberspring-doc.cn

可用于分页的元素总数spring-doc.cn

page.totalPagesspring-doc.cn

Numberspring-doc.cn

总页数spring-doc.cn

page.numberspring-doc.cn

Numberspring-doc.cn

返回的页面的页码(从 0 开始)spring-doc.cn

_embedded.deployersspring-doc.cn

Arrayspring-doc.cn

包含 Deployer 对象的数组spring-doc.cn

_embedded.deployers[].namespring-doc.cn

Stringspring-doc.cn

部署程序的名称spring-doc.cn

_embedded.deployers[].typespring-doc.cn

Stringspring-doc.cn

部署程序的类型(例如,“local”)spring-doc.cn

_embedded.deployers[].descriptionspring-doc.cn

Stringspring-doc.cn

提供一些 Deployer 属性的描述spring-doc.cn

_embedded.deployers[].optionsspring-doc.cn

Arrayspring-doc.cn

包含 Deployer 部署属性的数组spring-doc.cn

_embedded.deployers[].options[].idspring-doc.cn

Stringspring-doc.cn

部署属性 IDspring-doc.cn

_embedded.deployers[].options[].namespring-doc.cn

Stringspring-doc.cn

部署属性名称spring-doc.cn

_embedded.deployers[].options[].typespring-doc.cn

Stringspring-doc.cn

部署属性类型spring-doc.cn

_embedded.deployers[].options[].descriptionspring-doc.cn

Stringspring-doc.cn

部署属性说明spring-doc.cn

_embedded.deployers[].options[].shortDescriptionspring-doc.cn

Stringspring-doc.cn

部署属性简短描述spring-doc.cn

_embedded.deployers[].options[].defaultValuespring-doc.cn

Variesspring-doc.cn

部署属性默认值spring-doc.cn

_embedded.deployers[].options[].hintsspring-doc.cn

Objectspring-doc.cn

包含部署属性提示的对象spring-doc.cn

_embedded.deployers[].options[].hints.keyHintsspring-doc.cn

Arrayspring-doc.cn

部署属性键提示spring-doc.cn

_embedded.deployers[].options[].hints.keyProvidersspring-doc.cn

Arrayspring-doc.cn

部署属性键提示提供程序spring-doc.cn

_embedded.deployers[].options[].hints.valueHintsspring-doc.cn

Arrayspring-doc.cn

部署属性值提示spring-doc.cn

_embedded.deployers[].options[].hints.valueProvidersspring-doc.cn

Arrayspring-doc.cn

部署属性值提示提供程序spring-doc.cn

_embedded.deployers[].options[].deprecationspring-doc.cn

Nullspring-doc.cn

_embedded.deployers[].options[].deprecatedspring-doc.cn

Booleanspring-doc.cn

30.4. 软件包

Packages 资源从 Spring Data Repository 导出,并由 Spring Data REST 公开。PackageMetadataspring-doc.cn

请求将返回所有 Spring Cloud Skipper 包元数据的分页列表。GETspring-doc.cn

请求结构
GET /api/packageMetadata?page=0&size=10 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/packageMetadata?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 4613

{
  "_embedded" : {
    "packageMetadata" : [ {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/3"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/3{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/3"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/4"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/4{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/4"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/5"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/5{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/5"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/6"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/6{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/6"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/packageMetadata"
    },
    "search" : {
      "href" : "http://localhost:7577/api/packageMetadata/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 4,
    "totalPages" : 1,
    "number" : 0
  }
}
响应字段
路径 类型 描述

pagespring-doc.cn

Objectspring-doc.cn

分页属性spring-doc.cn

page.sizespring-doc.cn

Numberspring-doc.cn

返回的页面大小spring-doc.cn

page.totalElementsspring-doc.cn

Numberspring-doc.cn

可用于分页的元素总数spring-doc.cn

page.totalPagesspring-doc.cn

Numberspring-doc.cn

总页数spring-doc.cn

page.numberspring-doc.cn

Numberspring-doc.cn

返回的页面的页码(从 0 开始)spring-doc.cn

_embedded.packageMetadataspring-doc.cn

Arrayspring-doc.cn

包含 Package Metadata 项的集合spring-doc.cn

_embedded.packageMetadata[].apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

_embedded.packageMetadata[].originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

_embedded.packageMetadata[].repositoryIdspring-doc.cn

Numberspring-doc.cn

此包所属的存储库 IDspring-doc.cn

_embedded.packageMetadata[].repositoryNamespring-doc.cn

Stringspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.packageMetadata[].kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

_embedded.packageMetadata[].namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.packageMetadata[].displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

_embedded.packageMetadata[].versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.packageMetadata[].packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

_embedded.packageMetadata[].packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

_embedded.packageMetadata[].tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

_embedded.packageMetadata[].maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

_embedded.packageMetadata[].descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.packageMetadata[].sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

_embedded.packageMetadata[].iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

30.4.2. 搜索摘要

请求返回可用包元数据的列表以及每个包的摘要信息。GETspring-doc.cn

请求结构
GET /api/packageMetadata?projection=summary HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/packageMetadata?projection=summary' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 2261

{
  "_embedded" : {
    "packageMetadata" : [ {
      "version" : "1.0.0",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "iconUrl" : null,
      "repositoryName" : "local",
      "name" : "log",
      "id" : "3",
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/3"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/3{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/3"
        }
      }
    }, {
      "version" : "1.0.0",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "iconUrl" : null,
      "repositoryName" : "local",
      "name" : "log",
      "id" : "4",
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/4"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/4{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/4"
        }
      }
    }, {
      "version" : "1.0.0",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "iconUrl" : null,
      "repositoryName" : "local",
      "name" : "log",
      "id" : "5",
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/5"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/5{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/5"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata?projection=summary"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/packageMetadata"
    },
    "search" : {
      "href" : "http://localhost:7577/api/packageMetadata/search"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}
响应字段
路径 类型 描述

pagespring-doc.cn

Objectspring-doc.cn

分页属性spring-doc.cn

page.sizespring-doc.cn

Numberspring-doc.cn

返回的页面大小spring-doc.cn

page.totalElementsspring-doc.cn

Numberspring-doc.cn

可用于分页的元素总数spring-doc.cn

page.totalPagesspring-doc.cn

Numberspring-doc.cn

总页数spring-doc.cn

page.numberspring-doc.cn

Numberspring-doc.cn

返回的页面的页码(从 0 开始)spring-doc.cn

_embedded.packageMetadata[].idspring-doc.cn

Stringspring-doc.cn

包元数据的标识符spring-doc.cn

_embedded.packageMetadata[].iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

_embedded.packageMetadata[].repositoryNamespring-doc.cn

Stringspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.packageMetadata[].versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.packageMetadata[].namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.packageMetadata[].descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.packageMetadata[]._links.self.hrefspring-doc.cn

Stringspring-doc.cn

自链接spring-doc.cn

_embedded.packageMetadata[]._links.packageMetadata.hrefspring-doc.cn

Stringspring-doc.cn

链接到完整的包元数据spring-doc.cn

_embedded.packageMetadata[]._links.install.hrefspring-doc.cn

Stringspring-doc.cn

用于安装软件包的链接spring-doc.cn

30.4.3. 使用详细信息搜索

请求使用包的 返回包的详细信息。GETidspring-doc.cn

请求结构
GET /api/packageMetadata/3 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/packageMetadata/3' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
ETag: "0"
Content-Type: application/hal+json
Content-Length: 931

{
  "apiVersion" : "skipper.spring.io/v1",
  "origin" : null,
  "repositoryId" : 2,
  "repositoryName" : "local",
  "kind" : "SkipperPackageMetadata",
  "name" : "log",
  "displayName" : null,
  "version" : "1.0.0",
  "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
  "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
  "tags" : "logging, sink",
  "maintainer" : "https://github.com/sobychacko",
  "description" : "The log sink uses the application logger to output the data for inspection.",
  "sha256" : null,
  "iconUrl" : null,
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata/3"
    },
    "packageMetadata" : {
      "href" : "http://localhost:7577/api/packageMetadata/3{?projection}",
      "templated" : true
    },
    "install" : {
      "href" : "http://localhost:7577/api/package/install/3"
    }
  }
}
响应字段
路径 类型 描述

apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

repositoryIdspring-doc.cn

Numberspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

repositoryNamespring-doc.cn

Stringspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

displayNamespring-doc.cn

Nullspring-doc.cn

包的显示名称spring-doc.cn

versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

30.4.4. 按 Package Name 搜索

请求返回给定包名称的所有 Spring Cloud Skipper 包元数据的列表。GETspring-doc.cn

请求结构

getPackageMetadataSearchFindByNamespring-doc.cn

GET /api/packageMetadata/search/findByName?name=log HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/packageMetadata/search/findByName?name=log' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 5404

{
  "_embedded" : {
    "packageMetadata" : [ {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/3"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/3{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/3"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/4"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/4{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/4"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/5"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/5{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/5"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/6"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/6{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/6"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/7"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/7{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/7"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata/search/findByName?name=log"
    }
  }
}
响应字段
路径 类型 描述

_embedded.packageMetadata[].apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

_embedded.packageMetadata[].originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

_embedded.packageMetadata[].repositoryIdspring-doc.cn

Numberspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

_embedded.packageMetadata[].repositoryNamespring-doc.cn

Stringspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.packageMetadata[].kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

_embedded.packageMetadata[].namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.packageMetadata[].displayNamespring-doc.cn

Nullspring-doc.cn

包的显示名称spring-doc.cn

_embedded.packageMetadata[].versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.packageMetadata[].packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

_embedded.packageMetadata[].packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

_embedded.packageMetadata[].tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

_embedded.packageMetadata[].maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

_embedded.packageMetadata[].descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.packageMetadata[].sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

_embedded.packageMetadata[].iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

30.4.5. 按 package name 搜索,忽略大小写

请求按给定的包名称返回所有 Spring Cloud Skipper 包元数据的列表,忽略大小写。GETspring-doc.cn

请求结构
GET /api/packageMetadata/search/findByNameContainingIgnoreCase?name=LO HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/packageMetadata/search/findByNameContainingIgnoreCase?name=LO' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 2288

{
  "_embedded" : {
    "packageMetadata" : [ {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/3"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/3{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/3"
        }
      }
    }, {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : 2,
      "repositoryName" : "local",
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/packageMetadata/4"
        },
        "packageMetadata" : {
          "href" : "http://localhost:7577/api/packageMetadata/4{?projection}",
          "templated" : true
        },
        "install" : {
          "href" : "http://localhost:7577/api/package/install/4"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/packageMetadata/search/findByNameContainingIgnoreCase?name=LO"
    }
  }
}
响应字段
路径 类型 描述

_embedded.packageMetadata[].apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

_embedded.packageMetadata[].originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

_embedded.packageMetadata[].repositoryIdspring-doc.cn

Numberspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

_embedded.packageMetadata[].repositoryNamespring-doc.cn

Stringspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.packageMetadata[].kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

_embedded.packageMetadata[].namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.packageMetadata[].displayNamespring-doc.cn

Nullspring-doc.cn

包的显示名称spring-doc.cn

_embedded.packageMetadata[].versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.packageMetadata[].packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

_embedded.packageMetadata[].packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

_embedded.packageMetadata[].tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

_embedded.packageMetadata[].maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

_embedded.packageMetadata[].descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.packageMetadata[].sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

_embedded.packageMetadata[].iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

30.5. 打包

Package 资源映射到 PackageController 上,用于上传和安装包。spring-doc.cn

30.5.1. 上传

该链接将包上传到数据库支持的存储库中。uploadlocalspring-doc.cn

请求结构
POST /api/package/upload HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 163
Host: localhost:7577

{
  "name" : "log",
  "repoName" : "local",
  "version" : "1.0.0",
  "extension" : "zip",
  "packageFileAsBytes" : "cGFja2FnZS55bWwKdGVtcGxhdGVzCnZhbHVlcy55bWwK"
}
示例请求
$ curl 'http://localhost:7577/api/package/upload' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "name" : "log",
  "repoName" : "local",
  "version" : "1.0.0",
  "extension" : "zip",
  "packageFileAsBytes" : "cGFja2FnZS55bWwKdGVtcGxhdGVzCnZhbHVlcy55bWwK"
}'
响应结构
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 805

{
  "apiVersion" : "skipper.spring.io/v1",
  "origin" : null,
  "repositoryId" : null,
  "repositoryName" : null,
  "kind" : "SkipperPackageMetadata",
  "name" : "log",
  "displayName" : null,
  "version" : "1.0.0",
  "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
  "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
  "tags" : "logging, sink",
  "maintainer" : "https://github.com/sobychacko",
  "description" : "The log sink uses the application logger to output the data for inspection.",
  "sha256" : null,
  "iconUrl" : null,
  "links" : [ {
    "rel" : "install",
    "href" : "http://localhost:7577/api/package/install"
  }, {
    "rel" : "install",
    "href" : "http://localhost:7577/api/package/install/{id}"
  } ]
}
响应字段
路径 类型 描述

apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库 nane。spring-doc.cn

kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

displayNamespring-doc.cn

Nullspring-doc.cn

包的显示名称spring-doc.cn

versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

30.5.2. 安装

该链接可以将包(由 标识)安装到目标平台中。installInstallRequestspring-doc.cn

请求结构
POST /api/package/install HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 296
Host: localhost:7577

{
  "packageIdentifier" : {
    "repositoryName" : "notused",
    "packageName" : "log",
    "packageVersion" : "1.0.0"
  },
  "installProperties" : {
    "releaseName" : "test",
    "configValues" : {
      "raw" : "config2: value2\nconfig1: value1\n"
    },
    "platformName" : "default"
  }
}
示例请求
$ curl 'http://localhost:7577/api/package/install' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "packageIdentifier" : {
    "repositoryName" : "notused",
    "packageName" : "log",
    "packageVersion" : "1.0.0"
  },
  "installProperties" : {
    "releaseName" : "test",
    "configValues" : {
      "raw" : "config2: value2\nconfig1: value1\n"
    },
    "platformName" : "default"
  }
}'
响应结构
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2624

{
  "name" : "test",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 IDspring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.5.3. 使用 ID 安装

该链接可以将由其 ID 标识的软件包安装到目标平台中。installspring-doc.cn

请求结构
POST /api/package/install/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 162
Host: localhost:7577

{
  "releaseName" : "myLogReleaseWithInstallProperties",
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "platformName" : "default"
}
示例请求
$ curl 'http://localhost:7577/api/package/install/1' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "releaseName" : "myLogReleaseWithInstallProperties",
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "platformName" : "default"
}'
响应结构
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2633

{
  "name" : "myLogRelease2",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 IDspring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.6. 存储库

Repositories 资源是从 Spring Data Repository 导出的(是的,这是一个有趣的名字),并由 Spring Data REST 公开。RepositoryRepositoryspring-doc.cn

30.6.1. 查找全部

请求返回所有 Spring Cloud Skipper 存储库的分页列表。GETspring-doc.cn

请求结构
GET /api/repositories?page=0&size=10 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/repositories?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 1288

{
  "_embedded" : {
    "repositories" : [ {
      "name" : "test",
      "url" : "classpath:/repositories/binaries/test",
      "sourceUrl" : null,
      "local" : false,
      "description" : "test repository with a few packages",
      "repoOrder" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/repositories/1"
        },
        "repository" : {
          "href" : "http://localhost:7577/api/repositories/1"
        }
      }
    }, {
      "name" : "local",
      "url" : "http://localhost:7577",
      "sourceUrl" : null,
      "local" : true,
      "description" : "Default local database backed repository",
      "repoOrder" : null,
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/repositories/2"
        },
        "repository" : {
          "href" : "http://localhost:7577/api/repositories/2"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/repositories"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/repositories"
    },
    "search" : {
      "href" : "http://localhost:7577/api/repositories/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}
响应字段
路径 类型 描述

pagespring-doc.cn

Objectspring-doc.cn

分页属性spring-doc.cn

page.sizespring-doc.cn

Numberspring-doc.cn

返回的页面大小spring-doc.cn

page.totalElementsspring-doc.cn

Numberspring-doc.cn

可用于分页的元素总数spring-doc.cn

page.totalPagesspring-doc.cn

Numberspring-doc.cn

总页数spring-doc.cn

page.numberspring-doc.cn

Numberspring-doc.cn

返回的页面的页码(从 0 开始)spring-doc.cn

_embedded.repositoriesspring-doc.cn

Arrayspring-doc.cn

包含存储库的集合spring-doc.cn

_embedded.repositories[].namespring-doc.cn

Stringspring-doc.cn

存储库的名称spring-doc.cn

_embedded.repositories[].urlspring-doc.cn

Stringspring-doc.cn

存储库的 URLspring-doc.cn

_embedded.repositories[].sourceUrlspring-doc.cn

Nullspring-doc.cn

存储库的源 URLspring-doc.cn

_embedded.repositories[].descriptionspring-doc.cn

Stringspring-doc.cn

存储库描述spring-doc.cn

_embedded.repositories[].localspring-doc.cn

Booleanspring-doc.cn

存储库是本地的吗?spring-doc.cn

_embedded.repositories[].repoOrderspring-doc.cn

Nullspring-doc.cn

存储库的顺序spring-doc.cn

30.6.2. 按名称查找

请求返回单个 Spring Cloud Skipper 存储库。GETspring-doc.cn

请求结构
GET /api/repositories/search/findByName?name=local HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/repositories/search/findByName?name=local' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
ETag: "0"
Content-Type: application/hal+json
Content-Length: 366

{
  "name" : "local",
  "url" : "http://localhost:7577",
  "sourceUrl" : null,
  "local" : true,
  "description" : "Default local database backed repository",
  "repoOrder" : null,
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/repositories/2"
    },
    "repository" : {
      "href" : "http://localhost:7577/api/repositories/2"
    }
  }
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

存储库的名称spring-doc.cn

urlspring-doc.cn

Stringspring-doc.cn

存储库的 URLspring-doc.cn

descriptionspring-doc.cn

Stringspring-doc.cn

存储库描述spring-doc.cn

localspring-doc.cn

Booleanspring-doc.cn

存储库是本地的吗?spring-doc.cn

repoOrderspring-doc.cn

Nullspring-doc.cn

存储库的顺序spring-doc.cn

sourceUrlspring-doc.cn

Nullspring-doc.cn

仓库的源 URLspring-doc.cn

30.7. 发行版

资源从 Spring Data Repository 导出,并由 Spring Data REST 公开。releaseReleaseRepositoryspring-doc.cn

30.7.1. 查找全部

请求返回所有 Spring Cloud Skipper 版本的分页列表。GETspring-doc.cn

请求结构
GET /api/releases?page=0&size=10 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/releases?page=0&size=10' -i -X GET
响应结构
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/hal+json
Content-Length: 3321

{
  "_embedded" : {
    "releases" : [ {
      "name" : "test",
      "version" : 1,
      "info" : {
        "status" : {
          "statusCode" : "DELETED",
          "platformStatus" : null
        },
        "firstDeployed" : null,
        "lastDeployed" : null,
        "deleted" : null,
        "description" : null
      },
      "pkg" : {
        "metadata" : {
          "apiVersion" : "skipper.spring.io/v1",
          "origin" : null,
          "repositoryId" : null,
          "repositoryName" : null,
          "kind" : "SkipperPackageMetadata",
          "name" : "log",
          "displayName" : null,
          "version" : "1.0.0",
          "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
          "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
          "tags" : "logging, sink",
          "maintainer" : "https://github.com/sobychacko",
          "description" : "The log sink uses the application logger to output the data for inspection.",
          "sha256" : null,
          "iconUrl" : null
        },
        "templates" : [ {
          "name" : "log.yml",
          "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
        } ],
        "dependencies" : [ ],
        "configValues" : {
          "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
        },
        "fileHolders" : [ ]
      },
      "configValues" : {
        "raw" : "config2: value2\nconfig1: value1\n"
      },
      "manifest" : {
        "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
      },
      "platformName" : "default",
      "_links" : {
        "self" : {
          "href" : "http://localhost:7577/api/releases/8"
        },
        "release" : {
          "href" : "http://localhost:7577/api/releases/8"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:7577/api/releases"
    },
    "profile" : {
      "href" : "http://localhost:7577/api/profile/releases"
    },
    "search" : {
      "href" : "http://localhost:7577/api/releases/search"
    }
  },
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}
响应字段
路径 类型 描述

pagespring-doc.cn

Objectspring-doc.cn

分页属性spring-doc.cn

page.sizespring-doc.cn

Numberspring-doc.cn

返回的页面大小spring-doc.cn

page.totalElementsspring-doc.cn

Numberspring-doc.cn

可用于分页的元素总数spring-doc.cn

page.totalPagesspring-doc.cn

Numberspring-doc.cn

总页数spring-doc.cn

page.numberspring-doc.cn

Numberspring-doc.cn

返回的页面的页码(从 0 开始)spring-doc.cn

_embedded.releases[].namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

_embedded.releases[].versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

_embedded.releases[].info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

_embedded.releases[].info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

_embedded.releases[].info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

_embedded.releases[].info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

_embedded.releases[].info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

_embedded.releases[].info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

_embedded.releases[].platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

_embedded.releases[].pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

_embedded.releases[].pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

_embedded.releases[].pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 IDspring-doc.cn

_embedded.releases[].pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.releases[].pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

_embedded.releases[].pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.releases[].pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

_embedded.releases[].pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.releases[].pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

_embedded.releases[].pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

_embedded.releases[].pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

_embedded.releases[].pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

_embedded.releases[].pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.releases[].pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

_embedded.releases[].pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

_embedded.releases[].pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

_embedded.releases[].pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

_embedded.releases[].pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

_embedded.releases[].pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

_embedded.releases[].pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

_embedded.releases[].configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

_embedded.releases[].manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

_embedded.releases[].platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.8. 发布

Release 资源映射到 ReleaseController 上,用于管理发布的生命周期。spring-doc.cn

30.8.1. 列表

列出最新

该链接可以列出状态为 deployed 或 failed 的最新版本的版本。listspring-doc.cn

请求结构
GET /api/release/list HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/list' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2913

{
  "_embedded" : {
    "releases" : [ {
      "name" : "test",
      "version" : 1,
      "info" : {
        "status" : {
          "statusCode" : "DELETED",
          "platformStatus" : null
        },
        "firstDeployed" : null,
        "lastDeployed" : null,
        "deleted" : null,
        "description" : null
      },
      "pkg" : {
        "metadata" : {
          "apiVersion" : "skipper.spring.io/v1",
          "origin" : null,
          "repositoryId" : null,
          "repositoryName" : null,
          "kind" : "SkipperPackageMetadata",
          "name" : "log",
          "displayName" : null,
          "version" : "1.0.0",
          "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
          "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
          "tags" : "logging, sink",
          "maintainer" : "https://github.com/sobychacko",
          "description" : "The log sink uses the application logger to output the data for inspection.",
          "sha256" : null,
          "iconUrl" : null
        },
        "templates" : [ {
          "name" : "log.yml",
          "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
        } ],
        "dependencies" : [ ],
        "configValues" : {
          "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
        },
        "fileHolders" : [ ]
      },
      "configValues" : {
        "raw" : "config2: value2\nconfig1: value1\n"
      },
      "manifest" : {
        "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
      },
      "platformName" : "default",
      "_links" : {
        "status" : {
          "href" : "http://localhost:7577/api/release/status/{name}",
          "templated" : true
        }
      }
    } ]
  }
}
响应字段
路径 类型 描述

_embedded.releases[].namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

_embedded.releases[].versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

_embedded.releases[].info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

_embedded.releases[].info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

_embedded.releases[].info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

_embedded.releases[].info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

_embedded.releases[].info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

_embedded.releases[].info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

_embedded.releases[].pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

_embedded.releases[].pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

_embedded.releases[].pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 IDspring-doc.cn

_embedded.releases[].pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.releases[].pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

_embedded.releases[].pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.releases[].pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

_embedded.releases[].pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.releases[].pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

_embedded.releases[].pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

_embedded.releases[].pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

_embedded.releases[].pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

_embedded.releases[].pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.releases[].pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

_embedded.releases[].pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

_embedded.releases[].pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

_embedded.releases[].pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

_embedded.releases[].pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

_embedded.releases[].pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

_embedded.releases[].pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

_embedded.releases[].configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

_embedded.releases[].manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

_embedded.releases[].platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

按名称列出最新内容

该链接可以列出最新版本的版本,其状态为 deployed 或 failed。 给定的版本名称。listspring-doc.cn

请求结构
GET /api/release/list/test HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/list/test' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2913

{
  "_embedded" : {
    "releases" : [ {
      "name" : "test",
      "version" : 1,
      "info" : {
        "status" : {
          "statusCode" : "DELETED",
          "platformStatus" : null
        },
        "firstDeployed" : null,
        "lastDeployed" : null,
        "deleted" : null,
        "description" : null
      },
      "pkg" : {
        "metadata" : {
          "apiVersion" : "skipper.spring.io/v1",
          "origin" : null,
          "repositoryId" : null,
          "repositoryName" : null,
          "kind" : "SkipperPackageMetadata",
          "name" : "log",
          "displayName" : null,
          "version" : "1.0.0",
          "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
          "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
          "tags" : "logging, sink",
          "maintainer" : "https://github.com/sobychacko",
          "description" : "The log sink uses the application logger to output the data for inspection.",
          "sha256" : null,
          "iconUrl" : null
        },
        "templates" : [ {
          "name" : "log.yml",
          "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
        } ],
        "dependencies" : [ ],
        "configValues" : {
          "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
        },
        "fileHolders" : [ ]
      },
      "configValues" : {
        "raw" : "config2: value2\nconfig1: value1\n"
      },
      "manifest" : {
        "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
      },
      "platformName" : "default",
      "_links" : {
        "status" : {
          "href" : "http://localhost:7577/api/release/status/{name}",
          "templated" : true
        }
      }
    } ]
  }
}
响应字段
路径 类型 描述

_embedded.releases[].namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

_embedded.releases[].versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

_embedded.releases[].info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

_embedded.releases[].info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

_embedded.releases[].info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

_embedded.releases[].info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

_embedded.releases[].info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

_embedded.releases[].info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

_embedded.releases[].pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

_embedded.releases[].pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

_embedded.releases[].pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 IDspring-doc.cn

_embedded.releases[].pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

_embedded.releases[].pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

_embedded.releases[].pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

_embedded.releases[].pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

_embedded.releases[].pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

_embedded.releases[].pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

_embedded.releases[].pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

_embedded.releases[].pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

_embedded.releases[].pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

_embedded.releases[].pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

_embedded.releases[].pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

_embedded.releases[].pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

_embedded.releases[].pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

_embedded.releases[].pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

_embedded.releases[].pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

_embedded.releases[].pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

_embedded.releases[].pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

_embedded.releases[].configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

_embedded.releases[].manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

_embedded.releases[].platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.8.2. 状态

获取发布状态

REST 端点提供最后一个已知发行版的状态。statusspring-doc.cn

请求结构
GET /api/release/status/test HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/status/test' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 313

{
  "status" : {
    "statusCode" : "DELETED",
    "platformStatus" : null
  },
  "firstDeployed" : null,
  "lastDeployed" : null,
  "deleted" : null,
  "description" : null,
  "_links" : {
    "manifest" : {
      "href" : "http://localhost:7577/api/release/manifest/{name}",
      "templated" : true
    }
  }
}
响应字段
路径 类型 描述

status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

按版本划分的状态

REST 端点可以提供特定发行版的状态。statusspring-doc.cn

请求结构
GET /api/release/status/test/1 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/status/test/1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 313

{
  "status" : {
    "statusCode" : "DELETED",
    "platformStatus" : null
  },
  "firstDeployed" : null,
  "lastDeployed" : null,
  "deleted" : null,
  "description" : null,
  "_links" : {
    "manifest" : {
      "href" : "http://localhost:7577/api/release/manifest/{name}",
      "templated" : true
    }
  }
}
响应字段
路径 类型 描述

status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

30.8.3. 升级

升级版本

升级链接使用从 .UpgradeRequestspring-doc.cn

请求结构
POST /api/release/upgrade HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 269
Host: localhost:7577

{
  "packageIdentifier" : {
    "packageName" : "log",
    "packageVersion" : "1.1.0"
  },
  "upgradeProperties" : {
    "releaseName" : "test",
    "configValues" : {
      "raw" : "config2: value2\nconfig1: value1\n"
    }
  },
  "force" : false,
  "appNames" : [ ]
}
示例请求
$ curl 'http://localhost:7577/api/release/upgrade' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "packageIdentifier" : {
    "packageName" : "log",
    "packageVersion" : "1.1.0"
  },
  "upgradeProperties" : {
    "releaseName" : "test",
    "configValues" : {
      "raw" : "config2: value2\nconfig1: value1\n"
    }
  },
  "force" : false,
  "appNames" : [ ]
}'
响应结构
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2624

{
  "name" : "test",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.8.4. 回滚

使用 uri 变量回滚版本

回滚链接将发行版回滚到以前的发行版或特定发行版。spring-doc.cn

这部分 api 已废弃,请使用 使用 request 对象的 Rollback releasespring-doc.cn

请求结构
POST /api/release/rollback/test/1 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/rollback/test/1' -i -X POST
响应结构
HTTP/1.1 201 Created
Content-Type: application/hal+json
Content-Length: 2650

{
  "name" : "test",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "_links" : {
    "status" : {
      "href" : "http://localhost:7577/api/release/status/{name}",
      "templated" : true
    }
  }
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

使用请求对象回滚发布

回滚链接将发行版回滚到以前的发行版或特定发行版。spring-doc.cn

请求结构
POST /api/release/rollback HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 66
Host: localhost:7577

{
  "releaseName" : "test",
  "version" : 1,
  "timeout" : 60000
}
示例请求
$ curl 'http://localhost:7577/api/release/rollback' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "releaseName" : "test",
  "version" : 1,
  "timeout" : 60000
}'
响应结构
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 2624

{
  "name" : "test",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.8.5. 清单

获取清单

REST 终端节点返回最后一个已知发行版的清单。manifestspring-doc.cn

请求结构
GET /api/release/manifest/test HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/manifest/test' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 610

{
  "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
按版本获取清单

REST 终端节点可以返回特定发行版的清单。manifestspring-doc.cn

请求结构
GET /api/release/manifest/test/1 HTTP/1.1
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/manifest/test/1' -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 636

{
  "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n",
  "_links" : {
    "status" : {
      "href" : "http://localhost:7577/api/release/status/{name}",
      "templated" : true
    }
  }
}

30.8.6. 删除

删除发行版

您可以使用请求删除现有发行版。 删除操作不会卸载与发行版对应的已上传包。DELETEspring-doc.cn

请求结构
DELETE /api/release/test HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/test' -i -X DELETE \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2624

{
  "name" : "test",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

删除发行版并卸载包

您可以使用 DELETE 请求删除现有版本并卸载与该版本对应的软件包,前提是没有其他处于活动状态的版本使用这些软件包。spring-doc.cn

请求结构
DELETE /api/release/test/package HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:7577
示例请求
$ curl 'http://localhost:7577/api/release/test/package' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2624

{
  "name" : "test",
  "version" : 1,
  "info" : {
    "status" : {
      "statusCode" : "DELETED",
      "platformStatus" : null
    },
    "firstDeployed" : null,
    "lastDeployed" : null,
    "deleted" : null,
    "description" : null
  },
  "pkg" : {
    "metadata" : {
      "apiVersion" : "skipper.spring.io/v1",
      "origin" : null,
      "repositoryId" : null,
      "repositoryName" : null,
      "kind" : "SkipperPackageMetadata",
      "name" : "log",
      "displayName" : null,
      "version" : "1.0.0",
      "packageSourceUrl" : "https://github.com/spring-cloud-stream-app-starters/log/tree/v1.2.0.RC1",
      "packageHomeUrl" : "https://cloud.spring.io/spring-cloud-stream-app-starters/",
      "tags" : "logging, sink",
      "maintainer" : "https://github.com/sobychacko",
      "description" : "The log sink uses the application logger to output the data for inspection.",
      "sha256" : null,
      "iconUrl" : null
    },
    "templates" : [ {
      "name" : "log.yml",
      "data" : "apiVersion: skipper.spring.io/v1\nkind: SpringCloudDeployerApplication\nmetadata:\n  name: log\n  type: sink\nspec:\n  resource: maven://org.springframework.cloud.stream.app:log-sink-rabbit\n  resourceMetadata: maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:{{version}}\n  version: {{version}}\n  applicationProperties:\n    server.port: 0\n    {{#spec.applicationProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.applicationProperties.entrySet}}\n  deploymentProperties:\n    {{#spec.deploymentProperties.entrySet}}\n    {{key}}: {{value}}\n    {{/spec.deploymentProperties.entrySet}}\n"
    } ],
    "dependencies" : [ ],
    "configValues" : {
      "raw" : "# Default values for {{name}}\n# This is a YAML-formatted file.\n# Declare variables to be passed into your templates\nversion: 1.2.0.RC1\n"
    },
    "fileHolders" : [ ]
  },
  "configValues" : {
    "raw" : "config2: value2\nconfig1: value1\n"
  },
  "manifest" : {
    "data" : "\"apiVersion\": \"skipper.spring.io/v1\"\n\"kind\": \"SpringCloudDeployerApplication\"\n\"metadata\":\n  \"name\": \"log\"\n  \"type\": \"sink\"\n\"spec\":\n  \"resource\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit\"\n  \"resourceMetadata\": \"maven://org.springframework.cloud.stream.app:log-sink-rabbit:jar:metadata:1.2.0.RC1\"\n  \"version\": \"1.2.0.RC1\"\n  \"applicationProperties\":\n    \"server.port\": \"0\"\n  \"deploymentProperties\": !!null \"null\"\n"
  },
  "platformName" : "default",
  "links" : [ {
    "rel" : "status",
    "href" : "http://localhost:7577/api/release/status/{name}"
  } ]
}
响应字段
路径 类型 描述

namespring-doc.cn

Stringspring-doc.cn

版本名称spring-doc.cn

versionspring-doc.cn

Numberspring-doc.cn

版本版本spring-doc.cn

info.status.statusCodespring-doc.cn

Stringspring-doc.cn

发布状态的 StatusCode (UNKNOWN、DEPLOYED、DELETED、FAILED)spring-doc.cn

info.status.platformStatusspring-doc.cn

Nullspring-doc.cn

来自底层平台的状态spring-doc.cn

info.firstDeployedspring-doc.cn

Nullspring-doc.cn

首次部署的日期/时间spring-doc.cn

info.lastDeployedspring-doc.cn

Nullspring-doc.cn

上次部署的日期/时间spring-doc.cn

info.deletedspring-doc.cn

Nullspring-doc.cn

删除发布的日期/时间spring-doc.cn

info.descriptionspring-doc.cn

Nullspring-doc.cn

关于此版本的人性化“日志条目”spring-doc.cn

pkg.metadata.apiVersionspring-doc.cn

Stringspring-doc.cn

此文件所基于的 Package Index spec 版本spring-doc.cn

pkg.metadata.originspring-doc.cn

Nullspring-doc.cn

指示存储库的来源(自由格式文本)spring-doc.cn

pkg.metadata.repositoryIdspring-doc.cn

Nullspring-doc.cn

此包所属的存储库 ID。spring-doc.cn

pkg.metadata.repositoryNamespring-doc.cn

Nullspring-doc.cn

此 Package 所属的存储库名称。spring-doc.cn

pkg.metadata.kindspring-doc.cn

Stringspring-doc.cn

正在使用的软件包系统类型spring-doc.cn

pkg.metadata.namespring-doc.cn

Stringspring-doc.cn

包的名称spring-doc.cn

pkg.metadata.displayNamespring-doc.cn

Nullspring-doc.cn

发行版的显示名称spring-doc.cn

pkg.metadata.versionspring-doc.cn

Stringspring-doc.cn

软件包的版本spring-doc.cn

pkg.metadata.packageSourceUrlspring-doc.cn

Stringspring-doc.cn

此包源代码的位置spring-doc.cn

pkg.metadata.packageHomeUrlspring-doc.cn

Stringspring-doc.cn

包的主页spring-doc.cn

pkg.metadata.tagsspring-doc.cn

Stringspring-doc.cn

用于搜索的标记的逗号分隔列表spring-doc.cn

pkg.metadata.maintainerspring-doc.cn

Stringspring-doc.cn

谁在维护此包spring-doc.cn

pkg.metadata.descriptionspring-doc.cn

Stringspring-doc.cn

包装的简要描述spring-doc.cn

pkg.metadata.sha256spring-doc.cn

Nullspring-doc.cn

将使用 SHA256 哈希算法下载的软件包二进制文件的哈希值spring-doc.cn

pkg.metadata.iconUrlspring-doc.cn

Nullspring-doc.cn

图标的 URL 位置spring-doc.cn

pkg.templates[].namespring-doc.cn

Stringspring-doc.cn

Name 是模板的路径式名称spring-doc.cn

pkg.templates[].dataspring-doc.cn

Stringspring-doc.cn

data 是作为字符串数据的模板spring-doc.cn

pkg.dependenciesspring-doc.cn

Arrayspring-doc.cn

此 package 所依赖的 packagespring-doc.cn

pkg.configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

pkg.fileHoldersspring-doc.cn

Arrayspring-doc.cn

包中的其他文件,例如 README、LICENSE 等。spring-doc.cn

configValues.rawspring-doc.cn

Stringspring-doc.cn

配置值的原始 YAML 字符串spring-doc.cn

manifest.dataspring-doc.cn

Stringspring-doc.cn

发行版的清单spring-doc.cn

platformNamespring-doc.cn

Stringspring-doc.cn

版本的平台名称spring-doc.cn

30.8.7. 取消

取消发布

您可以使用请求取消现有的发布操作。POSTspring-doc.cn

请求结构
POST /api/release/cancel HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 36
Host: localhost:7577

{
  "releaseName" : "myLogRelease"
}
示例请求
$ curl 'http://localhost:7577/api/release/cancel' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Accept: application/json' \
    -d '{
  "releaseName" : "myLogRelease"
}'
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 23

{
  "accepted" : true
}
响应字段
路径 类型 描述

acceptedspring-doc.cn

Booleanspring-doc.cn

如果接受了取消请求spring-doc.cn