上一主题: rename 方法(app 对象)下一主题: config_boundary 方法(app 对象)


config 方法(app 对象)
说明

检索应用配置参数

语法
/api/v2/app/config?app=application&vdc=controller-name 
参数
app

应用的名称

vdc

目标虚拟数据中心的名称

选项

有关此命令可用选项的说明,请参阅命令行 Shell 参考中的“应用控制”

事务类型

同步

请求类型

GET

示例

检索应用 test 的配置参数。

GET http://192.168.123.200/api/v2/app/config?app=test&vdc=mygrid 
样例输出
XML:
<config>
   <name>test</name>
   <__description>虚拟专用服务器-基于 CentOS 5.1 (v1.0.14-1)</__description>
   <__doc_url>http://doc.3tera.net/AppLogic27/RefAppsVdsLinux.html</__doc_url> 
   <__template>0</__template>
</config>
JSON:

{   "__doc_url" : "http://doc.3tera.net/AppLogic27/RefAppsVdsLinux.html",
   "__template" : "0",
   "__description" : "虚拟专用服务器-基于 CentOS 5.1 (v1.0.14-1)",
   "name" : "test"
} 
HTTP 错误代码
404

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

400.4

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

404.1

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