Skip to content

Latest commit

 

History

History
155 lines (117 loc) · 6.26 KB

File metadata and controls

155 lines (117 loc) · 6.26 KB

TimeSeriesValueBankProperty

Method HTTP request Release Stage
get_latest_value GET /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue Stable
stream_values POST /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues Stable

get_latest_value

Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration.

Parameters

Name Type Description Notes
ontology OntologyIdentifier
object_type ObjectTypeApiName The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager.
primary_key PropertyValueEscapedString The primary key of the object with the timeseries property.
property_name PropertyApiName The API name of the timeseries property. To find the API name for your property value bank property, check the Ontology Manager or use the Get object type endpoint.
sdk_package_rid Optional[SdkPackageRid] The package rid of the generated SDK. [optional]
sdk_version Optional[SdkVersion] The version of the generated SDK. [optional]

Return type

Optional[TimeseriesEntry]

Example

from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint

client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")

# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.
object_type = "employee"
# PropertyValueEscapedString | The primary key of the object with the timeseries property.
primary_key = 50030
# PropertyApiName | The API name of the timeseries property. To find the API name for your property value bank property, check the **Ontology Manager** or use the **Get object type** endpoint.
property_name = "performance"
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The version of the generated SDK.
sdk_version = None


try:
    api_response = client.ontologies.TimeSeriesValueBankProperty.get_latest_value(
        ontology,
        object_type,
        primary_key,
        property_name,
        sdk_package_rid=sdk_package_rid,
        sdk_version=sdk_version,
    )
    print("The get_latest_value response:\n")
    pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
    print("HTTP error when calling TimeSeriesValueBankProperty.get_latest_value: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 Optional[TimeseriesEntry] Success response. application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

stream_values

Stream all of the points of a time series property (this includes geotime series references).

Parameters

Name Type Description Notes
ontology OntologyIdentifier
object_type ObjectTypeApiName The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager.
primary_key PropertyValueEscapedString The primary key of the object with the time series property.
property PropertyApiName The API name of the time series backed property. To find the API name, check the Ontology Manager or use the Get object type endpoint.
range Optional[TimeRange] [optional]
sdk_package_rid Optional[SdkPackageRid] The package rid of the generated SDK. [optional]
sdk_version Optional[SdkVersion] The version of the generated SDK. [optional]

Return type

bytes

Example

from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint

client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")

# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.
object_type = "employee"
# PropertyValueEscapedString | The primary key of the object with the time series property.
primary_key = 50030
# PropertyApiName | The API name of the time series backed property. To find the API name, check the **Ontology Manager** or use the **Get object type** endpoint.
property = None
# Optional[TimeRange]
range = {
    "type": "relative",
    "startTime": {"when": "BEFORE", "value": 5, "unit": "MONTHS"},
    "endTime": {"when": "BEFORE", "value": 1, "unit": "MONTHS"},
}
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The version of the generated SDK.
sdk_version = None


try:
    api_response = client.ontologies.TimeSeriesValueBankProperty.stream_values(
        ontology,
        object_type,
        primary_key,
        property,
        range=range,
        sdk_package_rid=sdk_package_rid,
        sdk_version=sdk_version,
    )
    print("The stream_values response:\n")
    pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
    print("HTTP error when calling TimeSeriesValueBankProperty.stream_values: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 bytes Success response. /

[Back to top] [Back to API list] [Back to Model list] [Back to README]