前のトピック: import メソッド(app オブジェクト)

次のトピック: put_desc メソッド(app オブジェクト)

get_desc メソッド(app オブジェクト)

説明

アプリケーション パッケージ記述子を表示します。

構文
/api/v1/app/get_desc?app=application&vdc=controller-name
引数
application

アプリケーションの名前

controller-name

ターゲットの仮想データ センターの名前

トランザクション タイプ

同期

リクエスト タイプ

GET

アプリケーション test のパッケージ記述子を表示します。

GET http://192.168.123.200/api/v1/app/get_desc?app=test&vdc=mygrid 
サンプル出力

XML

<message>package test
   { 
   type          = application 
   description   = quot;test description&quot; 
   uid           = 12 
 
   package local : file = local/package.desc , type      = catalog 
 
   class top     : top                       , singleton 
   class main    : file = main.desc          , singleton 
   } 
 
assembly top 
   { 
   .category        = General 
 
   subordinate main : .class = main 
 
   visual 
      { 
      color = gray 
      style = small 
      pan_x = 0 
      pan_y = 0 
      } 
   } 
</message>


JSON

{ 
   "message" : "package test¥n   {¥n   type          = application¥n   description   = ¥"test description¥"¥n uid           = 12¥n¥n   package local : file = local/package.desc , type      = catalog¥n¥n   class top : top                       , singleton¥n   class main    : file = main.desc          , singleton¥n   }¥n¥nassembly top¥n   {¥n   .category = General¥n¥n   subordinate main : .class = main¥n¥n visual¥n      {¥n      color = gray¥n      style = small¥n pan_x = 0¥n      pan_y = 0¥n      }¥n   }¥n"
}

メモ

JSON の出力はすべて UTF8 にエンコードされています。 UTF8 デコードを使用して UTF8 にエンコードされた出力をデコードします。

UTF8 にエンコードされた JSON 出力をデコードするシンプルな PHP スクリプトの例を以下に示します。

<? 
$json = '{"a": "¥u00e3¥u0081¥u0082" }'; 
$j = json_decode($json); 
echo utf8_decode($j->{'a'}); 
?>

HTTP エラー コード
404

エンティティ vdc mygrid が見つかりません。WS_API アプリケーションに設定されていない VDC 名が指定されました。

400.4

必要な引数(app)がありません。リクエストに引数 app=app がありません。

500.2

リクエストの処理に失敗しました。アプリケーション test は存在しません。無効なアプリケーションが指定されました。

メモ

なし。