Hitachi

JP1 Version 12 JP1/Automatic Operation コマンド・API リファレンス 


2.4.5 サービステンプレートのインポートに必要なHTMLファイルの取得

機能

サービステンプレートのインポートに必要なHTMLファイルを取得します。なお,HTMLファイルには認証情報が付与されていません。実行時には,あらかじめJP1/AOにログインしてセッションを確保してください。

実行権限

Adminロール,Developロール

APIのバージョン

v1

リクエスト形式

GET http://host:port/Automation/version/services/ServiceTemplates/actions/import

ステータスコード

リクエストに対するレスポンスとして返却されるステータスコードを,次の表に示します。

ステータスコード

メッセージ

説明

200

OK

成功しました。

401

Unauthorized

ログイン権限がありません。

403

Forbidden

インポートの権限がありません。

406

Not acceptable

Acceptヘッダーの指定が不正です。

412

Precondition failed

サーバが利用できません。

500

Server-side error

サーバ処理エラーが発生しました。

レスポンスのスキーマ

リクエストに対するレスポンスボディーの構造を次に示します。

<html> 
<body> 
<form method="POST" action="http://host:port/Automation/version/services/ServiceTemplates/actions/import/invoke"
 enctype="multipart/form-data"> 
<input name="file" type="file"></input> 
<input type="submit" value="Submit"> 
</form> 
<body> 
</html>

使用例

サービステンプレートのインポートに必要なHTMLファイルを取得する場合の使用例を示します。

リクエストヘッダー:

GET /Automation/v1/services/ServiceTemplates/actions/import HTTP/1.1
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: curl/7.36.0
Host: 10.196.184.182:22015
Accept: text/html
Accept-Language: ja

レスポンスヘッダー:

HTTP/1.1 200 OK
Date: Thu, 30 Jul 2015 00:40:59 GMT
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO ea15867727ce4f2cd07d5a48a3dedf919a34577_Vlo8Y30JdDBUB3ljJSVPaRtjBSA=_V0810
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, HEAD, OPTIONS
Access-Control-Allow-Credentials: true
Cache-Control: no-cache
Transfer-Encoding: chunked
Content-Type: text/html

レスポンスボディー:

<html>
<body>
<form method="POST" action="http://10.196.184.182:22015/Automation/v1/services/ServiceTemplates/actions/import/invoke" enctype="multipart/form-data">
  <input name="file" type="file"></input>
  <input type="submit" value="Submit">
 </form>
<body>
</html>