Skip to content

Create an Asset Type

Reference:

Field Description
Name (Name ID) 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 (Display Name) The display name to show on the Kelvin UI. It can contain any characters, including spaces.

Create Asset Type

In this example we will create an Asset Type.

Asset Types can be managed from the Administration section of the UI.

Do not get confused with the Asset management in the Operations section which is designed for the Production Engineers.

You can watch this short demo video or read the full step-by step written tutorial below.

To start, go to the Assets in the Administration section of the left side bar and then click on the Asset Types tab.

To add an Asset Type, click on the Add Asset Type button;

Then type in the Asset Type details and click Add.

API cURL Example
1
2
3
4
5
6
7
8
9
curl -X "POST" \
"https://<url.kelvin.ai>/api/v4/assets/types/create" \
-H "Authorization: Bearer <Your Current Token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
        "name": "doc_demo_asset_type",
        "title": "Documentation Demo Asset Type"
    }'

You will get a response similar to this;

API cURL Example Response
1
2
3
4
5
6
7
<Response [201]>
{
    "name":"doc_demo_asset_type",
    "title":"Documentation Demo Asset Type",
    "created":"2025-01-23T08:53:28.650245Z",
    "updated":"2025-01-23T08:53:28.650245Z"
}
API Client (Python) Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from kelvin.api.client import Client

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

# Create Asset Type
response = client.asset.create_asset_type(data={
    "name": "doc_demo_asset_type",
    "title": "Documentation Demo Asset Type"
})

print(response)

You will get a response similar to this;

API Client (Python) Example Response
1
created=datetime.datetime(2024, 5, 23, 8, 52, 7, 803281, tzinfo=datetime.timezone.utc) name='doc_demo_asset_type' title='Documentation Demo Asset Type' updated=datetime.datetime(2024, 5, 23, 8, 52, 7, 803281, tzinfo=datetime.timezone.utc)