ja:documentation:pandorafms:technical_reference:02_annex_externalapi

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/09/16 06:10] – [set create_event] junichija:documentation:pandorafms:technical_reference:02_annex_externalapi [2024/11/09 23:22] (現在) – [get special_days] junichi
行 755: 行 755:
 == get agent_module_name_last_value_alias == == get agent_module_name_last_value_alias ==
  
->= 7.0NG+<WRAP center round box 90%>
  
-モジュールの最新の値を返します。このモジュールは、パラメータ id で渡されるエージェントの別名と、パラメータ id2 で渡されるモジュール名でフィルタされます。other  パラメータで、アプリケーションが利用するエラーコードおよび、範囲を超えたモジュールの値を追加することができます。+This feature also works in Command Center (Metaconsole).
  
-書式:+</WRAP>
  
-  * op=get (必須) +<WRAP center round box 90%>
-  * op2=agent_module_name_last_value_alias (必須) +
-  * id=<英数字>(必須) エージェント名。 +
-  * id2=<英数字> (必須) モジュール名。 +
-  * other=<返すエラー> (オプション) (通常DBには記録されない)エラー時に返したいもの。 +
-      * エラーコードは次の通りです: +
-        * 'error_message' テキストのエラーメッセージ。 +
-        * 'error_value'<セパレータ><コードまたは値> このコードまたはエラーの値が返ります。ただし、other_mode=url_encode_separator_<セパレータ> のように、 'other_mode' でセパレータを指定する必要があります。+
  
-**例**+この機能はコマンドセンター (メタコンソール) でも動作します。
  
-<code> +</WRAP> 
-http://127.0.0.1/pandora_console/include/api.php?op=get&op2=agent_module_name_last_value_alias&id=miguel-portatil&id2=cpu_user+ 
 +Returns the last value of a module, which is selected by alias of the agent passed by the ''id'' parameter and the module name passed by the ''id2'' parameter. With the ''other'' parameter you can add the error code for an external application to detect this value outside the range of values that can be the module. 
 + 
 +モジュールの最新の値を返します。このモジュールは、パラメータ ''id'' で渡されるエージェントの別名と、パラメータ ''id2'' で渡されるモジュール名でフィルタされます。''other''  パラメータで、アプリケーションが利用するエラーコードおよび、範囲を超えたモジュールの値を追加することができます。 
 + 
 +[[#ks2|Call syntax]]: 
 + 
 +[[#ks2|書式]]: 
 + 
 +  * ''op=get'' (required). 
 +  * ''op2=agent_module_name_last_value_alias'' (required). 
 +  * ''id=''< alphanumeric (required): Contains the agent's alias. 
 +  * ''id2=''< alphanumeric > (required)Contains the module name. 
 +  * ''other_mode=url_encode_separator_''< separator > (optional). 
 +  * ''other=''< error_return > (optional): To return response if there is an error (usually not found the module in the databases): 
 + 
 +  - error_message : Returns error in a text message. 
 +  - error_value< separator >< value_or_code > : Returns that error code or value.  
 + 
 +  * ''op=get'' (必須) 
 +  * ''op2=agent_module_name_last_value_alias'' (必須) 
 +  * ''id=''<英数字>(必須) エージェント名。 
 +  * ''id2=''<英数字> (必須) モジュール名。 
 +  * ''other_mode=url_encode_separator_''< セパレータ > (オプション) 
 +  * ''other=''<返すエラー> (オプション) (通常DBには記録されない)エラー時に返したいもの。 
 + 
 +  - error_message: テキストのエラーメッセージ。 
 +  - error_value<セパレータ><コードまたは値>: このコードまたはエラーの値が返ります。 
 + 
 +**Example (see [[#ks2|syntax of the call]])**: 
 + 
 +**例 ([[#ks2|書式]]を参照)**: 
 + 
 +<code bash> 
 +/include/api.php?op=get&op2=agent_module_name_last_value_alias&id=pandorafms&id2=Memory_Used&apipass=1234&user=admin&pass=pandora
  
 </code> </code>
行 1708: 行 1735:
 == get special_days == == get special_days ==
  
->= 5.1+Returns a list with special daysIt allows to specify a field separator, being these:
  
-特別日一覧を返します。+特別日のリストを返します。次のデータを表示するためのフィールド区切り文字を指定できます:
  
-書式:+  - Numerical ID of the special day. 
 +  - Numerical ID of the calendar to which this special day belongs. 
 +  - Numerical ID of the group to which the special day belongs. 
 +  - Date of the special day in the format ''YYYY-MM-DD''
 +  - Numeric ID of the same day of the week configured for that special day. 
 +  - Description of the special day.
  
-  * op=get (必須) +  - 特別日の数値 ID。 
-  * op2=special_days (必須) +  - この特別日が属するカレンダーの数値 ID。 
-  * other=<csvセパレタ> (オションCSVセパレータ+  - 特別日が属するグループの数値 ID。 
 +  - 特別日の日付 (形式は ''YYYY-MM-DD'')。 
 +  - そ特別日に設定されている同じ曜日の数値 ID。 
 +  - 特別日の説明。
  
-**例**+[[#ks2|Call syntax]]:
  
-<code> +[[#ks2|書式]]: 
-http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=special_days+ 
 +  * ''op=get''  (required). 
 +  * ''op2=special_days'' (required). 
 +  * ''other=''< csv separator > (optional). 
 + 
 +  * ''op=get'' (必須) 
 +  * ''op2=special_days'' (必須) 
 +  * ''other=''<csvセパレータ> (オプション) 
 + 
 +**Example (see [[#ks2|call syntax]]):** 
 + 
 +**例 ([[#ks2|書式]]を参照):** 
 + 
 +<code bash> 
 +/include/api.php?apipass=1234&user=admin&pass=pandora&op=get&op2=special_days
  
 </code> </code>
  • ja/documentation/pandorafms/technical_reference/02_annex_externalapi.1726467007.txt.gz
  • 最終更新: 2024/09/16 06:10
  • by junichi