Getting started
This is the public API for the Greenbyte Platform.
Note that this is the beta version of the API, containing new features that might change. This means that any SDKs downloaded for this version might have minor incompatibilities in the future. If you want to view the latest stable API specification, use the version selection dropdown in the top right of the page.
What's new
2020-06-08 – Data endpoint aggregation by group
If you have divided you sites into groups of assets, you can now aggregate your data by those groups when calling the Data, Real Time Data, and Data Per Category endpoints.
The new deviceLevel
aggregation mode (aggregate
parameter) aggregates data based on the hierarchy level directly below site.
2020-04-27 – Data signal permissions
It is now possible to set permissions for individual data signals for API keys (Share > API Keys in the Greenbyte Platform). When adding/editing an API key, there is a new option to select authorized data signals in addition to the device selection. Leaving the signal selection blank (nothing selected) gives permission to all current and future data signals, just like previously created API keys.
API endpoints affected by data signal permissions:
datasignals.json
: filters returned data signals based on permissions.data.json
,realtimedata.json
,datapercategory.json
: gives 401 Unauthorized error for data signals without permission.status.json
,activestatus.json
: may omit lost production values (in thelostProduction
field) based on data signal permissions.
2020-03-30 – Data Per Category endpoint
We have added a new endpoint to the Greenbyte Platform to make it possible to extract Lost Production data per contract category from the API. You can find more information about this endpoint here: Data Per Category.
General notes regarding endpoints
- Endpoints that take
page
andpageSize
parameters return aLink
header as defined in RFC 8288. - Some endpoints return data in your local time zone. This time zone can be fetched from the
configuration.json
endpoint. - All endpoints can also be reached using the POST method, with a JSON request body instead of query parameters.
- All endpoints implement rate limiting. More information is available under the 429 error response description for each endpoint.
How to Build
This client library is a Ruby gem which can be compiled and used in your Ruby and Ruby on Rails project. This library requires a few gems from the RubyGems repository.
- Open the command line interface or the terminal and navigate to the folder containing the source code.
- Run
gem build test_pack_1.gemspec
to build the gem. - Once built, the gem can be installed on the current work environment using
gem install test_pack_1-1.0.0.gem
How to Use
The following section explains how to use the TestPack1 Ruby Gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.
1. Starting a new project
Close any existing projects in RubyMine™ by selecting File -> Close Project
. Next, click on Create New Project
to create a new project from scratch.
Next, provide TestApp
as the project name, choose Rails Application
as the project type, and click OK
.
In the next dialog make sure that correct Ruby SDK is being used (minimum 2.0.0) and click OK
.
This will create a new Rails Application project with an existing set of files and folder.
2. Add reference of the gem
In order to use the TestPack1 gem in the new project we must add a gem reference. Locate the Gemfile
in the Project Explorer window under the TestApp
project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: gem 'test_pack_1', '~> 1.0.0'
3. Adding a new Rails Controller
Once the TestApp
project is created, a folder named controllers
will be visible in the Project Explorer under the following path: TestApp > app > controllers
. Right click on this folder and select New -> Run Rails Generator...
.
Selecting the said option will popup a small window where the generator names are displayed. Here, select the controller
template.
Next, a popup window will ask you for a Controller name and included Actions. For controller name provide Hello
and include an action named Index
and click OK
.
A new controller class anmed HelloController
will be created in a file named hello_controller.rb
containing a method named Index
. In this method, add code for initialization and a sample for its usage.
How to Test
You can test the generated SDK and the server with automatically generated test cases as follows:
- From terminal/cmd navigate to the root directory of the SDK.
- Invoke:
bundle exec rake
Initialization
Authentication
In order to setup authentication and initialization of the API client, you need the following information.
Parameter | Description |
---|---|
api_token | TODO: add a description |
API client can be initialized as following.
# Configuration parameters and credentials
api_token = 'api_token'
client = TestPack1::TestPack1Client.new(
api_token: api_token
)
The added initlization code can be debugged by putting a breakpoint in the Index
method and running the project in debug mode by selecting Run -> Debug 'Development: TestApp'
.
Class Reference
List of Controllers
StatusesController
Get singleton instance
The singleton instance of the StatusesController
class can be accessed from the API Client.
statuses_controller = client.statuses
get_active_statuses
Gets active statuses for multiple devices. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_active_statuses(device_ids,
category = nil,
fields = nil,
sort_by = nil,
sort_asc = false,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
Which devices to get statuses for. |
category | Optional Collection |
Which status categories to get statuses for. |
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the StatusItem schema. By default all fields are included. |
sort_by | Optional Collection |
Which fields to sort the response items by. By default the items are sorted by timestampStart. |
sort_asc | Optional DefaultValue |
Whether to sort the items in ascending order. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
device_ids = [161]
category = [TestPack1::StatusCategoryEnum::STOP]
fields = ['fields']
sort_by = ['sortBy']
sort_asc = false
page_size = 50
page = 1
result = statuses_controller.get_active_statuses(device_ids, category, fields, sort_by, sort_asc, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_statuses
Gets statuses for multiple devices during the given time period. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_statuses(device_ids,
,
,
category = nil,
fields = nil,
sort_by = nil,
sort_asc = false,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
Which devices to get statuses for. |
timestamp_start | Required |
The first timestamp to get data for. Timestamps ending with 'Z' are treated as UTC. Other timestamps are treated as local time in your system-configured time zone. |
timestamp_end | Required |
The last timestamp to get data for. Timestamps ending with 'Z' are treated as UTC. Other timestamps are treated as local time in your system-configured time zone. |
category | Optional Collection |
Which status categories to get statuses for. |
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the StatusItem schema. By default all fields are included. |
sort_by | Optional Collection |
Which fields to sort the response items by. By default the items are sorted by timestampStart. |
sort_asc | Optional DefaultValue |
Whether to sort the items in ascending order. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
device_ids = [161]
= DateTime.now
= DateTime.now
category = [TestPack1::StatusCategoryEnum::STOP]
fields = ['fields']
sort_by = ['sortBy']
sort_asc = false
page_size = 50
page = 1
result = statuses_controller.get_statuses(device_ids, , , category, fields, sort_by, sort_asc, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
DataController
Get singleton instance
The singleton instance of the DataController
class can be accessed from the API Client.
data_controller = client.data
get_data_signals
Gets authorized data signals for one or more devices. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_data_signals(device_ids); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
What devices to get data signals for. |
Example Usage
device_ids = [161]
result = data_controller.get_data_signals(device_ids)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_data
Gets data for multiple devices and data signals in the given resolution. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_data(device_ids,
data_signal_ids,
,
,
resolution = nil,
aggregate = nil,
calculation = nil); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
Which devices to get data for. |
data_signal_ids | Required Collection |
Which data signals to get data for. |
timestamp_start | Required |
The first timestamp to get data for. Timestamps ending with 'Z' are treated as UTC. Other timestamps are treated as local time in your system-configured time zone. |
timestamp_end | Required |
The last timestamp to get data for. Timestamps ending with 'Z' are treated as UTC. Other timestamps are treated as local time in your system-configured time zone. |
resolution | Optional |
The desired data resolution. |
aggregate | Optional |
How the data should be aggregated with regards to device(s) or site(s). |
calculation | Optional |
The calculation used when aggregating data, both over time and across devices. The default is the data signal default. |
Example Usage
device_ids = [161]
data_signal_ids = [161]
= DateTime.now
= DateTime.now
resolution = TestPack1::ResolutionEnum::ENUM_5MINUTE
aggregate = TestPack1::AggregateModeEnum::DEVICE
calculation = TestPack1::CalculationModeEnum::AVERAGE
result = data_controller.get_data(device_ids, data_signal_ids, , , resolution, aggregate, calculation)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_real_time_data
Gets the most recent high-resolution data point for each specified device and data signal. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_real_time_data(device_ids,
data_signal_ids,
aggregate = nil,
calculation = nil); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
Which devices to get data for. |
data_signal_ids | Required Collection |
Which data signals to get data for. |
aggregate | Optional |
How the data should be aggregated with regards to device(s) or site(s). |
calculation | Optional |
The calculation used when aggregating data, both over time and across devices. The default is the data signal default. |
Example Usage
device_ids = [161]
data_signal_ids = [161]
aggregate = TestPack1::AggregateModeEnum::DEVICE
calculation = TestPack1::CalculationModeEnum::AVERAGE
result = data_controller.get_real_time_data(device_ids, data_signal_ids, aggregate, calculation)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_data_per_category
Gets signal data aggregated per availability contract category. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_data_per_category(device_ids,
data_signal_id,
,
,
aggregate = nil,
category = nil); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
Which devices to get data for. |
data_signal_id | Required |
Which signal to get data for; only Lost Production signals are supported at the moment. |
timestamp_start | Required |
The first timestamp to get data for. Timestamps ending with 'Z' are treated as UTC. Other timestamps are treated as local time in your system-configured time zone. |
timestamp_end | Required |
The last timestamp to get data for. Timestamps ending with 'Z' are treated as UTC. Other timestamps are treated as local time in your system-configured time zone. |
aggregate | Optional |
How the data should be aggregated with regards to device(s) or site(s). |
category | Optional Collection |
Which status categories to include. By default all categories are included. |
Example Usage
device_ids = [161]
data_signal_id = 161
= DateTime.now
= DateTime.now
aggregate = TestPack1::AggregateModeEnum::DEVICE
category = [TestPack1::StatusCategoryEnum::STOP]
result = data_controller.get_data_per_category(device_ids, data_signal_id, , , aggregate, category)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
AlertsController
Get singleton instance
The singleton instance of the AlertsController
class can be accessed from the API Client.
alerts_controller = client.alerts
get_active_alarms
This endpoint is deprecated. Please use the new endpoint
/activealerts.json
instead.
def get_active_alarms(device_ids,
fields = nil,
sort_by = nil,
sort_asc = false,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
What devices to get alerts for. |
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the AlertItem schema. By default all fields are included. |
sort_by | Optional Collection |
Which fields to sort the response items by. By default the items are sorted by timestampStart. |
sort_asc | Optional DefaultValue |
Whether to sort the items in ascending order. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
device_ids = [161]
fields = ['fields']
sort_by = ['sortBy']
sort_asc = false
page_size = 50
page = 1
result = alerts_controller.get_active_alarms(device_ids, fields, sort_by, sort_asc, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_active_alerts
Gets active alerts for multiple devices.
def get_active_alerts(device_ids,
fields = nil,
sort_by = nil,
sort_asc = false,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
What devices to get alerts for. |
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the AlertItem schema. By default all fields are included. |
sort_by | Optional Collection |
Which fields to sort the response items by. By default the items are sorted by timestampStart. |
sort_asc | Optional DefaultValue |
Whether to sort the items in ascending order. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
device_ids = [161]
fields = ['fields']
sort_by = ['sortBy']
sort_asc = false
page_size = 50
page = 1
result = alerts_controller.get_active_alerts(device_ids, fields, sort_by, sort_asc, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_alerts
Gets alerts for multiple devices and the given time period.
def get_alerts(device_ids,
,
,
fields = nil,
sort_by = nil,
sort_asc = false,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
What devices to get alerts for. |
timestamp_start | Required |
The first timestamp to get data for. |
timestamp_end | Required |
The last timestamp to get data for. |
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the AlertItem schema. By default all fields are included. |
sort_by | Optional Collection |
Which fields to sort the response items by. By default the items are sorted by timestampStart. |
sort_asc | Optional DefaultValue |
Whether to sort the items in ascending order. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
device_ids = [161]
= DateTime.now
= DateTime.now
fields = ['fields']
sort_by = ['sortBy']
sort_asc = false
page_size = 50
page = 1
result = alerts_controller.get_alerts(device_ids, , , fields, sort_by, sort_asc, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_alarms
This endpoint is deprecated. Please use the new endpoint
/alerts.json
instead.
def get_alarms(device_ids,
,
,
fields = nil,
sort_by = nil,
sort_asc = false,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
What devices to get alerts for. |
timestamp_start | Required |
The first timestamp to get data for. |
timestamp_end | Required |
The last timestamp to get data for. |
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the AlertItem schema. By default all fields are included. |
sort_by | Optional Collection |
Which fields to sort the response items by. By default the items are sorted by timestampStart. |
sort_asc | Optional DefaultValue |
Whether to sort the items in ascending order. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
device_ids = [161]
= DateTime.now
= DateTime.now
fields = ['fields']
sort_by = ['sortBy']
sort_asc = false
page_size = 50
page = 1
result = alerts_controller.get_alarms(device_ids, , , fields, sort_by, sort_asc, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
ConfigurationDataController
Get singleton instance
The singleton instance of the ConfigurationDataController
class can be accessed from the API Client.
configurationData_controller = client.configuration_data
get_configuration
Gets your system-wide configuration data. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_configuration; end
Example Usage
result = configurationData_controller.get_configuration()
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
AssetsController
Get singleton instance
The singleton instance of the AssetsController
class can be accessed from the API Client.
assets_controller = client.assets
get_devices
Gets a list of devices that the API key has permissions for. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_devices(device_type_ids = nil,
site_ids = nil,
parent_ids = nil,
fields = nil,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_type_ids | Optional Collection |
Which device types to get. Examples: |
- 1 - Wind turbine
- 2 - Production meter
- 3 - Met mast
- 4 - Inverter
- 10 - Device group
- 11 - Grid meter
- 12 - Combiner box
- 23 - String |
| site_ids |
Optional
Collection
| Only include devices at these sites. | | parent_ids |Optional
Collection
| Only include devices with these parent devices. | | fields |Optional
Collection
| Which fields to include in the response. Valid fields are those defined in theDevice
schema. By default all fields are included. | | page_size |Optional
DefaultValue
| The number of items to return per page. | | page |Optional
DefaultValue
| Which page to return when the number of items exceed the page size. |
Example Usage
device_type_ids = [252]
site_ids = [252]
parent_ids = [252]
fields = ['fields']
page_size = 50
page = 1
result = assets_controller.get_devices(device_type_ids, site_ids, parent_ids, fields, page_size, page)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |
get_sites
Gets a list of sites that the API key has permissions for. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_sites(fields = nil,
page_size = 50,
page = 1); end
Parameters
Parameter | Tags | Description |
---|---|---|
fields | Optional Collection |
Which fields to include in the response. Valid fields are those defined in the SiteWithData schema. By default all fields are included. |
page_size | Optional DefaultValue |
The number of items to return per page. |
page | Optional DefaultValue |
Which page to return when the number of items exceed the page size. |
Example Usage
fields = ['fields']
page_size = 50
page = 1
result = assets_controller.get_sites(fields, page_size, page)
get_power_curves
Gets the default or learned power curves for wind turbines. Other device types are not supported. This request can also be made using the POST method, with a JSON request body instead of query parameters.
def get_power_curves(device_ids,
= nil,
learned = false); end
Parameters
Parameter | Tags | Description |
---|---|---|
device_ids | Required Collection |
What devices to get power curves for. Only wind turbines are supported. |
timestamp | Optional |
The date for which to get power curves. The default is the current date. |
learned | Optional DefaultValue |
Whether to get learned power curves instead of default power curves. |
Example Usage
device_ids = [252]
= DateTime.now
learned = false
result = assets_controller.get_power_curves(device_ids, , learned)
Errors
Error Code | Error Description |
---|---|
400 | The request cannot be fulfilled due to bad syntax. |
401 | One of the following: * The request is missing a valid API key. * The API key does not authorize access the requested data. Devices or data signals can be limited. |
405 | The HTTP method is not allowed for the endpoint. |
429 | The API key has been used in too many requests in a given amount of time. The following headers will be set in the response: * X-Rate-Limit-Limit - The total number of allowed requests for this period. * X-Rate-Limit-Remaining - The remaining number of requests for this period. * X-Rate-Limit-Reset - The number of seconds left until the end of this period. |