Using Generic Entities
A Generic Entity is a major BioT platform feature that allows you to create templates, and entities of that template, that represent data structures or flows of your business logic.
To learn more about the creation of generic entities templates and uses, click here.
Working With Generic Entities
Once you have created a generic entity template from the BioT Console, you'll be able to create an instance of it by following these steps:
- Locate the organization that the device/user belongs to
- Make an API call to create an instance
Locate the organization that the device/user belongs to
Each device or user belongs to an organization. When a user logs in, it will get the organization ID as part of the log in response. A device can get its organization ID by querying its own details.
To obtain an organization unique ID, use the following API:
GET https://your-biot-domain.com/device/v2/devices/
See Generic Entity Usage Example - Log File for an exact example.
Make an API call to create an instance
To create an instance of the generic entity, make the following API call:
V1 example: POST https://your-biot-domain.com/generic-entity/v1/generic-entities/templates/device_log
V3 example: POST https://your-biot-domain.com/generic-entity/v3/generic-entities/device_log
{
"_ownerOrganization": {
"id": "b000a36e-6d67-4735-a85c-bd6a8b8f0e9d"
},
"_name": "generic_entity_name",
<generic_entity_custom_attributes>
}
NoteThe generic entity name must be unique and have a max length of 32 characters
Use the _ownerOrganization and _templateId values obtained from the previous steps.
In the generic_entity_custom_attributes section, add the values of custom attributes added to the generic entity template.
Updated 20 days ago
