Lattice Hub 文档
HTTP OpenAPI治理

无损上下线

无损上下线规则与 release。

无损上下线规则与 release。

默认 Base URL:http://127.0.0.1:8090。管理面接口需 Authorization(登录返回的 token)。

无损上下线

无损上下线:查询、创建/更新、删除与 releases(发布 / 回滚 / 停灰度)。body 为规则数组;字段以 specification 为准。

GET/naming/v1/lossless需要鉴权

查询无损上下线

分页查询无损上下线。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    按 ID。

  • namequery · string可选

    按名称。

  • namespacequery · string可选

    按命名空间。

  • servicequery · string可选

    按服务。

  • enablequery · bool可选

    是否启用。

  • offsetquery · integer可选

    偏移,默认 0。

  • limitquery · integer可选

    分页大小,常见上限 100。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/lossless?limit=20' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "data": [{ "id": "...", "name": "demo", "enable": true }]
}
GET/naming/v1/lossless/detail需要鉴权

查询无损上下线详情

按 id 等条件查单条详情。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    按 ID。

  • namequery · string可选

    按名称。

  • namespacequery · string可选

    按命名空间。

  • servicequery · string可选

    按服务。

  • enablequery · bool可选

    是否启用。

  • offsetquery · integer可选

    偏移,默认 0。

  • limitquery · integer可选

    分页大小,常见上限 100。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/lossless/detail?id=<id>' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/lossless需要鉴权

创建无损上下线

写接口 body 多为 protobuf 消息数组;下列为单条对象字段(见 specification)。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LosslessRule[]必填

    请求体为 LosslessRule 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    rule id

  • lossless_onlinebody · LosslessOnline可选

    configuration for lossless online

    • delay_registerbody · DelayRegister可选

      configuration for delayRegister

      • enablebody · bool可选

        enable delay registry

      • strategybody · enum(DelayStrategy)可选

        delay register strategy 枚举:DELAY_BY_TIME | DELAY_BY_HEALTH_CHECK

      • interval_secondbody · int32可选

        delay register time by second, active when strategy == DELAY_BY_TIME

      • health_check_protocolbody · string可选

        protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_methodbody · string可选

        method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_pathbody · string可选

        path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_interval_secondbody · string可选

        health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK

    • warmupbody · Warmup可选

      configuration for warmup

      • enablebody · bool可选

        enable warmup

      • interval_secondbody · int32可选

        total warmup interval by second

      • enable_overload_protectionbody · bool可选

        warmup stop when most of the instances in service are in warmup status

      • overload_protection_thresholdbody · int32可选

        the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100

      • curvaturebody · int32可选

        curvature for warmup register, default is 1

    • readinessbody · Readiness可选

      configuration for readiness probe

      • enablebody · bool可选

        enable /readiness expose

  • lossless_offlinebody · LosslessOffline可选

    configuration for lossless offline

    • enablebody · bool可选

      enable /offline expose

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string必填

    namespace identifies the environment that owns this rule.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • losslessRulebody · LosslessRule可选

    返回中的 LosslessRule 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      rule id

    • revisionbody · string可选

      revision routing version

    • ctimebody · string可选

      ctime create time of the rules

    • mtimebody · string可选

      mtime modify time of the rules

    • lossless_onlinebody · LosslessOnline可选

      configuration for lossless online

      • delay_registerbody · DelayRegister可选

        configuration for delayRegister

        • enablebody · bool可选

          enable delay registry

        • strategybody · enum(DelayStrategy)可选

          delay register strategy 枚举:DELAY_BY_TIME | DELAY_BY_HEALTH_CHECK

        • interval_secondbody · int32可选

          delay register time by second, active when strategy == DELAY_BY_TIME

        • health_check_protocolbody · string可选

          protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_methodbody · string可选

          method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_pathbody · string可选

          path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_interval_secondbody · string可选

          health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK

      • warmupbody · Warmup可选

        configuration for warmup

        • enablebody · bool可选

          enable warmup

        • interval_secondbody · int32可选

          total warmup interval by second

        • enable_overload_protectionbody · bool可选

          warmup stop when most of the instances in service are in warmup status

        • overload_protection_thresholdbody · int32可选

          the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100

        • curvaturebody · int32可选

          curvature for warmup register, default is 1

      • readinessbody · Readiness可选

        configuration for readiness probe

        • enablebody · bool可选

          enable /readiness expose

    • lossless_offlinebody · LosslessOffline可选

      configuration for lossless offline

      • enablebody · bool可选

        enable /offline expose

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this rule.

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/lossless' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"demo-lossless","enable":true}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/lossless需要鉴权

更新无损上下线

更新规则;body 为数组。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LosslessRule[]必填

    请求体为 LosslessRule 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    rule id

  • lossless_onlinebody · LosslessOnline可选

    configuration for lossless online

    • delay_registerbody · DelayRegister可选

      configuration for delayRegister

      • enablebody · bool可选

        enable delay registry

      • strategybody · enum(DelayStrategy)可选

        delay register strategy 枚举:DELAY_BY_TIME | DELAY_BY_HEALTH_CHECK

      • interval_secondbody · int32可选

        delay register time by second, active when strategy == DELAY_BY_TIME

      • health_check_protocolbody · string可选

        protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_methodbody · string可选

        method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_pathbody · string可选

        path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_interval_secondbody · string可选

        health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK

    • warmupbody · Warmup可选

      configuration for warmup

      • enablebody · bool可选

        enable warmup

      • interval_secondbody · int32可选

        total warmup interval by second

      • enable_overload_protectionbody · bool可选

        warmup stop when most of the instances in service are in warmup status

      • overload_protection_thresholdbody · int32可选

        the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100

      • curvaturebody · int32可选

        curvature for warmup register, default is 1

    • readinessbody · Readiness可选

      configuration for readiness probe

      • enablebody · bool可选

        enable /readiness expose

  • lossless_offlinebody · LosslessOffline可选

    configuration for lossless offline

    • enablebody · bool可选

      enable /offline expose

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string可选

    namespace identifies the environment that owns this rule.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • losslessRulebody · LosslessRule可选

    返回中的 LosslessRule 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      rule id

    • revisionbody · string可选

      revision routing version

    • ctimebody · string可选

      ctime create time of the rules

    • mtimebody · string可选

      mtime modify time of the rules

    • lossless_onlinebody · LosslessOnline可选

      configuration for lossless online

      • delay_registerbody · DelayRegister可选

        configuration for delayRegister

        • enablebody · bool可选

          enable delay registry

        • strategybody · enum(DelayStrategy)可选

          delay register strategy 枚举:DELAY_BY_TIME | DELAY_BY_HEALTH_CHECK

        • interval_secondbody · int32可选

          delay register time by second, active when strategy == DELAY_BY_TIME

        • health_check_protocolbody · string可选

          protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_methodbody · string可选

          method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_pathbody · string可选

          path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_interval_secondbody · string可选

          health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK

      • warmupbody · Warmup可选

        configuration for warmup

        • enablebody · bool可选

          enable warmup

        • interval_secondbody · int32可选

          total warmup interval by second

        • enable_overload_protectionbody · bool可选

          warmup stop when most of the instances in service are in warmup status

        • overload_protection_thresholdbody · int32可选

          the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100

        • curvaturebody · int32可选

          curvature for warmup register, default is 1

      • readinessbody · Readiness可选

        configuration for readiness probe

        • enablebody · bool可选

          enable /readiness expose

    • lossless_offlinebody · LosslessOffline可选

      configuration for lossless offline

      • enablebody · bool可选

        enable /offline expose

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this rule.

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/lossless' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"demo-lossless","enable":true}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/lossless/delete需要鉴权

删除无损上下线

