Service Center API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
Version: 3.0.0
BasePath:
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
(healthGet)
查询服务中心集群信息。
Return type
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 request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
服务中心实例集群信息列表
GetInstancesResponse
400
错误的请求
String
500
内部错误
String
(versionGet)
查询服务中心版本信息。
Return type
Example data
Content-Type: application/json
{
"apiVersion" : "aeiou",
"buildTag" : "aeiou",
"version" : "aeiou"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
版本信息结构体
Version
400
错误的请求
String
500
内部错误
String
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 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
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 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
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 request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
查询成功
GetProDependenciesResponse
400
错误的请求
String
500
内部错误
String
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
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 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
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 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
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 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 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
Body Parameter — 批量上报心跳的实例的标识。
Request headers
Produces
This API call produces the following media types according to the 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
Body Parameter — 微服务实例请求结构体。
Request headers
Return type
Example data
Content-Type: application/json
{
"instanceId" : "aeiou"
}
Produces
This API call produces the following media types according to the 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 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
Body Parameter — 微服务实例扩展属性请求结构体。
Request headers
Produces
This API call produces the following media types according to the 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 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}/rules
(addRule)
为serviceId的服务新增黑白名单,同一服务,attribute和pattern唯一标识一份黑白名单。
Path parameters
serviceId (required)
Path Parameter — 微服务唯一标识。
Request body
Request headers
Return type
Example data
Content-Type: application/json
{
"RuleIds" : [ "aeiou" ]
}
Produces
This API call produces the following media types according to the 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
Body Parameter — 要创建的tags。
Request headers
Produces
This API call produces the following media types according to the 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
Body Parameter — 创建微服务请求结构体。
Request headers
Return type
Example data
Content-Type: application/json
{
"serviceId" : "aeiou"
}
Produces
This API call produces the following media types according to the 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 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 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 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
Body Parameter — 批量删除服务的服务ID列表
Produces
This API call produces the following media types according to the 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 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
Example data
Content-Type: application/json
{
"schemaId" : "aeiou",
"serviceId" : "aeiou"
}
Produces
This API call produces the following media types according to the 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
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 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
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 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
Example data
Content-Type: application/json
{
"schema" : "aeiou"
}
Produces
This API call produces the following media types according to the 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
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 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
Example data
Content-Type: application/json
{
"tags" : { }
}
Produces
This API call produces the following media types according to the 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
Body Parameter — 微服务契约内容。
Request headers
Produces
This API call produces the following media types according to the 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
Body Parameter — 批量上传schemas信息。
Request headers
Produces
This API call produces the following media types according to the 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
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 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
Body Parameter — 微服务扩展属性请求结构体。
Request headers
Produces
This API call produces the following media types according to the 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
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 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 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
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 request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
实例变化时,成功推送给watcher的信息
WatchInstanceResponse
400
错误的请求
String
500
内部错误
String
Up
post /registry/v3/microservices/{serviceId}/rules
(addRule)
为serviceId的服务新增黑白名单,同一服务,attribute和pattern唯一标识一份黑白名单。
Path parameters
serviceId (required)
Path Parameter — 微服务唯一标识。
Request body
Request headers
Return type
Example data
Content-Type: application/json
{
"RuleIds" : [ "aeiou" ]
}
Produces
This API call produces the following media types according to the 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 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
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 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
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 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 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
Example data
Content-Type: application/json
{
"schema" : "aeiou"
}
Produces
This API call produces the following media types according to the 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
Body Parameter — 微服务契约内容。
Request headers
Produces
This API call produces the following media types according to the 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
Body Parameter — 批量上传schemas信息。
Request headers
Produces
This API call produces the following media types according to the 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
Example data
Content-Type: application/json
{
"schemaId" : "aeiou",
"serviceId" : "aeiou"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
查询成功
GetResourceResponse
400
错误的请求
String
500
内部错误
String
Up
post /registry/v3/microservices/{serviceId}/tags
(addTags)
为serviceId的微服务创建tag。
Path parameters
serviceId (required)
Path Parameter — 微服务唯一标识。
Request body
Body Parameter — 要创建的tags。
Request headers
Produces
This API call produces the following media types according to the 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 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
Example data
Content-Type: application/json
{
"tags" : { }
}
Produces
This API call produces the following media types according to the 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 request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
更新成功
400
错误的请求
String
500
内部错误
String
[ Jump to Methods ]
Table of Contents
AddOrUpdateRule
-
AddRuleResponse
-
AddRules
-
ConDependency
-
CreateDependenciesRequest
-
CreateInstance
-
CreateInstanceResponse
-
CreateMicroService
-
CreateMicroServiceResponse
-
CreateSchema
-
DataCenterInfo
-
DelServicesRequest
-
DelServicesResponse
-
DelServicesRspInfo
-
DependencyMicroService
-
GetConDependenciesResponse
-
GetInstancesResponse
-
GetMicroServicesResponse
-
GetOneInstanceResponse
-
GetProDependenciesResponse
-
GetResourceResponse
-
HealthCheck
-
HeartbeatSetElement
-
HeartbeatSetRequest
-
InstanceHbRst
-
InstancesHbRst
-
MicroService
-
MicroServiceDependency
-
MicroServiceInstance
-
ModifySchemasRequest
-
ProDependency
-
Properties
-
RegistMicroserviceInstance
-
Rule
-
Rules
-
Schema
-
ServicePath
-
Tags
-
UpdateProperties
-
Version
-
WatchInstanceResponse
-
WatchMicroServiceKey
-
ruleType (optional)
attribute (optional)
String 如果是tag_xxx开头,则按Tag过滤attribute属性,否则,则按"ServiceId", "AppId", "ServiceName", "Version", "Description", "Level", "Status"过滤
pattern (optional)
description (optional)
service (optional)
rules (optional)
instances (optional)
tags (optional)
name
region
availableZone
serviceIds (optional)
force (optional)
String 不传即默认为false。 强制删除,则与该服务相关的信息删除,非强制删除: 如果作为该被依赖(作为provider,提供服务,且不是只存在自依赖)或者存在实例,则不能删除,其它均删除。
serviceId (optional)
errMessage (optional)
String 错误信息,成功为空,不成功,则为错误,在部分成功的场景使用
appId
serviceName
String 微服务名称,作为provider支持为*,表示依赖同一租户下的所有服务,当服务名称为
的时候,appId和version可以省略,consumer不支持。
version
String 微服务版本,作为provider支持+,如1.0.1+[表示1.0.1以上的版本(包括1.0.1)]、固定版本和latest(当前最新版本),作为consumer只能为固定版本。
stage (optional)
serviceId (optional)
schemaId (optional)
mode
port (optional)
interval
times
serviceId (optional)
instanceId (optional)
serviceId (optional)
instanceId (optional)
errMessage (optional)
String 错误信息,成功为空,不成功,则为错误,在部分成功的场景使用
serviceId (optional)
appId
serviceName
version
description (optional)
level (optional)
String 微服务层级,FRONT/MIDDLE/BACK
schemas (optional)
status
UP
DOWN
timestamp (optional)
String post 或者 put 不带该参数,timestamp是内部生成的,只有get 接口才返回该值
modTimestamp (optional)
paths (optional)
providers (optional)
properties (optional)
LBStrategy (optional)
consumer (optional)
providers (optional)
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)
modTimestamp (optional)
instanceId (optional)
hostName
endpoints (optional)
status
String 实例状态,UP|DOWN|STARTING|OUTOFSERVICE|TESTING
properties (optional)
healthCheck (optional)
environment
String development|testing|acceptance|production
dataCenterInfo (optional)
ruleId (optional)
ruleType (optional)
attribute (optional)
String 如果是tag_xxx开头,则按Tag过滤attribute属性,否则,则按"ServiceId", "AppId", "ServiceName", "Version", "Description", "Level", "Status"过滤
pattern (optional)
description (optional)
timestamp (optional)
String 只有获取rule时返回使用,创建rule的时间
modTimestamp (optional)
schemaId (optional)
schema (optional)
summary (optional)
Path (optional)
Property (optional)
version (optional)
apiVersion (optional)
buildTag (optional)
action (optional)
String 分别有CREATE UPDATE DELETE三种事件
key (optional)
instance (optional)
appId (optional)
serviceName (optional)
version (optional)