IJsonPostWsEndUserGetLogs Method
|
Returns the list of log messages generated during the period required by the virtual server specified by the input parameter. This method can be used to manage log information during normal operation of the virtual server, or to obtain debug information as a result of a call to the methods of the web service.
GetLogs can be used only after passing the authentication phase. And 'possible to apply the logs of a specific virtual server, indicating the ID as an input parameter, or request a log of all virtual server created, specifying ServerID as a null value.
It 'also allowed indicate a time interval, to limit to a specific period of time the extraction of information. It 'also possible to omit the start date, end date, or both, to remove some or all of the time limits.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
Stream GetLogs(
GetLogsRequest request
)
<OperationContractAttribute>
<WebInvokeAttribute(Method := "POST", ResponseFormat := WebMessageFormat.Json)>
Function GetLogs (
request As GetLogsRequest
) As Stream
[OperationContractAttribute]
[WebInvokeAttribute(Method = L"POST", ResponseFormat = WebMessageFormat::Json)]
Stream^ GetLogs(
GetLogsRequest^ request
)
[<OperationContractAttribute>]
[<WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)>]
abstract GetLogs :
request : GetLogsRequest -> Stream
function GetLogs(
request : GetLogsRequest
) : Stream
Parameters
- request
- Type: Aruba.Cloud.WsEndUser.JsonGetLogsRequest
Return Value
Type:
Stream
The method returns an object WsResult<LOG> containing information on the outcome of the processing.
The Value property contains an array of such objects Log. Log each object contains information about its id,
operation name, message, date of creation and last update, status, user, server, etc.. For more details
the information returned by the method see the class definition
Log and class
Log .
Examples
The following is extracted and shown in the list of console log of the operations executed in the last 7 days.
GetLogs The method is called after a successful authentication. The credentials are passed to the method GetLogs
within the header of the SOAP request.
static void Main(string[] args)
{
WsEndUserClient client = GetClientAndSetCredentials();
WsResultOfArrayOfLog result =
client.GetLogs(701, System.DateTime.Now.AddDays(-7), System.DateTime.Now);
foreach (Log item in result.Value)
Console.WriteLine("{0} {1} {2} - {3} - server: {4}",
item.LogId,
item.OperationName,
item.Message,
item.Status,
item.ServerName);
Console.ReadLine();
}
See Also