Skip to main content

Farsight® Assets API

Updated over 2 months ago

Requirements

  • An active Farsight® admin account

  • Authorized API key

Limitations

Get A Paginated List of Assets (GET/v1/assets)

This API allows you to get a list of assets from your Farsight organisation.

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

Input Parameter

Type

Required

Definition

ConnectionId

integer

No

The ID of a connection.

Category

string

No

Asset category. Example: “Wec”.

SiteId

string

No

The ID of a site.

Model

string

No

The model of the asset.

NominalPowerFrom

string

No

Minimum value for the nominal power of the asset.

NominalPowerTo

string

No

Maximum value for the nominal power of the asset.

Limit

string

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

string

No

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

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 One Asset (GET/v1/assets/{id})

This API allows you to get one individual asset. You need to provide the id for the asset. Here are the parameters required:

Input Parameter

Type

Required

Definition

id

string

Yes

The id of the asset you want reports returned for.

Get Asset Availability (GET/v1/assets/{id}/availability)

You can get the availability for the asset. Here are the parameters:

Input Parameter

Type

Required

Definition

id

string

Yes

The ID of the asset you want availability returned for.

From

string

No

The beginning period for the collected availability. Entries with a start time greater than or equal to this value will be included. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

To

string

No

The ending period for the collected availability. Entries with a start time less than or equal to this value will be included. It can be in UNIX seconds or a UTC Timestamp (ISO 8601).

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.

Get Statuses (GET /assets/{id}/statuses

Return a list of all the statuses of an asset. You need to provide the id for the asset. Here are the parameters required:

Input

Type

Required

Definition

id

integer

Yes

The ID of the asset that you want to query statuses for. You can retrieve the desired asset id either by running a GET Assets API call and checking the response body.

Limit

integer

No

The number of items to return. Ranges from 1 to 50 (Free tier) or 1 to 500 (pro). Default value is 25.

Offset

integer

No

The index of the first item to return. Must be 0 or greater. Default value is 0 .

EventType

array[string]

No

The type of status you want to query. Available values: Information = 0, Maintenance = 1, Warning = 2, Fault = 3. Default value is all.

StatusCode

array[string]

No

The status code you want to query. Default value is all.

From

string

Yes

The start date. UNIX or UTC Timestamp (ISO 8601).

To

string

Yes

The end date. UNIX or UTC Timestamp (ISO 8601).

MinDuration

string

No

The minimum duration of the returned alarms in ISO 8601 standard format. (Example: 'PT1H30M' corresponds to 1h 30m.)

MaxDuration

string

No

The maximum duration of the returned alarms in ISO 8601 standard format. (Example: 'PT1H30M' corresponds to 1h 30m.)

sort

Array[string]

No

Fields used in the results sorting. Composed by the name of the field followed by :asc or :desc. Options include start, end, and duration. Example: duration:asc.

Get Asset Parameters (GET/v1/assets/{id}/parameters)

This API allows you to get asset parameters. You need to provide the id for the asset. Here are the request parameters required:

Input Parameter

Type

Required

Definition

id

string

Yes

The ID of the asset you want parameters returned for.

Limit

integer

No

The number of items to return. Ranges from 1 to 50 (Free tier) or 1 to 500 (pro). Default value is 25.

Offset

integer

No

The index of the first item to return. Must be 0 or greater. Default value is 0.

Get Asset Parameters Values (GET/v1/assets/{id}/parameters/values)

This API allows you to get asset parameters values. You need to provide the id for the asset. Here are the request parameters required:

Input Parameter

Type

Required

Definition

id

string

Yes

The ID of the asset you want parameters returned for.

Limit

integer

No

The number of items to return. Ranges from 1 to 50 (Free tier) or 1 to 500 (pro). Default value is 25.

Offset

integer

No

The index of the first item to return. Must be 0 or greater. Default value is 0.

Get Asset Parameters Details (GET/v1/assets/{id}/parameters/{paramId})

This call returns the device parameter details. Here are the request parameters required:

Input Parameter

Type

Required

Definition

id

string

Yes

The ID of the asset you want parameters returned for.

paramId

integer

Yes

The ID of the parameter.

Related Content

Did this answer your question?