Skip to main content
Skip table of contents

SOAP API AlarmService, Methods

Method: AddAlarmComments

Description

Update alarm with comments. The Alarm ID is derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.            

Input

The input of this method is the argument AddAlarmComments having the following structure.

Element

Type

Nillable?

Description

alarmID

long

No

The unique ID of the alarm to update.

comments

string

Yes

The alarm comments.

Output

The result of the update.

Element

Type

Nillable?

Description

AddAlarmCommentsResult

SaveResult

Yes

A response object which supplies information about an attempt to insert data. This information includes record ID if created and error / warning messages if generated.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private SaveResult AddAlarmComments(int AlarmID, string Comments)

   {

      AlarmServiceClient alarmClient = null;

      SaveResult result = null;

      try

      {

          // Create connection to service.

          alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

          alarmClient.ClientCredentials.UserName.UserName = username;

          alarmClient.ClientCredentials.UserName.Password = password;

          result = alarmClient.AddAlarmComments(AlarmID, Comments);

       }

       finally

       {

           if (alarmClient != null && alarmClient.State !=           System.ServiceModel.CommunicationState.Faulted)

           {

        alarmClient.Close();

           }

       }

        // This result is a confirmation that the comments were added.  The result

        also informs the user of errors / warnings generated by the update.

        return result;

    }

 Method: GetAlarmByID

Description

Retrieve a single alarm by the unique alarm identifier alarm. The Alarm ID is derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.            

Input

The input of this method is the argument GetAlarmByID having the following structure.

Element

Type

Nillable?

Description

alarmID

long

No

The unique ID of the alarm.

Output

An alarm with that ID.

Element

Type

Nillable?

Description

GetAlarmByIDResult

AlarmSummaryDataModel

Yes

