Attributes
albert.resources.attributes
AttributeCategory
AttributeScope
ValidationItem
Bases: BaseAlbertModel
A validation rule for an attribute.
Uses the same DataType and Operator enums as parameter groups, but min/max are float (not str) because the attributes API sends numeric values.
Show JSON schema:
{
"$defs": {
"DataType": {
"enum": [
"number",
"string",
"enum",
"image",
"curve"
],
"title": "DataType",
"type": "string"
},
"EnumValidationValue": {
"description": "Represents a value for an enum type validation.\n\nAttributes\n----------\ntext : str\n The text of the enum value.\nid : str | None\n The ID of the enum value. If not provided, the ID will be generated upon creation.",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Operator": {
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq",
"neq"
],
"title": "Operator",
"type": "string"
}
},
"description": "A validation rule for an attribute.\n\nUses the same DataType and Operator enums as parameter groups, but min/max\nare float (not str) because the attributes API sends numeric values.",
"properties": {
"datatype": {
"anyOf": [
{
"$ref": "#/$defs/DataType"
},
{
"type": "null"
}
],
"default": null
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ValidationItem",
"type": "object"
}
Fields:
-
datatype(DataType | None) -
min(float | None) -
max(float | None) -
value(float | list[EnumValidationValue] | None) -
operator(Operator | None)
Validators:
normalize_datatype
AttributeParameterItem
Bases: BaseAlbertModel
A parameter reference within an attribute definition.
Show JSON schema:
{
"$defs": {
"EntityLinkWithName": {
"description": "EntityLink that includes the name field in serialization.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLinkWithName",
"type": "object"
}
},
"description": "A parameter reference within an attribute definition.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"unit": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"type": "null"
}
],
"default": null
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Unitid"
}
},
"required": [
"id"
],
"title": "AttributeParameterItem",
"type": "object"
}
Fields:
Attribute
Bases: BaseResource
Represents a centralized attribute definition.
Methods:
| Name | Description |
|---|---|
coerce_parameters |
|
Attributes:
| Name | Type | Description |
|---|---|---|
id |
AttributeId | None
|
|
reference_name |
str | None
|
|
full_name |
str | None
|
|
name_override |
bool | None
|
|
datacolumn |
EntityLinkWithName | None
|
|
datacolumn_id |
DataColumnId | None
|
|
unit |
EntityLinkWithName | None
|
|
unit_id |
UnitId | None
|
|
workflow |
EntityLink | None
|
|
validation |
list[ValidationItem] | None
|
|
category |
AttributeCategory | None
|
|
parameters |
list[AttributeParameterItem] | None
|
|
AttributeSearchItem
Bases: BaseAlbertModel
A lightweight attribute result returned by the search endpoint.
Show JSON schema:
{
"description": "A lightweight attribute result returned by the search endpoint.",
"properties": {
"albertId": {
"title": "Albertid",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"datacolumnId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Datacolumnid"
},
"datacolumnName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Datacolumnname"
},
"unitName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Unitname"
},
"parameters": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Parameters"
}
},
"required": [
"albertId"
],
"title": "AttributeSearchItem",
"type": "object"
}
Fields:
-
id(AttributeId) -
name(str | None) -
datacolumn_id(str | None) -
datacolumn_name(str | None) -
unit_name(str | None) -
parameters(list[dict] | None)
AttributeValueRange
Bases: BaseAlbertModel
A numeric range constraint for a reference value.
Show JSON schema:
{
"description": "A numeric range constraint for a reference value.",
"properties": {
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"comparisonOperator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Comparisonoperator"
}
},
"title": "AttributeValueRange",
"type": "object"
}
Fields:
AttributeValue
Bases: BaseAlbertModel
A reference value to assign to a parent entity for a given attribute.
Show JSON schema:
{
"$defs": {
"AttributeValueRange": {
"description": "A numeric range constraint for a reference value.",
"properties": {
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"comparisonOperator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Comparisonoperator"
}
},
"title": "AttributeValueRange",
"type": "object"
}
},
"description": "A reference value to assign to a parent entity for a given attribute.",
"properties": {
"attributeId": {
"title": "Attributeid",
"type": "string"
},
"referenceValue": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Referencevalue"
},
"range": {
"anyOf": [
{
"$ref": "#/$defs/AttributeValueRange"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"attributeId"
],
"title": "AttributeValue",
"type": "object"
}
Fields:
-
attribute_id(AttributeId) -
reference_value(str | float | None) -
range(AttributeValueRange | None)
AttributeDefinition
Bases: BaseAlbertModel
Read-only embed of attribute metadata within a values response.
Distinct from Attribute: uses name (not referenceName) and
prmCount (count only, not the full parameters list).
Show JSON schema:
{
"$defs": {
"AttributeCategory": {
"description": "Category of an attribute.",
"enum": [
"Property"
],
"title": "AttributeCategory",
"type": "string"
},
"DataType": {
"enum": [
"number",
"string",
"enum",
"image",
"curve"
],
"title": "DataType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EntityLinkWithName": {
"description": "EntityLink that includes the name field in serialization.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLinkWithName",
"type": "object"
},
"EnumValidationValue": {
"description": "Represents a value for an enum type validation.\n\nAttributes\n----------\ntext : str\n The text of the enum value.\nid : str | None\n The ID of the enum value. If not provided, the ID will be generated upon creation.",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Operator": {
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq",
"neq"
],
"title": "Operator",
"type": "string"
},
"ValidationItem": {
"description": "A validation rule for an attribute.\n\nUses the same DataType and Operator enums as parameter groups, but min/max\nare float (not str) because the attributes API sends numeric values.",
"properties": {
"datatype": {
"anyOf": [
{
"$ref": "#/$defs/DataType"
},
{
"type": "null"
}
],
"default": null
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ValidationItem",
"type": "object"
}
},
"description": "Read-only embed of attribute metadata within a values response.\n\nDistinct from Attribute: uses ``name`` (not ``referenceName``) and\n``prmCount`` (count only, not the full parameters list).",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"fullName": {
"title": "Fullname",
"type": "string"
},
"datacolumn": {
"$ref": "#/$defs/EntityLinkWithName"
},
"category": {
"$ref": "#/$defs/AttributeCategory"
},
"unit": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"type": "null"
}
],
"default": null
},
"workflow": {
"$ref": "#/$defs/EntityLink"
},
"validation": {
"items": {
"$ref": "#/$defs/ValidationItem"
},
"title": "Validation",
"type": "array"
},
"prmCount": {
"title": "Prmcount",
"type": "integer"
}
},
"required": [
"name",
"fullName",
"datacolumn",
"category",
"workflow",
"validation",
"prmCount"
],
"title": "AttributeDefinition",
"type": "object"
}
Fields:
-
name(str) -
full_name(str) -
datacolumn(EntityLinkWithName) -
category(AttributeCategory) -
unit(EntityLinkWithName | None) -
workflow(EntityLink) -
validation(list[ValidationItem]) -
prm_count(int)
AttributeValuesResponseItem
Bases: BaseAlbertModel
A single attribute value entry within a values response.
Show JSON schema:
{
"$defs": {
"AttributeCategory": {
"description": "Category of an attribute.",
"enum": [
"Property"
],
"title": "AttributeCategory",
"type": "string"
},
"AttributeDefinition": {
"description": "Read-only embed of attribute metadata within a values response.\n\nDistinct from Attribute: uses ``name`` (not ``referenceName``) and\n``prmCount`` (count only, not the full parameters list).",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"fullName": {
"title": "Fullname",
"type": "string"
},
"datacolumn": {
"$ref": "#/$defs/EntityLinkWithName"
},
"category": {
"$ref": "#/$defs/AttributeCategory"
},
"unit": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"type": "null"
}
],
"default": null
},
"workflow": {
"$ref": "#/$defs/EntityLink"
},
"validation": {
"items": {
"$ref": "#/$defs/ValidationItem"
},
"title": "Validation",
"type": "array"
},
"prmCount": {
"title": "Prmcount",
"type": "integer"
}
},
"required": [
"name",
"fullName",
"datacolumn",
"category",
"workflow",
"validation",
"prmCount"
],
"title": "AttributeDefinition",
"type": "object"
},
"AttributeValueRange": {
"description": "A numeric range constraint for a reference value.",
"properties": {
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"comparisonOperator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Comparisonoperator"
}
},
"title": "AttributeValueRange",
"type": "object"
},
"DataType": {
"enum": [
"number",
"string",
"enum",
"image",
"curve"
],
"title": "DataType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EntityLinkWithName": {
"description": "EntityLink that includes the name field in serialization.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLinkWithName",
"type": "object"
},
"EnumValidationValue": {
"description": "Represents a value for an enum type validation.\n\nAttributes\n----------\ntext : str\n The text of the enum value.\nid : str | None\n The ID of the enum value. If not provided, the ID will be generated upon creation.",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Operator": {
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq",
"neq"
],
"title": "Operator",
"type": "string"
},
"ValidationItem": {
"description": "A validation rule for an attribute.\n\nUses the same DataType and Operator enums as parameter groups, but min/max\nare float (not str) because the attributes API sends numeric values.",
"properties": {
"datatype": {
"anyOf": [
{
"$ref": "#/$defs/DataType"
},
{
"type": "null"
}
],
"default": null
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ValidationItem",
"type": "object"
}
},
"description": "A single attribute value entry within a values response.",
"properties": {
"albertId": {
"title": "Albertid",
"type": "string"
},
"attributeDefinition": {
"$ref": "#/$defs/AttributeDefinition"
},
"referenceValue": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Referencevalue"
},
"range": {
"anyOf": [
{
"$ref": "#/$defs/AttributeValueRange"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"albertId",
"attributeDefinition"
],
"title": "AttributeValuesResponseItem",
"type": "object"
}
Fields:
-
id(AttributeId) -
attribute_definition(AttributeDefinition) -
reference_value(str | float | None) -
range(AttributeValueRange | None)
AttributeValuesResponse
Bases: BaseAlbertModel
Attribute values for a single parent entity.
Show JSON schema:
{
"$defs": {
"AttributeCategory": {
"description": "Category of an attribute.",
"enum": [
"Property"
],
"title": "AttributeCategory",
"type": "string"
},
"AttributeDefinition": {
"description": "Read-only embed of attribute metadata within a values response.\n\nDistinct from Attribute: uses ``name`` (not ``referenceName``) and\n``prmCount`` (count only, not the full parameters list).",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"fullName": {
"title": "Fullname",
"type": "string"
},
"datacolumn": {
"$ref": "#/$defs/EntityLinkWithName"
},
"category": {
"$ref": "#/$defs/AttributeCategory"
},
"unit": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"type": "null"
}
],
"default": null
},
"workflow": {
"$ref": "#/$defs/EntityLink"
},
"validation": {
"items": {
"$ref": "#/$defs/ValidationItem"
},
"title": "Validation",
"type": "array"
},
"prmCount": {
"title": "Prmcount",
"type": "integer"
}
},
"required": [
"name",
"fullName",
"datacolumn",
"category",
"workflow",
"validation",
"prmCount"
],
"title": "AttributeDefinition",
"type": "object"
},
"AttributeValueRange": {
"description": "A numeric range constraint for a reference value.",
"properties": {
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"comparisonOperator": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Comparisonoperator"
}
},
"title": "AttributeValueRange",
"type": "object"
},
"AttributeValuesResponseItem": {
"description": "A single attribute value entry within a values response.",
"properties": {
"albertId": {
"title": "Albertid",
"type": "string"
},
"attributeDefinition": {
"$ref": "#/$defs/AttributeDefinition"
},
"referenceValue": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Referencevalue"
},
"range": {
"anyOf": [
{
"$ref": "#/$defs/AttributeValueRange"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"albertId",
"attributeDefinition"
],
"title": "AttributeValuesResponseItem",
"type": "object"
},
"DataType": {
"enum": [
"number",
"string",
"enum",
"image",
"curve"
],
"title": "DataType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"EntityLinkWithName": {
"description": "EntityLink that includes the name field in serialization.",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLinkWithName",
"type": "object"
},
"EnumValidationValue": {
"description": "Represents a value for an enum type validation.\n\nAttributes\n----------\ntext : str\n The text of the enum value.\nid : str | None\n The ID of the enum value. If not provided, the ID will be generated upon creation.",
"properties": {
"text": {
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Operator": {
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq",
"neq"
],
"title": "Operator",
"type": "string"
},
"ValidationItem": {
"description": "A validation rule for an attribute.\n\nUses the same DataType and Operator enums as parameter groups, but min/max\nare float (not str) because the attributes API sends numeric values.",
"properties": {
"datatype": {
"anyOf": [
{
"$ref": "#/$defs/DataType"
},
{
"type": "null"
}
],
"default": null
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ValidationItem",
"type": "object"
}
},
"description": "Attribute values for a single parent entity.",
"properties": {
"parentId": {
"title": "Parentid",
"type": "string"
},
"attributes": {
"items": {
"$ref": "#/$defs/AttributeValuesResponseItem"
},
"title": "Attributes",
"type": "array"
}
},
"required": [
"parentId",
"attributes"
],
"title": "AttributeValuesResponse",
"type": "object"
}
Fields: