Skip to main content

Farsight Alarms API

Updated over 2 months ago

Requirements

  • An active Farsight® Admin account

  • Authorized API Key

Limitations

  • For details on usage limits (like requests per hour/month), please refer to the dedicated limitations article

Get All Alarms (GET /v1/alarms)

The following parameters are used to filter, sort, and paginate the list of alarms returned in the response. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

Limit

integer

No

The number of items you want the API to return. It can range from 1 to 50 (Free) or 1 to 500 (Pro). The default value is set to 25.

Offset

integer

No

The index of the first item to return. Must be 0 or greater. It is set to 0 by default.

Type

string

No

The desired type of the returning alarms. You can choose from OutOfComm, Fault, ProductionInFault, SilentOutage, OutageInWarning, UserTriggered, Warning, Misalignment, SiteOutOfComm, Digital, DigitalRateOfChange, SilentDerating, TemperatureCheck, AbnormalWind, WindGust, and AnalogRateOfChange.

State

string

No

The desired state of the returning alarms. You can choose from NotActive, ActiveNotAcked, ActiveAcked, and NotActiveNotAcked.

AssetId

integer

No

The ID of the asset. You can add multiple assets.

Severity

string

No

The severity of the alarm/alarms to return.

MinDuration

string

No

The minimum duration of the returned alarms in ISO 8601 standard format. (example: 'PT1H30M' for 1h and 30m).

MaxDuration

string

No

The maximum duration of the returned alarms in ISO 8601 standard format. (example: 'PT1H30M' for 1h and 30m).

From

string

No

The start date to get alarms, entries with a start time greater or equal than this value will be included. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

To

string

No

The end date to get alarms, entries with an end time greater or equal than this value will be included. If not provided open alarms will be returned too. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

sort

string

No

Fields used in the results sorting. Composed by the name of the field followed by :asc or :desc. Example: id:asc.

Get the List of Alarm Areas (GET /v1/alarms/areas)

These alarms can be downloaded for further use.

Get Alarm by ID (GET /v1/alarms/{id})

The Alarm id is a mandatory field. You can obtain it from the GET/v1/alarms call above.

Input Parameter

Type

Required

Definition

id

string

Yes

The ID of the alarm to return.

Create Alarm (POST /v1/alarms)

The following parameters are used to create a new alarm. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

assetId

integer

Yes

The ID of the asset you want to create the alarm for.

severity

integer

No

The severity of the alarm/alarms to return. It is set to 3 by default.

area

string

No

This defines the area for which you want to set up the alarm for.

message

string

No

The message you want to display when the alarm goes off.

ackRequired

string

No

This defines if acknowledgement should be required after the alarm or not. The value can be True or False.

startTime

string

Yes

This defines the time when the alarm goes off. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

endTime

string

No

This is the time when the alarm stops. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

ackTime

string

No

This defines the time the operator acknowledges the alarm.

Create Alarm Areas (POST /v1/alarms/areas)

The following parameters are used to create new alarm areas. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

name

string

Yes

This is the name of the new alarm area.

Delete an Alarm by ID (DELETE/v1/alarms/areas/{id})

Go to:

The following parameters are used to delete an alarm. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

id

string

Yes

This is the ID of the alarm you want to delete.

Update an Existing Alarm (PATCH/v1/alarms/{id})

Go to:

The following parameters are used to update an existing alarm. All parameters are optional unless otherwise noted.

Input Parameter

Type

Required

Definition

id

string

Yes

This is the ID of the alarm you want to delete.

Severity

integer

No

The severity of the alarm/alarms to return. It is set to 3 by default.

area

string

No

This defines the area for which you want to set up the alarm for.

message

string

No

This defines the message you want to display when the alarm goes off.

ackRequired

string

No

This defines whether acknowledgement should be required after the alarm or not. The value can be True or False.

startTime

string

No

This defines the time when the alarm goes off. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

endTime

string

No

This is the time when the alarm stops. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

ackTime

string

No

This defines the time the operator acknowledges the alarm.

Did this answer your question?