2.9.1 プロパティ定義一覧の取得
機能
プロパティ定義の一覧を取得します。取得できるのは,入出力種別が,in,outのサービスプロパティ,またはサービス共有プロパティです。
実行権限
Adminロール,Developロール,Modifyロール,Submitロール
APIのバージョン
v1
リクエスト形式
GET http://host:port/Automation/version/objects/PropertyDefinitions
APIの実行ユーザーが権限を持つ,すべてのサービスおよびタスクを対象として,プロパティ定義の一覧を取得します。クエリパラメータを指定すると,取得する対象を絞り込めます。クエリパラメータは,次の形式で指定してください。
?クエリパラメータ=値[&クエリパラメータ=値...]
クエリパラメータ |
フィルタ条件 |
|---|---|
serviceID |
指定した値と等しい |
taskID |
|
serviceTemplateID |
そのほかに指定できるクエリパラメータについては,「2.2.9 クエリパラメータ」を参照してください。
- 指定例
クエリパラメータとして,serviceIDに16731を,taskIDに512を指定する例を次に示します。
?serviceID=16731&taskID=512
ステータスコード
リクエストに対するレスポンスとして返却されるステータスコードを,次の表に示します。
ステータスコード |
メッセージ |
説明 |
|---|---|---|
200 |
OK |
成功しました。 |
401 |
Unauthorized |
ログイン権限がありません。 |
412 |
Precondition failed |
サーバが利用できません。 |
500 |
Server-side error |
サーバ処理エラーが発生しました。 |
レスポンスのスキーマ
レスポンスボディーには,リクエストで指定したクエリパラメータの条件に合致したデータが返却されます。レスポンスボディーのスキーマを次に示します。
{
"data" : [ {"プロパティ定義機能のリソース(PropertyDefinitions)のメンバー" : 値 ... }, ... ],
"count" : クエリパラメータの条件に合致したデータの個数(0~n)
}
使用例
すべてのサービスおよびタスクを対象として,プロパティ定義の一覧を取得する場合の使用例を次に示します。
リクエストヘッダー:
GET /Automation/v1/objects/PropertyDefinitions HTTP/1.1
Host: 192.168.146.132:22015
User-Agent: curl/7.36.0
Accept: application/json
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
Accept-Language: ja
レスポンスヘッダー:
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2015 11:23:05 GMT
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO 12979bce0bbef62fd8aa38443caf71e13bfcc_Vlo8Y30JBWoKHUYTEXAMXx5iHgQ=_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: application/json
レスポンスボディー:
{
"data" : [ {
"instanceID" : 5102,
"keyName" : "common.targetHost",
"displayName" : "Host name of execution target server",
"defaultValue" : "",
"type" : "string",
"visibility" : "exec",
"scope" : "local",
"description" : "Specifies the host name or IP address of the execution target server. IPv6 addresses are not supported.",
"mode" : "in",
"required" : true,
"maxLength" : 255,
"minLength" : 1,
"pattern" : "^[0-9a-zA-Z\\.\\-]*$",
"propertyGroupName" : "reserved.defaultGroup",
"validationScript" : "",
"readOnly" : false,
"hidden" : false,
"reference" : false,
"serviceTemplateID" : 5106
}, {
"instanceID" : 5055,
"keyName" : "service.errorMessage",
"displayName" : "Error message",
"defaultValue" : "",
"type" : "string",
"visibility" : "exec",
"scope" : "local",
"description" : "Set the error message displayed in the Task Details window in the Messages area.",
"mode" : "out",
"required" : false,
"propertyGroupName" : "reserved.defaultGroup",
"validationScript" : "",
"readOnly" : false,
"hidden" : false,
"reference" : false,
"serviceTemplateID" : 5035
}, {
"instanceID" : 5098,
"keyName" : "common.remoteCommand",
"displayName" : "Command",
"defaultValue" : "",
"type" : "string",
"visibility" : "exec",
"scope" : "local",
"description" : "Specify the full path of the command to be executed on the execution target server. If the path contains a space, enclose the entire path in double quotation marks.",
"mode" : "in",
"required" : true,
"maxLength" : 256,
"minLength" : 1,
"propertyGroupName" : "reserved.defaultGroup",
"validationScript" : "",
"readOnly" : false,
"hidden" : false,
"reference" : false,
"serviceTemplateID" : 5106
}, {
"instanceID" : 19,
"keyName" : "com.hitachi.software.dna.sys.mail.notify",
"displayName" : "メール通知",
"defaultValue" : "false",
"type" : "boolean",
"visibility" : "config",
"scope" : "share",
"description" : "メール通知機能のオン/オフの設定をします。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : true,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 5084,
"keyName" : "common.remoteCommandParameter",
"displayName" : "Command parameters",
"defaultValue" : "",
"type" : "string",
"visibility" : "exec",
"scope" : "local",
"description" : "Specify the parameters for the command to be executed on the execution target server. If a parameter contains a space, enclose the entire parameter in double quotation marks.",
"mode" : "in",
"required" : false,
"maxLength" : 1024,
"minLength" : 1,
"propertyGroupName" : "reserved.defaultGroup",
"validationScript" : "",
"readOnly" : false,
"hidden" : false,
"reference" : false,
"serviceTemplateID" : 5106
}, {
"instanceID" : 11,
"keyName" : "com.hitachi.software.dna.sys.mail.smtp.server",
"displayName" : "SMTPサーバのアドレス",
"defaultValue" : "",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description" : "SMTPサーバのアドレスを設定します。IPv4,IPv6,ホスト名で指定可能です。一つのみ指定可能です。「,」(カンマ)で区切りで複数のアドレスを指定することは出来ません。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 255,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 5095,
"keyName" : "common.stdoutProperty",
"displayName" : "Standard output string",
"defaultValue" : "",
"type" : "string",
"visibility" : "exec",
"scope" : "local",
"description" : "This property contains the character string output to standard output by the specified command. ",
"mode" : "out",
"required" : false,
"propertyGroupName" : "reserved.defaultGroup",
"validationScript" : "",
"readOnly" : false,
"hidden" : false,
"reference" : false,
"serviceTemplateID" : 5106
}, {
"instanceID" : 12,
"keyName" : "com.hitachi.software.dna.sys.mail.smtp.port",
"displayName" : "SMTPサーバのポート番号",
"defaultValue" : "25",
"type" : "integer",
"visibility" : "config",
"scope" : "share",
"description" : "SMTPサーバのポート番号を設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : true,
"minValue" : "0",
"maxValue" : "65535",
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 17,
"keyName" : "com.hitachi.software.dna.sys.mail.smtp.userid",
"displayName" : "SMTPサーバのユーザーID",
"defaultValue" : "",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description" : "SMTPサーバにログインするユーザーのユーザーIDを設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 255,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 3,
"keyName" : "com.hitachi.software.dna.sys.mail.smtp.password",
"displayName" : "SMTPサーバのパスワード",
"type" : "password",
"visibility" : "config",
"scope" : "share",
"description" : "SMTPサーバにログインするユーザーのパスワードを設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 1024,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 6,
"keyName" : "com.hitachi.software.dna.sys.mail.from",
"displayName" : "通知メールの送信元",
"defaultValue" : "",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description" : "通知メールの送信元を設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 255,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 16,
"keyName" : "com.hitachi.software.dna.sys.mail.to",
"displayName" : "通知メールの送信先(TO)",
"defaultValue" : "",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description" : "通知メールの送信先(TO)を設定します。「,」(カンマ)で区切ることにより複数のメールアドレスを指定できます。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 255,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 10,
"keyName" : "com.hitachi.software.dna.sys.mail.cc",
"displayName" : "通知メールの送信先(CC)",
"defaultValue" : "",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description" : "通知メールの送信先(CC)を設定します。「,」(カンマ)で区切ることにより複数のメールアドレスを指定できます。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 255,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 13,
"keyName" : "com.hitachi.software.dna.sys.mail.bcc",
"displayName" : "通知メールの送信先(BCC)",
"defaultValue" : "",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description"
a57
: "通知メールの送信先(BCC)を設定します。「,」(カンマ)で区切ることにより複数のメールアドレスを指定できます。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 255,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 4,
"keyName" : "com.hitachi.software.dna.sys.jp1.username",
"displayName" : "JP1ユーザー名",
"defaultValue" : "jp1admin",
"type" : "string",
"visibility" : "config",
"scope" : "share",
"description" : "サービスを実行するJP1ユーザー名を設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : true,
"maxLength" : 31,
"minLength" : 1,
"pattern" : "^[a-zA-Z0-9!#\\$%&\\-\\.@_`~]+$",
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 22,
"keyName" : "com.hitachi.software.dna.sys.jp1.password",
"displayName" : "JP1ユーザーのパスワード",
"type" : "password",
"visibility" : "config",
"scope" : "share",
"description" : "サービスを実行するJP1ユーザーのパスワードを設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : true,
"maxLength" : 32,
"minLength" : 6,
"pattern" : "^[a-zA-Z0-9!#\\$%&'\\(\\)\\*\\+,\\-\\.\\/;<=>\\?@\\[\\]\\^_`\\{\\|\\}~]+$",
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 26,
"keyName" : "com.hitachi.software.dna.sys.task.log.level",
"displayName" : "タスクのログ出力レベル",
"defaultValue" : "10",
"type" : "list",
"visibility" : "config",
"scope" : "share",
"description" : "タスクのログ出力レベルを設定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : true,
"valueList" : "0,10,20,30,40",
"readOnly" : false,
"hidden" : false
}, {
"instanceID" : 15,
"keyName" : "com.hitachi.software.dna.sys.ssh.privatekey.passphrase",
"displayName" : "秘密鍵のパスフレーズ(SSH公開鍵認証用)",
"type" : "password",
"visibility" : "config",
"scope" : "share",
"description" : "SSH公開鍵認証で使用する秘密鍵のパスフレーズを指定します。[ビルトインサービス共有プロパティ]",
"mode" : "in",
"required" : false,
"maxLength" : 1024,
"minLength" : 0,
"readOnly" : false,
"hidden" : false
} ],
"count" : 18
}