New: build custom CDF applications with Cognite Flows. Documentation · What's new.
from cognite.client.data_classes import DataPointSubscriptionUpdate
update = DataPointSubscriptionUpdate("my_subscription").name.set("My New Name")
updated = client.time_series.subscriptions.update(update)
from cognite.client.data_classes import DataPointSubscriptionUpdate
update = DataPointSubscriptionUpdate("my_subscription").time_series_ids.add(["MyNewTimeSeriesExternalId"])
updated = client.time_series.subscriptions.update(update){
"items": [
{
"externalId": "my.known.id",
"partitionCount": 50,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"name": "<string>",
"description": "<string>",
"dataSetId": 4503599627370496,
"timeSeriesCount": 123,
"filter": {
"or": [
{
"not": {
"and": [
{
"equals": {
"property": [
"metadata",
"manufacturer"
],
"value": "acme"
}
},
{
"in": {
"property": [
"name"
],
"values": [
"pump-1-temperature",
"motor-9-temperature"
]
}
},
{
"range": {
"property": [
"dataSetId"
],
"gte": 1,
"lt": 10
}
}
]
}
},
{
"and": [
{
"equals": {
"property": [
"assetId"
],
"value": 1234
}
},
{
"equals": {
"property": [
"description"
],
"value": "Temperature in Celsius"
}
}
]
}
]
}
}
]
}Required capabilities:
timeSeriesSubscriptionsAcl:WRITE
Updates one or more subscriptions. Fields that are not included in the request, are not changed.
If both instanceIds and timeSeriesIds are set, they must either both be add/remove or
both be set operations.
from cognite.client.data_classes import DataPointSubscriptionUpdate
update = DataPointSubscriptionUpdate("my_subscription").name.set("My New Name")
updated = client.time_series.subscriptions.update(update)
from cognite.client.data_classes import DataPointSubscriptionUpdate
update = DataPointSubscriptionUpdate("my_subscription").time_series_ids.add(["MyNewTimeSeriesExternalId"])
updated = client.time_series.subscriptions.update(update){
"items": [
{
"externalId": "my.known.id",
"partitionCount": 50,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000,
"name": "<string>",
"description": "<string>",
"dataSetId": 4503599627370496,
"timeSeriesCount": 123,
"filter": {
"or": [
{
"not": {
"and": [
{
"equals": {
"property": [
"metadata",
"manufacturer"
],
"value": "acme"
}
},
{
"in": {
"property": [
"name"
],
"values": [
"pump-1-temperature",
"motor-9-temperature"
]
}
},
{
"range": {
"property": [
"dataSetId"
],
"gte": 1,
"lt": 10
}
}
]
}
},
{
"and": [
{
"equals": {
"property": [
"assetId"
],
"value": 1234
}
},
{
"equals": {
"property": [
"description"
],
"value": "Temperature in Celsius"
}
}
]
}
]
}
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
Use this file to discover all available pages before exploring further.
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
The subscriptions to update
1 elementShow child attributes
A list of subscriptions updated
List of subscriptions.
Show child attributes
Was this page helpful?