Powertrain Analytics API Client
Bases: BasePowertrainAPIClient
Powertrain Analytics API Client.
Source code in reportconnectors/api_client/powertrain/analytics/__init__.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
get_report_algorithm_results(asset_id, start_date, end_date, algorithm_name, use_all_retentions=False)
Gets the results of given algorithm calculations from the /report/algorithm/results/{assetId}
endpoint for requested asset_id and time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_id
|
int
|
Asset identifier |
required |
start_date
|
DateType
|
Start Date |
required |
end_date
|
DateType
|
End Date |
required |
algorithm_name
|
Union[str, Sequence[str]]
|
Name of the algorithm, as given in type definitions. It might be a single name, or collection of names. |
required |
use_all_retentions
|
bool
|
If True, it will return all data for the algorithm, otherwise only the results. It can be used to get the latest CI model in the response. |
False
|
Returns:
| Type | Description |
|---|---|
AlgorithmResultsResponse
|
Algorithm calculation results. |
Source code in reportconnectors/api_client/powertrain/analytics/__init__.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
get_report_algorithms_overview(asset_id, start_date, end_date)
Gets the list of algorithm available for an asset identified by asset id
The data comes from /report/algorithm/results/overview/{assetId} endpoint for
requested asset_id and time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_id
|
int
|
Asset identifier |
required |
start_date
|
DateType
|
Start Date |
required |
end_date
|
DateType
|
End Date |
required |
Returns:
| Type | Description |
|---|---|
AlgorithmOverviewResponse
|
Dictionary with the list of algorithms available for the asset. |
Source code in reportconnectors/api_client/powertrain/analytics/__init__.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
get_report_asset_conditions(asset_id, start_date, end_date)
Gets the asset conditions for the given asset_id and time range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
asset_id
|
int
|
Asset identifier |
required |
start_date
|
DateType
|
Start Date |
required |
end_date
|
DateType
|
End Date |
required |
Returns:
| Type | Description |
|---|---|
AssetConditionResponse
|
Asset conditions. |
Source code in reportconnectors/api_client/powertrain/analytics/__init__.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |