跳转到主要内容
系统全局相关/许可证相关接口

获取许可证历史授权信息

获取许可证历史授权信息

GET/zstack/v1/licenses/records

操作 ID

GetLicenseRecords

起始版本

4.1.0

执行模式

同步

认证信息

需要认证

认证信息

调用该 API 时需要在请求头中携带以下认证信息。

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

查询参数

  • limit
    Integer

    最多返回的记录数,类似MySQL的limit,默认值20

  • start
    Integer

    起始查询记录位置,类似MySQL的offset。跟limit配合使用可以实现分页

  • replyWithCount
    boolean

    计数查询,查询是否附加返回数据记录数。当设置成true时,API在返回数据记录的同时返回满足查询条件的记录数

  • count
    boolean

    计数查询,相当于MySQL中的count()函数。当设置成true时,API只返回的是满足查询条件的记录数

  • sortBy
    String

    以字段排序,等同于MySQL中的sort by关键字,例如sortBy=ip。必须跟sortDirection配合使用

响应状态

200 OK
200 OK

该 API 成功时返回以下响应结构。

  • total
    Long必填

    许可证历史授权数据总量。如果设置count或replyWithCount为true则返回该值

  • error
    ErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • code
      String必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • description
      String必填

      错误的概要描述

    • details
      String必填

      错误的详细信息

    • elaboration
      String必填

      保留字段,默认为null

    • opaque
      LinkedHashMap必填

      保留字段,默认为null

    • cause
      ErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

  • inventory
    LicenseInventory必填

    详情参考inventory

    • uuid
      String必填

      资源UUID。

    • licenseType
      String必填

      许可证类型。

    • expiredDate
      String必填

      已过期时间。

    • issuedDate
      String必填

      已签发时间。

    • uploadDate
      String必填

      许可证上传时间

    • user
      String必填

      用户信息。

    • prodInfo
      String必填

      许可证产品名称

    • hostNum
      Integer必填

      数量主机。

    • cpuNum
      Integer必填

      暂无描述。

    • vmNum
      Integer必填

      数量云主机实例。

    • expired
      boolean必填

      已过期。

    • managementNodeUuid
      String必填

      管理节点UUID。