Skip to content

Update a Data Stream

Reference:

Field Description
Name Unique name identifier. It must contain only lowercase alphanumeric characters. The characters ., _ and - are allowed to separate words instead of a space BUT can not be at the beginning or end of the name.
Title The display name to show on the Kelvin UI. It can contain any characters, including spaces.
Description Optional description for the data stream, up to 200 characters.
Type Determines if the data is directly derived from sensors or is processed/calculated. Allowed values: Measurement or Computed.
Semantic Type Provides context or deeper meaning behind the data, beyond just its format or structure. Check Kelvin API for the full list of available semantic types.
Data Type Specifies the kind of data in the stream. Allowed values: Boolean, Number, Object, String.
Unit Defines the measurement unit for data. Check Kelvin API for the full list of available units.

Update Data Stream

You can only change the Display Name and Description of a Data Stream.

Go to the Data Streams page, select the Data Stream you want to edit and click on the Pencil button on the right hand side.

You can only edit the Display Name and Description.

Then click on the Save button.

curl -X "POST" \
"https://<url.kelvin.ai>/api/v4/datastreams/doc_demo_data_stream/update" \
-H "Authorization: Bearer <Your Current Token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
        "title": "My Tubing Pressure",
        "description": "Tubing pressure in oil and gas refers to the pressure within the production tubing."
    }'
from kelvin.api.client import Client

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

# Update Data Stream
response = client.datastreams.update_data_stream(
    data_stream_name="doc_demo_data_stream",
    data={
        "title": "My Tubing Pressure",
        "description": "Tubing pressure in oil and gas refers to the pressure within the production tubing.",
    },
)

print(response)