Skip to content

Update an Insight

Reference:

Field Description
start_date Start date for the Insight. Time is based on UTC timezone, formatted in RFC 3339.
end_date End date for the Insight. Time is based on UTC timezone, formatted in RFC 3339.
tag_name Tag name to categorize the Insight
resource The Asset that this Insight is related to. This is in KRN format (e.g. krn:asset:bp_01)
source The process that created this Insight. This can be a user or an automated process like a workload, Kelvin SmartApps™, etc. This is KRN format.
description Detailed description of the Insight.
contexts A list of associated resources with this Insight. This can be a Data Stream, Kelvin SmartApps™ or any other valid resource in the Kelvin Platform.

Update an Insight

You can read how to update insights in the Operations Tools documentation here.

API cURL Example
curl -X 'POST' \
  'https://<url.kelvin.ai>/api/v4/datatags/118f5665-fdad-4c28-a09f-ca0a416202ff/update' \
  -H 'Authorization: Bearer <Your Current Token>' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "start_date": "2025-06-13T21:07:30.741Z",
  "end_date": "2025-06-14T09:07:30.741Z",
  "tag_name": "Low Temperature",
  "resource": "krn:asset:esp_06",
  "source": "krn:user:ivo.fernandes@kelvininc.com",
  "description": null,
  "contexts": []
}'

The response will look like this;

API cURL Example Response
{
  "id": "118f5665-fdad-4c28-a09f-ca0a416202ff",
  "start_date": "2025-06-13T21:07:30.741Z",
  "end_date": "2025-06-14T09:07:30.741Z",
  "tag_name": "Low Temperature",
  "resource": "krn:asset:esp_06",
  "source": "krn:user:ivo.fernandes@kelvininc.com",
  "description": null,
  "contexts": [],
  "created": "2025-06-14T09:54:23.352478Z",
  "updated": "2025-06-14T11:56:35.192941Z"
}
API Client (Python) Example
from kelvin.api.client import Client

# Login
client = Client(url="https://<url.kelvin.ai>", username="<your_username>")
client.login(password="<your_password>")

# Update Data Tag
response = client.data_tag.update_data_tag(datatag_id="118f5665-fdad-4c28-a09f-ca0a416202ff/", data={
    "start_date": "2025-06-13T21:07:30.741Z",
    "end_date": "2025-06-14T09:07:30.741Z",
    "tag_name": "Low Temperature",
    "resource": "krn:asset:esp_06",
    "source": "krn:user:ivo.fernandes@kelvininc.com",
    "description": None,
    "contexts": []
    })

print(response)

The response will look like this;

API Client (Python) Example Response
id=UUID('118f5665-fdad-4c28-a09f-ca0a416202ff') start_date=datetime.datetime(2024, 6, 13, 21, 7, 30, 741000, tzinfo=datetime.timezone.utc) end_date=datetime.datetime(2024, 6, 14, 9, 7, 30, 741000, tzinfo=datetime.timezone.utc) tag_name='Low Temperature' resource=KRNAsset(asset='esp_06') source=KRN(krn:user:ivo.fernandes@kelvininc.com) description=None contexts=[] created=datetime.datetime(2024, 6, 14, 9, 54, 23, 352478, tzinfo=datetime.timezone.utc) updated=datetime.datetime(2024, 6, 14, 12, 0, 7, 458680, tzinfo=datetime.timezone.utc)