Response model of an alarms current status.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmSummaryDataModel GetAlarmByID(int AlarmID)

   {

       AlarmServiceClient alarmClient = null;

       AlarmSummaryDataModel model = null;

       try

       {

          // Create connection to service.

          alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

          alarmClient.ClientCredentials.UserName.UserName = username;

          alarmClient.ClientCredentials.UserName.Password = password;

           // Call method retrieving data model.

          model = alarmClient.GetAlarmByID(AlarmID);

        }

            finally

            {

                if (alarmClient != null && alarmClient.State !=

                System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

        }

       // This model is a single alarm data model for the model which ID was

      supplied.  Or if not found you have a null object.

            return model;

   }

Method: GetAlarmEventsByID

Description

Retrieve a list of events associated to this alarm. The Alarm ID is derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.            

Input

The input of this method is the argument GetAlarmEventsByID having the following structure.

Element

Type

Nillable?

Description

alarmID

long

No

The unique ID of the alarm.

includeRawLog

boolean

No

If true, include raw log.

Output

The alarm events.

Element

Type

Nillable?

Description

GetAlarmEventsByIDResult

AlarmEventDataModel

Yes

Response model for alarms that include event data.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmEventDataModel GetAlarmEventsByID(int AlarmID, bool IncludeRawLog)

   {

       AlarmServiceClient alarmClient = null;

       AlarmEventDataModel model = null;

       try

       {

           // Create connection to service.

           alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_

           AlarmService");

           alarmClient.ClientCredentials.UserName.UserName = username;

           alarmClient.ClientCredentials.UserName.Password = password;

           // Call method retrieving data model.

           model = alarmClient.GetAlarmEventsByID(AlarmID, IncludeRawLog);

        }

        finally

        {

            if (alarmClient != null && alarmClient.State !=

            System.ServiceModel.CommunicationState.Faulted)

            {

                alarmClient.Close();

            }

        }

        // This model is a single alarm events data model for the alarm which ID was        supplied.  Or if not found you have a null object.

        return model;

   }

  

Method: GetAlarmHistoryByID

Description

Retrieve a list of alarm status and comment updates. The Alarm ID is derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.            

Input

The input of this method is the argument GetAlarmHistoryByID having the following structure.

Element

Type

Nillable?

Description

alarmID

long

No

The unique ID of the alarm.

includeNotifications

boolean

No

If true, include notification history.

includeComments

boolean

No

If true, include comments history.

Output

The alarm history.

Element

Type

Nillable?

Description

GetAlarmHistoryByIDResult

AlarmHistoryDataModel

Yes

Response model for alarms that includes alarm history.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmHistoryDataModel GetAlarmHistoryByID(int AlarmID, bool IncludeNotifications, bool IncludeComments)

        {

            AlarmServiceClient alarmClient = null;

            AlarmHistoryDataModel model = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient

               ("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving data model.

                model = alarmClient.GetAlarmHistoryByID(AlarmID,

                IncludeNotifications, IncludeComments);

            }

            finally

            {

                if (alarmClient != null && alarmClient.StateSystem

                .ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // This model is a single alarm history data model for the

           alarm which ID was supplied.  Or if not found you have a             null object.

            return model;

         }  


      

Method: GetFirstPageAlarms

Description

Retrieve the first page of alarms.            

Input

The input of this method is the argument GetFirstPageAlarms having the following structure.

Element

Type

Nillable?

Description

startDate

dateTime

No

Start date for the data query.

endDate

dateTime

No

End date for the data query.

allUsers

boolean

No

If true, alarms for all users.

maximumResultsPerPage

int

No

The maximum number of rows the response can contain, regardless of the actual number of rows returned.

Output

Alarm Summary Data Results with result set and next page ID.

Element

Type

Nillable?

Description

GetFirstPageAlarmsResult

AlarmSummaryDataResults

Yes

Response model for alarm summary.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmSummaryDataResults GetFirstPageAlarms(DateTime StartDate, DateTime EndDate, bool AllUsers, int MaxResultsPerPage)

        {

            AlarmServiceClient alarmClient = null;

            AlarmSummaryDataResults results = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving data model.

                results = alarmClient.GetFirstPageAlarms(StartDate, EndDate, AllUsers, MaxResultsPerPage);

            }

            finally

            {

                if (alarmClient != null && alarmClient.State != System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // Returns an object representing all the resulting models for the first page given the criteria supplied.  If no results found a null object is returned.

            return results;

        }

      

Method: GetFirstPageAlarmsByAlarmRuleID

Description

Retrieve the first page of alarms filtered by the alarm rule.            

Input

The input of this method is the argument GetFirstPageAlarmsByAlarmRuleID having the following structure.

Element

Type

Nillable?

Description

startDate

dateTime

No

Start date for the data query.

endDate

dateTime

No

End date for the data query.

ruleID

int

No

The unique ID of the alarm rule.

allUsers

boolean

No

If true, alarms for all users.

maximumResultsPerPage

int

No

The maximum number of rows the response can contain, regardless of the actual number of rows returned.

Output

Alarm Summary Data Results with result set and next page ID.

Element

Type

Nillable?

Description

GetFirstPageAlarmsByAlarmRuleIDResult

AlarmSummaryDataResults

Yes

Response model for alarm summary.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmSummaryDataResults GetFirstPageAlarmsByAlarmRuleID(int AlarmRuleID, DateTime StartDate, DateTime EndDate, bool AllUsers, int MaxResultsPerPage)

        {

            AlarmServiceClient alarmClient = null;

            AlarmSummaryDataResults results = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving a result set.

                results = alarmClient.GetFirstPageAlarmsByAlarmRuleID(StartDate, EndDate, AlarmRuleID, AllUsers, MaxResultsPerPage);

            }

            finally

            {

                if (alarmClient != null && alarmClient.State != System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // Returns an object representing all the resulting models for the first page given the criteria supplied.  If no results found a null object is returned.

            return results;

        }

      

Method: GetFirstPageAlarmsByAlarmStatus

Description

Retrieve the first page of alarms filtered by the alarm status.            

Input

The input of this method is the argument GetFirstPageAlarmsByAlarmStatus having the following structure.

Element

Type

Nillable?

Description

startDate

dateTime

No

Start date for the data query.

endDate

dateTime

No

End date for the data query.

status

AlarmStatusEnum

No

The status.

allUsers

boolean

No

If true, alarms for all users.

maximumResultsPerPage

int

No

The maximum number of rows the response can contain, regardless of the actual number of rows returned.

Output

Alarm Summary Data Results with result set and next page ID.

Element

Type

Nillable?

Description

GetFirstPageAlarmsByAlarmStatusResult

AlarmSummaryDataResults

Yes

Response model for alarm summary.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmSummaryDataResults GetFirstPageAlarmsByAlarmStatus(AlarmStatusEnum Status, DateTime StartDate, DateTime EndDate, bool AllUsers, int MaxResultsPerPage)

        {

            AlarmServiceClient alarmClient = null;

            AlarmSummaryDataResults results = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving data model.

                results = alarmClient.GetFirstPageAlarmsByAlarmStatus(StartDate, EndDate, Status, AllUsers, MaxResultsPerPage);

            }

            finally

            {

                if (alarmClient != null && alarmClient.State != System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // Returns an object representing all the resulting models for the first page given the criteria supplied.  If no results found a null object is returned.

            return results;

        }

      

Method: GetFirstPageAlarmsByEntityID

Description

Retrieve the first page of alarms filtered by the entity.            

Input

The input of this method is the argument GetFirstPageAlarmsByEntityID having the following structure.

Element

Type

Nillable?

Description

startDate

dateTime

No

Start date for the data query.

endDate

dateTime

No

End date for the data query.

entityID

int

No

The unique ID of the entity.

allUsers

boolean

No

If true, alarms for all users.

maximumResultsPerPage

int

No

The maximum number of rows the response can contain, regardless of the actual number of rows returned.

Output

Alarm Summary Data Results with result set and next page ID.

Element

Type

Nillable?

Description

GetFirstPageAlarmsByEntityIDResult

AlarmSummaryDataResults

Yes

Response model for alarm summary.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmSummaryDataResults GetFirstPageAlarmsByEntityID(int EntityID, DateTime StartDate, DateTime EndDate, bool AllUsers, int MaxResultsPerPage)

        {

            AlarmServiceClient alarmClient = null;

            AlarmSummaryDataResults results = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving data model.

                results = alarmClient.GetFirstPageAlarmsByEntityID(StartDate, EndDate, EntityID, AllUsers, MaxResultsPerPage);

            }

            finally

            {

                if (alarmClient != null && alarmClient.State != System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // Returns an object representing all the resulting models for the first page given the criteria supplied.  If no results found a null object is returned.

            return results;

        }

       

Method: GetNextPageAlarms

Description

Retrieve the next page of alarms.            

Input

The input of this method is the argument GetNextPageAlarms having the following structure.

Element

Type

Nillable?

Description

nextPageID

string

Yes

The next page ID. The previous AlarmSummaryDataResults results object has this ID.

Output

Alarm Summary Data Results with result set and next page ID.

Element

Type

Nillable?

Description

GetNextPageAlarmsResult

AlarmSummaryDataResults

Yes

Response model for alarm summary.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private AlarmSummaryDataResults GetNextPageAlarms(string NextPageID)

        {

            AlarmServiceClient alarmClient = null;

            AlarmSummaryDataResults results = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving data model.

                results = alarmClient.GetNextPageAlarms(NextPageID);

            }

            finally

            {

                if (alarmClient != null && alarmClient.State != System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // Returns next page of results in a pervious query.

            return results;

        }

      

Method: UpdateAlarmStatus

Description

Update the alarm status and optionally provide comments. The Alarm ID is derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.            

Input

The input of this method is the argument UpdateAlarmStatus having the following structure.

Element

Type

Nillable?

Description

alarmID

long

No

The unique ID of the alarm.

status

AlarmStatusEnum

Yes

The status enumeration for the alarm update.

comments

string

Yes

The provided comments for the alarm update.

Output

The result of the update.

Element

Type

Nillable?

Description

UpdateAlarmStatusResult

SaveResult

Yes

A response object which supplies information about an attempt to insert data. This information includes record ID if created and error / warning messages if generated.

Faults

Name

Content

Description

LogRhythmWebServiceFaultFault

LogRhythmWebServiceFault

This is the error message object for all of LogRhythm Web Services.  This object provides custom meaningful error messages to the client while retaining security precautions for the system.

EXAMPLE

private SaveResult UpdateAlarmStatus(int AlarmID, AlarmStatusEnum Status, string Comments)

        {

            AlarmServiceClient alarmClient = null;

            SaveResult result = null;

            try

            {

                // Create connection to service.

                alarmClient = new AlarmServiceClient("AlarmServiceBasicAuth_AlarmService");

                alarmClient.ClientCredentials.UserName.UserName = username;

                alarmClient.ClientCredentials.UserName.Password = password;

                // Call method retrieving data model.

                result = alarmClient.UpdateAlarmStatus(AlarmID, Status, Comments);

            }

            finally

            {

                if (alarmClient != null && alarmClient.State != System.ServiceModel.CommunicationState.Faulted)

                {

                    alarmClient.Close();

                }

            }

            // This result is a confirmation that the comments were added.  The result also informs the user of errors / warnings generated by the update.

            return result;

        }

     

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.