上一主题: template 对象下一主题: info 方法(template 对象)


list 方法(template 对象)
说明

检索应用模板的列表

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

目标虚拟数据中心的名称

事务类型

同步

请求类型

GET

示例

检索应用模板的列表

GET http://192.168.123.200/api/v2/template/list?vdc=mygrid 
样例输出
XML:
<templates> 
   template> 
      name>TWiki_r11</name> 
      description>TWiki 4.3.1 collaboration platform (v4.3.1-7)</description> 
      destroy_on_stop>0</destroy_on_stop> 
      doc_url>http://doc.3tera.net/AppLogic29/RefAppsTWiki4.html</doc_url> 
      id>2</id> 
      state>stopped</state> 
      template>0</template> 
      user1></user1> 
      user2></user2> 
   </template> 
   。 
   。 
   。 
</templates> 
JSON:
{ 
   "template" : [ 
      { 
         "template" : "0", 
         "user1" : "", 
         "name" : "TWiki_r11", 
         "description" : "TWiki 4.3.1 collaboration platform (v4.3.1-7)", 
         "state" : "stopped", 
         "doc_url" : "http://doc.3tera.net/AppLogic29/RefAppsTWiki4.html", 
         "destroy_on_stop" : "0", 
         "id" : "2", 
         "user2" : "" 
      },
      . 
      . 
      . 
} 

HTTP 错误代码
404

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