跳转到主要内容
平台运维/自动化运维/脚本库相关接口

查询脚本执行记录

查询脚本执行记录

GET/zstack/v1/scripts/records
GET/zstack/v1/scripts/records/{uuid}

操作 ID

QueryGuestVmScriptExecutedRecord

起始版本

5.2.0

执行模式

同步

认证信息

需要认证

认证信息

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

Authorizationstring必填

Bearer 令牌

X-Tenant-IDstring

X-Tenant-ID

请求参数

查询参数

  • q
    String

    查询条件。

响应状态

200 OK
200 OK

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

  • success
    boolean必填

    操作是否成功。

  • error
    ErrorCode必填

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

    • code
      String必填

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

    • description
      String必填

      错误的概要描述

    • details
      String必填

      错误的详细信息

    • elaboration
      String必填

      保留字段,默认为null

    • opaque
      LinkedHashMap必填

      保留字段,默认为null

    • cause
      ErrorCode必填

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

  • inventories
    List必填

    详情参考inventories

    • uuid
      String必填

      资源的UUID,唯一标示该资源

    • scriptUuid
      String必填

      脚本UUID

    • recordName
      String必填

      记录名称

    • scriptTimeout
      Integer必填

      超时时间

    • status
      String必填

      状态

    • executor
      String必填

      执行人

    • executionCount
      Integer必填

      执行次数

    • version
      Integer必填

      版本

    • scriptContent
      String必填

      脚本内容

    • startTime
      Timestamp必填

      开始时间

    • endTime
      Timestamp必填

      结束时间

  • 变更时间

    新增响应字段 cause, code, description...
    查看 API