Service Center API

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
More information: https://helloreverb.com
Contact Info: hello@helloreverb.com
Version: 3.0.0
BasePath:
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Base

Dependency

Instances

Microservices

Rule

Schema

Schemas

Tag

Base

Up
get /health
(healthGet)
查询服务中心集群信息。

Return type

GetInstancesResponse

Example data

Content-Type: application/json
{
  "instances" : [ {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "serviceId" : "aeiou",
    "modTimestamp" : "aeiou",
    "properties" : { },
    "status" : "aeiou",
    "timestamp" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

服务中心实例集群信息列表 GetInstancesResponse

400

错误的请求 String

500

内部错误 String

Up
get /version
(versionGet)
查询服务中心版本信息。

Return type

Version

Example data

Content-Type: application/json
{
  "apiVersion" : "aeiou",
  "buildTag" : "aeiou",
  "version" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

版本信息结构体 Version

400

错误的请求 String

500

内部错误 String

Dependency

Up
put /registry/v3/dependencies
(createDependenciesForMircServices)
创建服务间的依赖关系,consumer的version必须是确定的版本,serviceName不能为*,consumer必须是已存在的服务,provider可以是还未创建的。

Request body

Body Parameter — 创建服务间的依赖关系的请求体。

Request headers

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

创建成功 String

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{consumerId}/providers
(getConsumerDependencies)
根据consumerId获取该服务的所有providers

Path parameters

consumerId (required)
Path Parameter — 消费者的服务id。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetConDependenciesResponse

Example data

Content-Type: application/json
{
  "dependency" : [ {
    "Providers" : {
      "level" : "aeiou",
      "description" : "aeiou",
      "serviceName" : "aeiou",
      "modTimestamp" : "aeiou",
      "version" : "aeiou",
      "LBStrategy" : "",
      "paths" : [ {
        "Path" : "aeiou",
        "Property" : { }
      } ],
      "appId" : "aeiou",
      "schemas" : [ "aeiou" ],
      "serviceId" : "aeiou",
      "providers" : [ {
        "stage" : "aeiou",
        "appId" : "aeiou",
        "serviceName" : "aeiou",
        "version" : "aeiou"
      } ],
      "properties" : "",
      "status" : "UP",
      "timestamp" : "aeiou"
    }
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetConDependenciesResponse

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{providerId}/consumers
(getProviderDependencies)
根据providerId获取该服务的所有consumers

Path parameters

providerId (required)
Path Parameter — 提供者的服务id。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetProDependenciesResponse

Example data

Content-Type: application/json
{
  "dependency" : [ {
    "Consumers" : {
      "level" : "aeiou",
      "description" : "aeiou",
      "serviceName" : "aeiou",
      "modTimestamp" : "aeiou",
      "version" : "aeiou",
      "LBStrategy" : "",
      "paths" : [ {
        "Path" : "aeiou",
        "Property" : { }
      } ],
      "appId" : "aeiou",
      "schemas" : [ "aeiou" ],
      "serviceId" : "aeiou",
      "providers" : [ {
        "stage" : "aeiou",
        "appId" : "aeiou",
        "serviceName" : "aeiou",
        "version" : "aeiou"
      } ],
      "properties" : "",
      "status" : "UP",
      "timestamp" : "aeiou"
    }
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetProDependenciesResponse

400

错误的请求 String

500

内部错误 String

Instances

Up
get /registry/v3/instances
(find)
实例注册后可以根据微服务版本规则或字段条件 发现该微服务的实例。

Request headers

Query parameters

appId (required)
Query Parameter — 应用app唯一标识。
serviceName (required)
Query Parameter — 微服务名称。
version (required)
Query Parameter — 版本规则:1.精确版本匹配 2.后续版本匹配 3.最新版本 4.版本范围
tags (optional)
Query Parameter — Tag标签过滤,多个时逗号分隔。
env (optional)
Query Parameter — 实例的environment。
noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetInstancesResponse

Example data

Content-Type: application/json
{
  "instances" : [ {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "serviceId" : "aeiou",
    "modTimestamp" : "aeiou",
    "properties" : { },
    "status" : "aeiou",
    "timestamp" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetInstancesResponse

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/instances
(getInstances)
实例注册后可以根据 service_id 发现该微服务的所有实例。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

tags (optional)
Query Parameter — Tag标签过滤,多个时逗号分隔。
env (optional)
Query Parameter — 实例的environment。
noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetInstancesResponse

Example data

Content-Type: application/json
{
  "instances" : [ {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "serviceId" : "aeiou",
    "modTimestamp" : "aeiou",
    "properties" : { },
    "status" : "aeiou",
    "timestamp" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetInstancesResponse

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/instances/{instanceId}
(getOneInstance)
实例注册后可以根据 service_id和serviceId获取该实例的详细信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
instanceId (required)
Path Parameter — 实例唯一标识。

Request headers

Query parameters

tags (optional)
Query Parameter — Tag标签过滤,多个时逗号分隔。
env (optional)
Query Parameter — 实例的environment。
noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetOneInstanceResponse

Example data

Content-Type: application/json
{
  "instance" : {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "serviceId" : "aeiou",
    "modTimestamp" : "aeiou",
    "properties" : { },
    "status" : "aeiou",
    "timestamp" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetOneInstanceResponse

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/instances/{instanceId}/heartbeat
(heartbeat)
服务提供端需要向服务中心发送心跳信息,以保证服务中心知道服务实例是否健康。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
instanceId (required)
Path Parameter — 微服务实例唯一标识。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

更新成功

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/heartbeats
(heartbeatSet)
服务提供端需要向服务中心发送心跳信息,以保证服务中心知道服务实例是否健康。该接口为批量接口

Request body

Instances HeartbeatSetRequest (required)
Body Parameter — 批量上报心跳的实例的标识。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

更新成功

400

错误的请求 InstancesHbRst

500

内部错误 String

Up
post /registry/v3/microservices/{serviceId}/instances
(register)
创建微服务后就可以注册该微服务的实例了。 注册微服务实例时,需提供该微服务实例相关的信息。 instanceID可定制,如果定制了,再次注册就直接全内容覆盖。如果没定制,逻辑如下:系统自动生成id,如果endpoints内容重复,则使用原来的id

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request body

instance CreateInstance (required)
Body Parameter — 微服务实例请求结构体。

Request headers

Return type

CreateInstanceResponse

Example data

Content-Type: application/json
{
  "instanceId" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

注册成功 CreateInstanceResponse

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}/instances/{instanceId}
(unregister)
实例注册后可以根据 instance_id 进行实例注销。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
instanceId (required)
Path Parameter — 微服务实例唯一标识。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

注销成功

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/instances/{instanceId}/properties
(updateInstanceProperties)
实例注册后可以根据 instance_id 进行添加/更新一个微服务实例扩展信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
instanceId (required)
Path Parameter — 微服务实例唯一标识。

Request body

properties UpdateProperties (required)
Body Parameter — 微服务实例扩展属性请求结构体。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/instances/{instanceId}/status
(updateStatus)
实例注册后可以根据 instance_id 进行更新一个微服务实例状态。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
instanceId (required)
Path Parameter — 微服务实例唯一标识。

Request headers

Query parameters

value (required)
Query Parameter — 实例状态: UP在线,OUTOFSERVICE摘机,STARTING正在启动,DOWN下线,TESTING拨测状态。

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功

400

错误的请求 String

500

内部错误 String

Microservices

Up
post /registry/v3/microservices/{serviceId}/rules
(addRule)
为serviceId的服务新增黑白名单,同一服务,attribute和pattern唯一标识一份黑白名单。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request body

rules AddRules (required)
Body Parameter — 新增黑白名单。

Request headers

Return type

AddRuleResponse

Example data

Content-Type: application/json
{
  "RuleIds" : [ "aeiou" ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

创建成功 AddRuleResponse

400

错误的请求 String

500

内部错误 String

Up
post /registry/v3/microservices/{serviceId}/tags
(addTags)
为serviceId的微服务创建tag。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request body

tags Tags (required)
Body Parameter — 要创建的tags。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

创建成功

400

错误的请求 String

500

内部错误 String

Up
post /registry/v3/microservices
(create)
在注册微服务实例前需要创建服务静态信息,之后注册的微服务实例根据service id这个字段与静态信息关联,一个服务对应对多个实例。

Request body

service CreateMicroService (required)
Body Parameter — 创建微服务请求结构体。

Request headers

Return type

CreateMicroServiceResponse

Example data

Content-Type: application/json
{
  "serviceId" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

创建成功 CreateMicroServiceResponse

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}
(delete)
删除一个微服务定义及其相关信息,同时注销其所有实例信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

force (optional)
Query Parameter — 不传即默认为false。 强制删除,则与该服务相关的信息删除,非强制删除: 如果作为该被依赖(作为provider,提供服务,且不是只存在自依赖)或者存在实例,则不能删除,其它均删除。

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}/rules/{rule_id}
(deleteRule)
为serviceId的服务删除黑白名单。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
rule_id (required)
Path Parameter — ruleId。

Request headers

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

删除成功 String

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}/schemas/{schemaId}
(deleteSchema)
删除微服务的一个schema信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
schemaId (required)
Path Parameter — 微服务契约唯一标识。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

删除成功

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices
(deleteServices)
批量删除指定的微服务定义及其相关信息,同时注销其所有实例信息。

Request body

serviceIds DelServicesRequest (required)
Body Parameter — 批量删除服务的服务ID列表

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

更新成功

400

错误的请求 DelServicesResponse

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}/tags/{key}
(deleteTags)
为serviceId的微服务删除tags

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
key (required)
Path Parameter — 要删除的tag的key值,多个key的话,以,隔开。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

删除成功

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/existence
(exist)
可通过指定条件,查询微服务serviceId或schema的唯一标识信息。

Request headers

Query parameters

type (required)
Query Parameter — 资源类型 microservice微服务 schema微服务访问契约。
appId (required)
Query Parameter — 资源类型为 microservice时 需传入应用app唯一标识。
serviceName (required)
Query Parameter — 资源类型为 microservice时 需传入微服务名称。
version (required)
Query Parameter — 资源类型为 microservice时 需传入微服务版本。
serviceId (required)
Query Parameter — 资源类型为 schema时 需传入微服务唯一标识。
schemaId (required)
Query Parameter — 资源类型为 schema时 需传入schema唯一标识。
noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetResourceResponse

Example data

Content-Type: application/json
{
  "schemaId" : "aeiou",
  "serviceId" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetResourceResponse

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}
(getOne)
根据serviceId查询微服务定义信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

CreateMicroService

Example data

Content-Type: application/json
{
  "instances" : [ {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "properties" : "",
    "status" : "aeiou"
  } ],
  "service" : {
    "level" : "aeiou",
    "description" : "aeiou",
    "serviceName" : "aeiou",
    "modTimestamp" : "aeiou",
    "version" : "aeiou",
    "LBStrategy" : "",
    "paths" : [ {
      "Path" : "aeiou",
      "Property" : { }
    } ],
    "appId" : "aeiou",
    "schemas" : [ "aeiou" ],
    "serviceId" : "aeiou",
    "providers" : [ {
      "stage" : "aeiou",
      "appId" : "aeiou",
      "serviceName" : "aeiou",
      "version" : "aeiou"
    } ],
    "properties" : "",
    "status" : "UP",
    "timestamp" : "aeiou"
  },
  "rules" : [ {
    "ruleType" : "aeiou",
    "pattern" : "aeiou",
    "description" : "aeiou",
    "attribute" : "aeiou",
    "ruleId" : "aeiou",
    "modTimestamp" : "aeiou",
    "timestamp" : "aeiou"
  } ],
  "tags" : {
    "tags" : ""
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

微服务结构体 CreateMicroService

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/rules
(getRule)
获取serviceId的服务的黑白名单信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

Rules

Example data

Content-Type: application/json
{
  "rules" : [ {
    "ruleType" : "aeiou",
    "pattern" : "aeiou",
    "description" : "aeiou",
    "attribute" : "aeiou",
    "ruleId" : "aeiou",
    "modTimestamp" : "aeiou",
    "timestamp" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 Rules

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/schemas/{schemaId}
(getSchemaInfo)
根据serviceId和schemaId查询微服务的schema信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
schemaId (required)
Path Parameter — 微服务契约唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

CreateSchema

Example data

Content-Type: application/json
{
  "schema" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 CreateSchema

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices
(getServices)
根据条件组合,查询满足所有条件的微服务定义信息。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetMicroServicesResponse

Example data

Content-Type: application/json
{
  "services" : [ {
    "level" : "aeiou",
    "description" : "aeiou",
    "serviceName" : "aeiou",
    "modTimestamp" : "aeiou",
    "version" : "aeiou",
    "LBStrategy" : "",
    "paths" : [ {
      "Path" : "aeiou",
      "Property" : { }
    } ],
    "appId" : "aeiou",
    "schemas" : [ "aeiou" ],
    "serviceId" : "aeiou",
    "providers" : [ {
      "stage" : "aeiou",
      "appId" : "aeiou",
      "serviceName" : "aeiou",
      "version" : "aeiou"
    } ],
    "properties" : "",
    "status" : "UP",
    "timestamp" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetMicroServicesResponse

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/tags
(getTags)
获取serviceId的微服务的tag

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

Tags

Example data

Content-Type: application/json
{
  "tags" : { }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 Tags

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/schemas/{schemaId}
(modifySchema)
根据schemaId更新微服务的访问契约内容。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
schemaId (required)
Path Parameter — 微服务契约唯一标识。

Request body

schema CreateSchema (required)
Body Parameter — 微服务契约内容。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功

400

错误的请求 String

500

内部错误 String

Up
post /registry/v3/microservices/{serviceId}/schemas
(modifySchemas)
批量上传schemas。

Path parameters

serviceId (required)
Path Parameter — 唯一标识。

Request body

type ModifySchemasRequest (required)
Body Parameter — 批量上传schemas信息。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

創建成功

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/listwatcher
(registryV3MicroservicesServiceIdListwatcherGet)
watch成功后返回完整的微服务提供者的实例信息,且服务在心跳消失,注册,注销,状态更新时,将这些变化主动推送到客户端。

Path parameters

serviceId (required)
Path Parameter — 微服务消费者的微服务唯一标识。

Return type

WatchInstanceResponse

Example data

Content-Type: application/json
{
  "instance" : {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "serviceId" : "aeiou",
    "modTimestamp" : "aeiou",
    "properties" : { },
    "status" : "aeiou",
    "timestamp" : "aeiou"
  },
  "action" : "aeiou",
  "key" : {
    "appId" : "aeiou",
    "serviceName" : "aeiou",
    "version" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

推送给watcher实例变化信息 WatchInstanceResponse

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/properties
(updateProperties)
创建微服务静态信息后可对服务部分字段进行更新,每次更新都需要传入完整的服务静态信息json,也就是说,即便不更新部分的字段也要作为json的属性传过去。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request body

properties UpdateProperties (required)
Body Parameter — 微服务扩展属性请求结构体。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/rules/{rule_id}
(updateRule)
为serviceId的服务更新黑白名单。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
rule_id (required)
Path Parameter — ruleId。

Request body

rule AddOrUpdateRule (required)
Body Parameter — 要更新的rule

Request headers

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功 String

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/tags/{key}
(updateTag)
为serviceId的微服务更新key对应的value值

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
key (required)
Path Parameter — 要更新的tag的key值。

Request headers

Query parameters

value (required)
Query Parameter — 要更新的tag的value值。

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

更新成功

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/watcher
(watch)
当服务在心跳消失,注册,注销,状态更新时, 将这些变化主动推送到客户端。

Path parameters

serviceId (required)
Path Parameter — 微服务消费者的微服务唯一标识。

Return type

WatchInstanceResponse

Example data

Content-Type: application/json
{
  "instance" : {
    "hostName" : "aeiou",
    "endpoints" : [ "aeiou" ],
    "environment" : "aeiou",
    "instanceId" : "aeiou",
    "dataCenterInfo" : {
      "availableZone" : "aeiou",
      "name" : "aeiou",
      "region" : "aeiou"
    },
    "healthCheck" : {
      "mode" : "aeiou",
      "times" : 1,
      "port" : 0,
      "interval" : 6
    },
    "serviceId" : "aeiou",
    "modTimestamp" : "aeiou",
    "properties" : { },
    "status" : "aeiou",
    "timestamp" : "aeiou"
  },
  "action" : "aeiou",
  "key" : {
    "appId" : "aeiou",
    "serviceName" : "aeiou",
    "version" : "aeiou"
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

实例变化时,成功推送给watcher的信息 WatchInstanceResponse

400

错误的请求 String

500

内部错误 String

Rule

Up
post /registry/v3/microservices/{serviceId}/rules
(addRule)
为serviceId的服务新增黑白名单,同一服务,attribute和pattern唯一标识一份黑白名单。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request body

rules AddRules (required)
Body Parameter — 新增黑白名单。

Request headers

Return type

AddRuleResponse

Example data

Content-Type: application/json
{
  "RuleIds" : [ "aeiou" ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

创建成功 AddRuleResponse

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}/rules/{rule_id}
(deleteRule)
为serviceId的服务删除黑白名单。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
rule_id (required)
Path Parameter — ruleId。

Request headers

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

删除成功 String

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/rules
(getRule)
获取serviceId的服务的黑白名单信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

Rules

Example data

Content-Type: application/json
{
  "rules" : [ {
    "ruleType" : "aeiou",
    "pattern" : "aeiou",
    "description" : "aeiou",
    "attribute" : "aeiou",
    "ruleId" : "aeiou",
    "modTimestamp" : "aeiou",
    "timestamp" : "aeiou"
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 Rules

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/rules/{rule_id}
(updateRule)
为serviceId的服务更新黑白名单。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
rule_id (required)
Path Parameter — ruleId。

Request body

rule AddOrUpdateRule (required)
Body Parameter — 要更新的rule

Request headers

Return type

String

Example data

Content-Type: application/json
"aeiou"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功 String

400

错误的请求 String

500

内部错误 String

Schema

Up
delete /registry/v3/microservices/{serviceId}/schemas/{schemaId}
(deleteSchema)
删除微服务的一个schema信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
schemaId (required)
Path Parameter — 微服务契约唯一标识。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

删除成功

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/schemas/{schemaId}
(getSchemaInfo)
根据serviceId和schemaId查询微服务的schema信息。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
schemaId (required)
Path Parameter — 微服务契约唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

CreateSchema

Example data

Content-Type: application/json
{
  "schema" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 CreateSchema

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/schemas/{schemaId}
(modifySchema)
根据schemaId更新微服务的访问契约内容。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
schemaId (required)
Path Parameter — 微服务契约唯一标识。

Request body

schema CreateSchema (required)
Body Parameter — 微服务契约内容。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

修改成功

400

错误的请求 String

500

内部错误 String

Up
post /registry/v3/microservices/{serviceId}/schemas
(modifySchemas)
批量上传schemas。

Path parameters

serviceId (required)
Path Parameter — 唯一标识。

Request body

type ModifySchemasRequest (required)
Body Parameter — 批量上传schemas信息。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

創建成功

400

错误的请求 String

500

内部错误 String

Schemas

Up
get /registry/v3/existence
(exist)
可通过指定条件,查询微服务serviceId或schema的唯一标识信息。

Request headers

Query parameters

type (required)
Query Parameter — 资源类型 microservice微服务 schema微服务访问契约。
appId (required)
Query Parameter — 资源类型为 microservice时 需传入应用app唯一标识。
serviceName (required)
Query Parameter — 资源类型为 microservice时 需传入微服务名称。
version (required)
Query Parameter — 资源类型为 microservice时 需传入微服务版本。
serviceId (required)
Query Parameter — 资源类型为 schema时 需传入微服务唯一标识。
schemaId (required)
Query Parameter — 资源类型为 schema时 需传入schema唯一标识。
noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

GetResourceResponse

Example data

Content-Type: application/json
{
  "schemaId" : "aeiou",
  "serviceId" : "aeiou"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 GetResourceResponse

400

错误的请求 String

500

内部错误 String

Tag

Up
post /registry/v3/microservices/{serviceId}/tags
(addTags)
为serviceId的微服务创建tag。

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request body

tags Tags (required)
Body Parameter — 要创建的tags。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

创建成功

400

错误的请求 String

500

内部错误 String

Up
delete /registry/v3/microservices/{serviceId}/tags/{key}
(deleteTags)
为serviceId的微服务删除tags

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
key (required)
Path Parameter — 要删除的tag的key值,多个key的话,以,隔开。

Request headers

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

删除成功

400

错误的请求 String

500

内部错误 String

Up
get /registry/v3/microservices/{serviceId}/tags
(getTags)
获取serviceId的微服务的tag

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。

Request headers

Query parameters

noCache (optional)
Query Parameter — 是否强一致性,1 是、0 否。 default: 0

Return type

Tags

Example data

Content-Type: application/json
{
  "tags" : { }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

查询成功 Tags

400

错误的请求 String

500

内部错误 String

Up
put /registry/v3/microservices/{serviceId}/tags/{key}
(updateTag)
为serviceId的微服务更新key对应的value值

Path parameters

serviceId (required)
Path Parameter — 微服务唯一标识。
key (required)
Path Parameter — 要更新的tag的key值。

Request headers

Query parameters

value (required)
Query Parameter — 要更新的tag的value值。

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

更新成功

400

错误的请求 String

500

内部错误 String

Models

[ Jump to Methods ]

Table of Contents

  1. AddOrUpdateRule -
  2. AddRuleResponse -
  3. AddRules -
  4. ConDependency -
  5. CreateDependenciesRequest -
  6. CreateInstance -
  7. CreateInstanceResponse -
  8. CreateMicroService -
  9. CreateMicroServiceResponse -
  10. CreateSchema -
  11. DataCenterInfo -
  12. DelServicesRequest -
  13. DelServicesResponse -
  14. DelServicesRspInfo -
  15. DependencyMicroService -
  16. GetConDependenciesResponse -
  17. GetInstancesResponse -
  18. GetMicroServicesResponse -
  19. GetOneInstanceResponse -
  20. GetProDependenciesResponse -
  21. GetResourceResponse -
  22. HealthCheck -
  23. HeartbeatSetElement -
  24. HeartbeatSetRequest -
  25. InstanceHbRst -
  26. InstancesHbRst -
  27. MicroService -
  28. MicroServiceDependency -
  29. MicroServiceInstance -
  30. ModifySchemasRequest -
  31. ProDependency -
  32. Properties -
  33. RegistMicroserviceInstance -
  34. Rule -
  35. Rules -
  36. Schema -
  37. ServicePath -
  38. Tags -
  39. UpdateProperties -
  40. Version -
  41. WatchInstanceResponse -
  42. WatchMicroServiceKey -

AddOrUpdateRule - Up

ruleType (optional)
String rule类型,WHITE或者BLACK
attribute (optional)
String 如果是tag_xxx开头,则按Tag过滤attribute属性,否则,则按"ServiceId", "AppId", "ServiceName", "Version", "Description", "Level", "Status"过滤
pattern (optional)
String 匹配规则,正则表达式,长度1到64
description (optional)
String rule描述

AddRuleResponse - Up

RuleIds (optional)
array[String] 生成的ruleId集合

AddRules - Up

rules (optional)

ConDependency - Up

Providers (optional)

CreateDependenciesRequest - Up

dependencies (optional)

CreateInstance - Up

instance (optional)

CreateInstanceResponse - Up

instanceId (optional)

CreateMicroService - Up

service (optional)
rules (optional)
instances (optional)
tags (optional)

CreateMicroServiceResponse - Up

serviceId (optional)

CreateSchema - Up

schema (optional)

DataCenterInfo - Up

name
String 区域名字
region
String 区域
availableZone
String 可获取区

DelServicesRequest - Up

serviceIds (optional)
force (optional)
String 不传即默认为false。 强制删除,则与该服务相关的信息删除,非强制删除: 如果作为该被依赖(作为provider,提供服务,且不是只存在自依赖)或者存在实例,则不能删除,其它均删除。

DelServicesResponse - Up

services (optional)

DelServicesRspInfo - Up

serviceId (optional)
String 微服务id
errMessage (optional)
String 错误信息,成功为空,不成功,则为错误,在部分成功的场景使用

DependencyMicroService - Up

appId
String 应用app唯一标识。
serviceName
String 微服务名称,作为provider支持为*,表示依赖同一租户下的所有服务,当服务名称为的时候,appId和version可以省略,consumer不支持
version
String 微服务版本,作为provider支持+,如1.0.1+[表示1.0.1以上的版本(包括1.0.1)]、固定版本和latest(当前最新版本),作为consumer只能为固定版本。
stage (optional)
String 服务的stage。

GetConDependenciesResponse - Up

dependency (optional)

GetInstancesResponse - Up

instances (optional)

GetMicroServicesResponse - Up

services (optional)

GetOneInstanceResponse - Up

instance (optional)

GetProDependenciesResponse - Up

dependency (optional)

GetResourceResponse - Up

serviceId (optional)
schemaId (optional)

HealthCheck - Up

mode
String check模式 push/pull
port (optional)
Integer 端口
interval
Integer check interval (second)
times
Integer retry times

HeartbeatSetElement - Up

serviceId (optional)
String 微服务id
instanceId (optional)
String 微服务实例id

HeartbeatSetRequest - Up

Instances (optional)

InstanceHbRst - Up

serviceId (optional)
String 微服务id
instanceId (optional)
String 微服务实例id
errMessage (optional)
String 错误信息,成功为空,不成功,则为错误,在部分成功的场景使用

InstancesHbRst - Up

instances (optional)

MicroService - Up

serviceId (optional)
appId
String 应用App唯一标识
serviceName
String 微服务名称,同一个App要保证唯一
version
String 微服务版本号
description (optional)
String 微服务描述信息
level (optional)
String 微服务层级,FRONT/MIDDLE/BACK
schemas (optional)
array[String] 微服务访问契约内容的外键ID
status
String 微服务状态,UP表示上线 DOWN表示下线
Enum:
UP
DOWN
timestamp (optional)
String post 或者 put 不带该参数,timestamp是内部生成的,只有get 接口才返回该值
modTimestamp (optional)
String 更新时间
paths (optional)
array[ServicePath] 服务路由
providers (optional)
properties (optional)
LBStrategy (optional)

MicroServiceDependency - Up

consumer (optional)
providers (optional)

MicroServiceInstance - Up

instanceId (optional)
String 实例id,唯一标识。创建实例,instanceId由service-center产生
serviceId (optional)
String 微服务唯一标识,创建实例时,以url里面的为准,不用这里的serviceId。
hostName
endpoints (optional)
status
String 实例状态,UP|DOWN|STARTING|OUTOFSERVICE|TESTING
properties (optional)
healthCheck (optional)
environment
String development|testing|acceptance|production
dataCenterInfo (optional)
timestamp (optional)
String 实例创建时间戳,自动生成
modTimestamp (optional)
String 更新时间

ModifySchemasRequest - Up

schemas (optional)

ProDependency - Up

Consumers (optional)

Properties - Up

扩展属性

RegistMicroserviceInstance - Up

instanceId (optional)
String 实例ID,不填写会自动填充
hostName
String 机器的hostname
endpoints (optional)
status
String 实例状态,UP|DOWN|STARTING|OUTOFSERVICE|TESTING
properties (optional)
healthCheck (optional)
environment
String development|testing|acceptance|production
dataCenterInfo (optional)

Rule - Up

ruleId (optional)
String 自定义ruleId
ruleType (optional)
String rule类型,WHITE或者BLACK
attribute (optional)
String 如果是tag_xxx开头,则按Tag过滤attribute属性,否则,则按"ServiceId", "AppId", "ServiceName", "Version", "Description", "Level", "Status"过滤
pattern (optional)
String 匹配规则,正则表达式,长度1到64
description (optional)
String rule描述
timestamp (optional)
String 只有获取rule时返回使用,创建rule的时间
modTimestamp (optional)
String 更新时间

Rules - Up

rules (optional)

Schema - Up

schemaId (optional)
schema (optional)
summary (optional)

ServicePath - Up

Path (optional)
String 路由地址
Property (optional)

Tags - Up

tags (optional)

UpdateProperties - Up

properties (optional)

Version - Up

version (optional)
apiVersion (optional)
buildTag (optional)

WatchInstanceResponse - Up

action (optional)
String 分别有CREATE UPDATE DELETE三种事件
key (optional)
instance (optional)

WatchMicroServiceKey - Up

appId (optional)
serviceName (optional)
version (optional)