跳转到主要内容
系统全局相关/许可证相关接口
GETLicense起始版本 4.1.0同步需要认证

获取许可证历史授权信息

获取许可证历史授权信息

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

查询参数

请求参数

查询参数

  • limitInteger

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

  • startInteger

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

  • replyWithCountboolean

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

  • countboolean

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

  • sortByString

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

响应状态

200 OK

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

  • totalLong必填

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

  • errorErrorCode必填

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

    • codeString必填

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

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

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

  • inventoryLicenseInventory必填

    详情参考inventory

    • uuidString必填

      资源UUID。

    • licenseTypeString必填

      暂无描述。

    • expiredDateString必填

      已过期时间。

    • issuedDateString必填

      issued时间。

    • uploadDateString必填

      许可证上传时间

    • userString必填

      用户信息。

    • prodInfoString必填

      许可证产品名称

    • hostNumInteger必填

      暂无描述。

    • cpuNumInteger必填

      暂无描述。

    • vmNumInteger必填

      暂无描述。

    • expiredboolean必填

      已过期。

    • managementNodeUuidString必填

      管理节点UUID。

请求地址

GET/zstack/v1/licenses/records

/zstack/v1/licenses/records

操作 ID

GetLicenseRecords

永久链接

请求示例

curl -X GET 'http://{host}/zstack/v1/licenses/records?limit=1&start=1&replyWithCount=True&count=True&sortBy=<sortBy>&sortDirection=<sortDirection>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}'

响应示例

200
{ "inventories": [ { "user": "example", "hostNum": 10.0, "licenseType": "Free", "issuedDate": "2017-01-19 14:31:06", "managementNodeUuid": "00898b3538e53e70bb7521e54ff80276", "expired": true } ], "total": 1.0 }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史