2.9.4 プロパティ定義およびプロパティ値一覧の取得
機能
プロパティ定義およびプロパティ値の情報の一覧を取得します。
実行権限
Adminロール,Developロール,Modifyロール,Submitロール
APIのバージョン
v1
リクエスト形式
GET http://host:port/Automation/version/objects/PropertyInformations
APIを実行するときは,クエリパラメータを必ず指定して,一覧を取得する対象を絞り込んでください。クエリパラメータは,次の形式で指定してください。
?クエリパラメータ=値[&クエリパラメータ=値...]
クエリパラメータ |
フィルタ条件 |
|---|---|
serviceID |
指定した値と等しい |
taskID |
|
scheduleID |
|
shared |
サービス共有プロパティを取得対象にする |
そのほかに指定できるクエリパラメータについては,「2.2.9 クエリパラメータ」を参照してください。
ステータスコード
リクエストに対するレスポンスとして返却されるステータスコードを,次の表に示します。
ステータスコード |
メッセージ |
説明 |
|---|---|---|
200 |
OK |
成功しました。 |
401 |
Unauthorized |
ログイン権限がありません。 |
412 |
Precondition failed |
サーバが利用できません。 |
500 |
Server-side error |
サーバ処理エラーが発生しました。 |
レスポンスのスキーマ
リクエストに対するレスポンスボディーの構造を次に示します。
{
"data" : [ {"プロパティ定義およびプロパティ値機能のリソース(PropertyInformations)のメンバー" : 値 ... }, ... ],
"count" : クエリパラメータの条件に合致したデータの個数(0~n)
}
使用例
serviceID=2004のサービスのプロパティ定義およびプロパティ値の情報の一覧を取得する場合の使用例を示します。
リクエストヘッダー:
GET /Automation/v1/objects/PropertyInformations?serviceID=2004 HTTP/1.1
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: curl/7.36.0
Host: 10.196.184.182:22015
Accept: application/json
Accept-Language: ja
レスポンスヘッダー:
HTTP/1.1 200 OK
Date: Fri, 31 Jul 2015 06:27:14 GMT
Server Cosminexus HTTP Server is not blacklisted
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO 94728cefd3f4c996534144711565199189dd8_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: application/json
レスポンスボディー:
{
"data" : [ {
"instanceID" : 2010,
"keyName" : "common.targetHost",
"displayName" : "Host name of execution target server",
"defaultValue" : "",
"value" : "",
"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" : 560,
"serviceID" : 2004
}, {
"instanceID" : 2013,
"keyName" : "common.remoteCommand",
"displayName" : "Command",
"defaultValue" : "",
"value" : "",
"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" : 560,
"serviceID" : 2004
}, {
"instanceID" : 2017,
"keyName" : "common.remoteCommandParameter",
"displayName" : "Command parameters",
"defaultValue" : "",
"value" : "",
"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" : 560,
"serviceID" : 2004
}, {
"instanceID" : 2016,
"keyName" : "common.stdoutProperty",
"displayName" : "Standard output string",
"defaultValue" : "",
"value" : "",
"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" : 560,
"serviceID" : 2004
} ],
"count" : 4
}