上一主题: class 对象下一主题: move 方法(class 对象)


list 方法(class 对象)
说明

检索包中类的列表

语法
/api/v2/class/list?class=class&vdc=controller-name 
参数
class

包的名称

vdc

目标虚拟数据中心的名称

事务类型

同步

请求类型

GET

示例

检索 /test 中的类的列表。

GET http://192.168.123.200/api/v2/class/list?class=/filer&vdc=mygrid 
样例输出
XML:

<catalog>
  <classes>
    <class>
      <category>Filer</category>
      <description>Linux Filer based on CentOS 6.3 x86_64 (v5.2.3-1)
</description>
      <locked>1</locked>
      <name>Filer_Linux</name>
    </class>
  </classes>
  <name>filer</name>
</catalog>
JSON:

{
   "name" : "filer",
   "class" : [
      {
         "locked" : 1,
         "name" : "Filer_Linux",
         "category" : "Filer",
         "description" : "Linux Filer based on CentOS 6.3 x86_64 (v5.2.3-1)"
      }
   ]
}
HTTP 错误代码
404

未找到实体 vdc mygrid-WS_API 应用中没有配置指定的 VDC 名称。

400.4

缺少必需参数 (class)。 -请求中缺少参数 class=entity

404.1

应用 test 不存在。 -请求中指定的应用无效。

404.1

找不到全局目录 test。 -请求中指定的全局目录无效。