删除规则;body 为含 id 的数组。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LosslessRule[]必填

    请求体为 LosslessRule 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    rule id

  • lossless_onlinebody · LosslessOnline可选

    configuration for lossless online

    • delay_registerbody · DelayRegister可选

      configuration for delayRegister

      • enablebody · bool可选

        enable delay registry

      • strategybody · enum(DelayStrategy)可选

        delay register strategy 枚举:DELAY_BY_TIME | DELAY_BY_HEALTH_CHECK

      • interval_secondbody · int32可选

        delay register time by second, active when strategy == DELAY_BY_TIME

      • health_check_protocolbody · string可选

        protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_methodbody · string可选

        method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_pathbody · string可选

        path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK

      • health_check_interval_secondbody · string可选

        health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK

    • warmupbody · Warmup可选

      configuration for warmup

      • enablebody · bool可选

        enable warmup

      • interval_secondbody · int32可选

        total warmup interval by second

      • enable_overload_protectionbody · bool可选

        warmup stop when most of the instances in service are in warmup status

      • overload_protection_thresholdbody · int32可选

        the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100

      • curvaturebody · int32可选

        curvature for warmup register, default is 1

    • readinessbody · Readiness可选

      configuration for readiness probe

      • enablebody · bool可选

        enable /readiness expose

  • lossless_offlinebody · LosslessOffline可选

    configuration for lossless offline

    • enablebody · bool可选

      enable /offline expose

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string可选

    namespace identifies the environment that owns this rule.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • losslessRulebody · LosslessRule可选

    返回中的 LosslessRule 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      rule id

    • revisionbody · string可选

      revision routing version

    • ctimebody · string可选

      ctime create time of the rules

    • mtimebody · string可选

      mtime modify time of the rules

    • lossless_onlinebody · LosslessOnline可选

      configuration for lossless online

      • delay_registerbody · DelayRegister可选

        configuration for delayRegister

        • enablebody · bool可选

          enable delay registry

        • strategybody · enum(DelayStrategy)可选

          delay register strategy 枚举:DELAY_BY_TIME | DELAY_BY_HEALTH_CHECK

        • interval_secondbody · int32可选

          delay register time by second, active when strategy == DELAY_BY_TIME

        • health_check_protocolbody · string可选

          protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_methodbody · string可选

          method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_pathbody · string可选

          path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK

        • health_check_interval_secondbody · string可选

          health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK

      • warmupbody · Warmup可选

        configuration for warmup

        • enablebody · bool可选

          enable warmup

        • interval_secondbody · int32可选

          total warmup interval by second

        • enable_overload_protectionbody · bool可选

          warmup stop when most of the instances in service are in warmup status

        • overload_protection_thresholdbody · int32可选

          the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100

        • curvaturebody · int32可选

          curvature for warmup register, default is 1

      • readinessbody · Readiness可选

        configuration for readiness probe

        • enablebody · bool可选

          enable /readiness expose

    • lossless_offlinebody · LosslessOffline可选

      configuration for lossless offline

      • enablebody · bool可选

        enable /offline expose

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this rule.

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/lossless/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/lossless/releases需要鉴权

发布无损上下线

发布 release,使客户端读到 active 视图。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • ruleReleasebody · RuleRelease可选

    返回中的 RuleRelease 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/lossless/releases' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>","release_type":"normal"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
GET/naming/v1/lossless/releases需要鉴权

查询无损上下线发布

查询已发布版本。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    规则 ID。

  • limitquery · integer可选

    分页大小。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/lossless/releases?limit=20' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/lossless/releases/rollback需要鉴权

回滚无损上下线

回滚到指定 release。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • ruleReleasebody · RuleRelease可选

    返回中的 RuleRelease 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/lossless/releases/rollback' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/lossless/releases/stopbeta需要鉴权

停止无损上下线灰度

停止灰度 release。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • ruleReleasebody · RuleRelease可选

    返回中的 RuleRelease 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/lossless/releases/stopbeta' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/lossless/releases/delete需要鉴权

删除发布

删除发布。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组;下列为单条字段。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • RuleReleasebody · RuleRelease可选

    实体字段。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/lossless/releases/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}

On this page