Show: Delphi C++
Display Preferences

REST.Backend.EMSApi.TEMSClientAPI.QueryModules

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure QueryModules(const AQuery: array of string; const AJSONArray: TJSONArray); overload;
procedure QueryModules(const AQuery: array of string;  const AJSONArray: TJSONArray; out AModules: TArray<TModule>); overload;

C++

void __fastcall QueryModules(const System::UnicodeString *AQuery, const int AQuery_High, System::Json::TJSONArray* const AJSONArray)/* overload */;
void __fastcall QueryModules(const System::UnicodeString *AQuery, const int AQuery_High, System::Json::TJSONArray* const AJSONArray, /* out */ System::DynamicArray<TModule> &AModules)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
REST.Backend.EMSApi.pas
REST.Backend.EMSApi.hpp
REST.Backend.EMSApi TEMSClientAPI

Description

Queries the EMS server for a list of modules.

QueryModules receives the following parameters:

  • AQuery is an array of strings where each string must contain a key-value pair separated by an equal sign, such as "my_parameter=my_value". QueryModules adds those key-value pairs to the request as parameters.
  • QueryModules fills AJSONArray with the results from the EMS server.

You may optionally provide an array of instances of TModule (AModules), so that QueryModules fills the array with the modules that the EMS server returns.

Exceptions

Exception Message Description

EEMSClientAPIError

JSON object expected

You passed QueryModules an array of instances of TModule (AModules), but QueryModules cannot fill that array because the structure of the JSON data received from the EMS server is unexpected.

The expected structure of the received JSON data is a JSON array of JSON objects. Each one of those objects represents a user.

The actual structure of the received JSON data is a JSON array that contains one or more items that are not JSON objects.

MasterSecret required

Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string.

Session token required

Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance