Creating an Asset
Creating your first Asset
An Asset can be anything: a Connected Machine, a Shipping Container, or even a Data Set. It can be any physical or digital object with an associated Name, Description, and Attributes.
Each Asset will have a history of any actions performed upon it by any actor.
The creation of an Asset is the first Event in its lifecycle. The following steps will guide you in creating your first Asset.
Creating an Asset
Note: To use the YAML Runner you will need to install the
Click here for installation instructions.
- Create your Asset.
Using the Sidebar, select ‘Add Asset’.
The RKVST YAML runner is executed as a series of steps, each step representing a single operation with an
In order to create an asset we use the action
--- steps: - step: action: ASSETS_CREATE_IF_NOT_EXISTS
- Add details to your new Asset.
You will see an Asset Creation form, where you provide details of your new Asset:
Here you can fill out some more metadata about your asset:
selectoris the identifying attribute the yaml runner will use to check if your asset exists already before attempting to create it, in this case we use
arc_display_namewhich represents the name of the Asset.
behavioursdetail what class of events in your assets lifecycle you might wish to record;
Attachmentsare the standard and recommended behaviours for all assets.
--- steps: - step: action: ASSETS_CREATE_IF_NOT_EXISTS description: Create an asset. asset_label: My First Container selector: - attributes: - arc_display_name behaviours: - RecordEvidence - Attachments
- At minimum, you will need to add an Asset Name and Asset Type to create an Asset:
Asset Name- This is the unique name of the Asset i.e. ‘My First Container’.
Asset Type- This is the class of the object; while it is arbitrary, it is best to have consistency amongst the type of Assets you use i.e. if it is a shipping container, the type could be
Shipping Containerwhich will then be pre-populated for future Assets to use as their own types.
The RKVST API uses the reserved attributes
arc_display_type to represent
Asset Name and
--- steps: - step: action: ASSETS_CREATE_IF_NOT_EXISTS description: Create an asset. asset_label: My First Container selector: - attributes: - arc_display_name behaviours: - RecordEvidence - Attachments attributes: arc_display_name: My First Container arc_display_type: Shipping Container
- At this point, you may wish to add other details to your Asset, including extended attributes or attachments such as PDFs or Thumbnail Images.
Extended Attributes are user-defined and can be added to each unique Asset.
Not all Assets of a specific type need to have the same Extended Attributes, but in most cases it is better to do so for consistency.
To add a new Attribute to an Asset, enter your key-value pair.
Select ‘Add Attribute’, and add your key-value pairs.
Extended Attributes are custom key-value pairs, such as
Height you see below.
This example also adds a location to our asset, to find out more about Locations, click here
It’s also good practice to include
confirm: true which tells RKVST to finish commiting the asset before moving to the next step.
--- steps: - step: action: ASSETS_CREATE_IF_NOT_EXISTS description: Create an asset. asset_label: My First Container selector: - attributes: - arc_display_name behaviours: - RecordEvidence - Attachments attributes: arc_display_name: My First Container arc_display_type: Shipping Container arc_description: Originally shipped from Shanghai Width: "2.43m" Length: "6.06m" Height: "2.59m" location: selector: - display_name display_name: Parkside Junction description: Box intersection between Mill Road and East Road latitude: 52.2025 longitude: 0.1311 confirm: true
- Complete your Asset creation.
Click ‘Create Asset’.
Use the archivist_runner command to run your YAML file!
$ archivist_runner \ -u https://app.rkvst.io \ --client-id <your-client-id> \ --client-secret client_secret.txt \ my_first_container.yaml
- View your Assets.
Navigate to ‘Manage Assets’ to see your Asset in the UI.
You can view all Asset data using the
ASSETS_LIST action, use the
print_response keyword to get the full output.
--- steps: - step: action: ASSETS_LIST description: List all assets. print_response: true
- View details of the Asset you created.
To view your Asset, click on the Asset row. You will see the detailed history of your Asset.
ASSETS_LIST action can be filtered using identifying
attrs to view the details of a specific Asset.
--- steps: - step: action: ASSETS_LIST description: Display Asset named My First Container. print_response: true attrs: arc_display_name: My First Container
Here we see all details entered: The Extended Attributes and a history of Events recorded on the Asset.
Note: To update the details of your Asset after it has been created, you must create an event containing
For more information on creating events, click here.
The first Event will always be the Asset Creation. In the next section, we will cover how to create your own Events for your Asset.