Workflows
albert.resources.workflows
IntervalParameter
Bases: BaseAlbertModel
A single intervalized parameter value flattened out of a workflow's interval data.
This is not a platform entity. It is an internal helper that
Workflow builds (one per interval value of each intervalized parameter)
so that get_interval_id can look up the row ID that matches a
given parameter name and value. You do not normally construct this yourself.
Show JSON schema:
{
"$defs": {
"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"
}
},
"description": "A single intervalized parameter value flattened out of a workflow's interval data.\n\nThis is not a platform entity. It is an internal helper that\n[`Workflow`][albert.resources.workflows.Workflow] builds (one per interval value of each intervalized parameter)\nso that [`get_interval_id`][albert.resources.workflows.Workflow.get_interval_id] can look up the row ID that matches a\ngiven parameter name and value. You do not normally construct this yourself.",
"properties": {
"interval_param_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the intervalized parameter (e.g. ``\"Temperature\"``).",
"title": "Interval Param Name"
},
"interval_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The row ID of this single interval value (e.g. ``\"ROW1\"``). Parameters can be repeated within a Parameter Group, so the Parameter ID is not unique enough to identify which parameter is being varied. So, these key become the building blocks that [`get_interval_id`][albert.resources.workflows.Workflow.get_interval_id] joins with ``X`` to form a composite interval ID.",
"title": "Interval Id"
},
"interval_value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of this interval. A string for Normal parameters (e.g. ``\"25\"``), or an object with an ``id`` for Special parameters.",
"title": "Interval Value"
},
"interval_unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit name for this interval value, if any (e.g. ``\"C\"``).",
"title": "Interval Unit"
},
"parameter_group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group or data template ID (format ``PRG...`` or ``DAT...``).",
"title": "Parameter Group Id"
},
"parameter_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter ID (format ``PRM...``).",
"title": "Parameter Id"
},
"parameter_short_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The short name of the intervalized parameter.",
"title": "Parameter Short Name"
}
},
"title": "IntervalParameter",
"type": "object"
}
Fields:
-
interval_param_name(str | None) -
interval_id(IntervalId | None) -
interval_value(str | dict[str, Any] | EntityLink | None) -
interval_unit(str | None) -
parameter_group_id(str | None) -
parameter_id(str | None) -
parameter_short_name(str | None)
interval_param_name
interval_param_name: str | None = None
The name of the intervalized parameter (e.g. "Temperature").
interval_id
interval_id: IntervalId | None = None
The row ID of this single interval value (e.g. "ROW1"). Parameters can be repeated within a Parameter Group, so the Parameter ID is not unique enough to identify which parameter is being varied. So, these key become the building blocks that get_interval_id joins with X to form a composite interval ID.
interval_value
interval_value: str | dict[str, Any] | EntityLink | None = (
None
)
The value of this interval. A string for Normal parameters (e.g. "25"), or an object with an id for Special parameters.
interval_unit
interval_unit: str | None = None
The unit name for this interval value, if any (e.g. "C").
parameter_group_id
parameter_group_id: str | None = None
The parameter group or data template ID (format PRG... or DAT...).
parameter_short_name
parameter_short_name: str | None = None
The short name of the intervalized parameter.
Interval
Bases: BaseAlbertModel
One value that an intervalized parameter is varied across.
When a parameter is "intervalized" (tested at several values rather than a single
setpoint), each of those values is represented by an Interval. A list of
them is placed on the parameter's ParameterSetpoint via its intervals
field. The workflow then carries the resulting IntervalCombination entries,
one per interval (or per cartesian product of intervalized parameters).
Example
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"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"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Unit": {
"description": "A unit of measure (e.g. ``g``, ``mL``, ``\u00b0C``).\n\nUnits qualify quantities throughout the platform: inventory amounts,\nparameter values, and property results. Managed through\n[`UnitCollection`][albert.collections.units.UnitCollection] (``client.units``).\n\n!!! example\n ```python\n from albert.resources.units import Unit, UnitCategory\n unit = Unit(name=\"milliliter\", symbol=\"mL\", category=UnitCategory.LIQUID_VOLUME)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the unit (format ``UNI...``). Set when the unit is retrieved from or created in Albert.",
"title": "Albertid"
},
"name": {
"description": "Currently this is the only field that is displayed in Albert, so use this for display purposes. Therefore, users often use the symbol for the unit here as that's the preferred display.",
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display symbol for the unit (e.g. ``\"g\"``).",
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Alternate names or spellings that also refer to this unit.",
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The physical quantity the unit measures (e.g. ``Mass``, ``Volume``)."
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the unit has been verified in Albert. Read-only.",
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "The physical quantity a unit measures.\n\nAttributes\n----------\nLENGTH : str\n Length units (e.g. m, cm).\nVOLUME : str\n Volume units (e.g. m\u00b3).\nLIQUID_VOLUME : str\n Liquid volume units (e.g. L, mL).\nANGLES : str\n Angle units (e.g. degrees, radians).\nTIME : str\n Time units (e.g. s, h).\nFREQUENCY : str\n Frequency units (e.g. Hz).\nMASS : str\n Mass units (e.g. g, kg).\nCURRENT : str\n Electric current units (e.g. A).\nTEMPERATURE : str\n Temperature units (e.g. \u00b0C, K).\nAMOUNT : str\n Amount of substance units (e.g. mol).\nLUMINOSITY : str\n Luminous intensity units (e.g. cd).\nFORCE : str\n Force units (e.g. N).\nENERGY : str\n Energy units (e.g. J).\nPOWER : str\n Power units (e.g. W).\nPRESSURE : str\n Pressure units (e.g. Pa, bar).\nELECTRICITY_AND_MAGNETISM : str\n Electricity and magnetism units.\nOTHER : str\n Units that do not fit another category.\nWEIGHT : str\n Weight units.\nAREA : str\n Area units (e.g. m\u00b2).\nSURFACE_AREA : str\n Surface area units.\nBINARY : str\n Binary/digital-information units (e.g. bytes).\nCAPACITANCE : str\n Capacitance units (e.g. F).\nSPEED : str\n Speed units (e.g. m/s).\nELECTRICAL_CONDUCTIVITY : str\n Electrical conductivity units.\nELECTRICAL_PERMITTIVITY : str\n Electrical permittivity units.\nDENSITY : str\n Density units (e.g. g/mL).\nRESISTANCE : str\n Electrical resistance units (e.g. \u03a9).",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
}
},
"description": "One value that an intervalized parameter is varied across.\n\nWhen a parameter is \"intervalized\" (tested at several values rather than a single\nsetpoint), each of those values is represented by an [`Interval`][albert.resources.workflows.Interval]. A list of\nthem is placed on the parameter's [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint] via its ``intervals``\nfield. The workflow then carries the resulting [`IntervalCombination`][albert.resources.workflows.IntervalCombination] entries,\none per interval (or per cartesian product of intervalized parameters).\n\n!!! example\n ```python\n from albert.resources.workflows import Interval\n\n # A Normal parameter varied across two temperatures.\n low = Interval(value=\"25\", unit={\"id\": \"UNI9999999\"})\n high = Interval(value=\"60\", unit={\"id\": \"UNI9999999\"})\n ```",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of this interval. For Normal parameters this is a scalar string (e.g. ``\"23\"``). For Special parameters (Equipment, Consumables, Templates) this may be an object with an ``id`` (and optional ``name``), matching [`ParameterSetpoint.value`][albert.resources.workflows.ParameterSetpoint.value]. Empty or hyphen intervals (represented as ``\"\"`` or ``None``) are permitted on the platform for optional parameters and exclusion matching. The sibling ``name`` field is independent and is not copied from an object value.",
"title": "Value"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the interval value. Populated for Special parameters (e.g. ``\"Pipette 0.01 -0.1 ml (10 - 100 \u03bcl)\"``). ``None`` for Normal parameters. Not auto-filled from an object ``value``.",
"title": "Name"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable. If given, the unit must have an ``id``. See Also --------",
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
}
Fields:
-
value(str | dict[str, Any] | EntityLink | None) -
name(str | None) -
unit(SerializeAsEntityLink[Unit] | None) -
row_id(RowId | None)
Validators:
value
value: str | dict[str, Any] | EntityLink | None = None
The value of this interval. For Normal parameters this is a scalar string (e.g. "23"). For Special parameters (Equipment, Consumables, Templates) this may be an object with an id (and optional name), matching ParameterSetpoint.value. Empty or hyphen intervals (represented as "" or None) are permitted on the platform for optional parameters and exclusion matching. The sibling name field is independent and is not copied from an object value.
name
name: str | None = None
The display name of the interval value. Populated for Special parameters (e.g. "Pipette 0.01 -0.1 ml (10 - 100 μl)"). None for Normal parameters. Not auto-filled from an object value.
unit
unit: SerializeAsEntityLink[Unit] | None = None
The unit of value, where applicable. If given, the unit must have an id. See Also --------
validate_interval
validate_interval() -> Interval
IntervalDetail
Bases: BaseAlbertModel
A single parameter's contribution to an interval combination.
This appears inside IntervalCombination (as its interval_details) to
break a combination down into the individual parameters that make it up. It is
read from the workflow endpoint; you do not construct it directly.
Show JSON schema:
{
"description": "A single parameter's contribution to an interval combination.\n\nThis appears inside [`IntervalCombination`][albert.resources.workflows.IntervalCombination] (as its ``interval_details``) to\nbreak a combination down into the individual parameters that make it up. It is\nread from the workflow endpoint; you do not construct it directly.",
"properties": {
"name": {
"description": "The parameter name (e.g. ``\"Equipment\"``).",
"title": "Name",
"type": "string"
},
"value": {
"description": "The display value for this interval (e.g. ``\"C191778 || Pipette 0.01 -0.1 ml\"``). See Also --------",
"title": "Value",
"type": "string"
}
},
"required": [
"name",
"value"
],
"title": "IntervalDetail",
"type": "object"
}
Fields:
IntervalCombination
Bases: BaseAlbertModel
One realized condition (interval combination) carried by a workflow.
Returned by the workflow endpoint when at least one parameter in the workflow has
been intervalized. A combination is a single intervalized parameter (interval ID
ROW#) or the cartesian product of any number of intervalized parameters
(ROW#XROW#X...). On tenants with increased intervals the id may also be a child
workflow id (WFL...) or a case-sensitive barcode. Its interval_id is what you
pass to the property_data endpoints to read or write results for that specific
condition.
Show JSON schema:
{
"$defs": {
"IntervalDetail": {
"description": "A single parameter's contribution to an interval combination.\n\nThis appears inside [`IntervalCombination`][albert.resources.workflows.IntervalCombination] (as its ``interval_details``) to\nbreak a combination down into the individual parameters that make it up. It is\nread from the workflow endpoint; you do not construct it directly.",
"properties": {
"name": {
"description": "The parameter name (e.g. ``\"Equipment\"``).",
"title": "Name",
"type": "string"
},
"value": {
"description": "The display value for this interval (e.g. ``\"C191778 || Pipette 0.01 -0.1 ml\"``). See Also --------",
"title": "Value",
"type": "string"
}
},
"required": [
"name",
"value"
],
"title": "IntervalDetail",
"type": "object"
}
},
"description": "One realized condition (interval combination) carried by a workflow.\n\nReturned by the workflow endpoint when at least one parameter in the workflow has\nbeen intervalized. A combination is a single intervalized parameter (interval ID\n``ROW#``) or the cartesian product of any number of intervalized parameters\n(``ROW#XROW#X...``). On tenants with increased intervals the id may also be a child\nworkflow id (``WFL...``) or a case-sensitive barcode. Its ``interval_id`` is what you\npass to the property_data endpoints to read or write results for that specific\ncondition.",
"properties": {
"interval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The interval ID this combination is associated with. A ``ROW#`` chain of any length, a child workflow id (``WFL...``), a 9-character barcode, or ``\"default\"``. This is the same value [`get_interval_id`][albert.resources.workflows.Workflow.get_interval_id] returns for ROW-chain combinations.",
"title": "Interval"
},
"intervalParams": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameters participating in the interval.",
"title": "Intervalparams"
},
"intervalString": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A human-readable representation of the combination, of the form ``\"[Parameter Name]: [Parameter Value] [Parameter Unit]\"`` for each parameter.",
"title": "Intervalstring"
},
"intervalDetails": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/IntervalDetail"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Per-parameter breakdown of the combination. Each entry has ``name`` (parameter name) and ``value`` (display string, e.g. ``\"C191778 || Pipette ...\"``). See Also --------",
"title": "Intervaldetails"
}
},
"title": "IntervalCombination",
"type": "object"
}
Fields:
-
interval_id(IntervalId | None) -
interval_params(str | None) -
interval_string(str | None) -
interval_details(list[IntervalDetail] | None)
interval_id
interval_id: IntervalId | None = None
The interval ID this combination is associated with. A ROW# chain of any length, a child workflow id (WFL...), a 9-character barcode, or "default". This is the same value get_interval_id returns for ROW-chain combinations.
interval_string
interval_string: str | None = None
A human-readable representation of the combination, of the form "[Parameter Name]: [Parameter Value] [Parameter Unit]" for each parameter.
interval_details
interval_details: list[IntervalDetail] | None = None
Per-parameter breakdown of the combination. Each entry has name (parameter name) and value (display string, e.g. "C191778 || Pipette ..."). See Also --------
ParameterSetpoint
Bases: BaseAlbertModel
The fixed value (or set of interval values) for one parameter within a workflow.
A setpoint pins a single parameter to a condition. Provide either a single value
(plus unit where applicable) for a fixed setpoint, or a list of intervals to
intervalize the parameter across several values. You must identify the parameter by
passing either a full parameter object or its parameter_id. Setpoints are
grouped under a ParameterGroupSetpoints, which is in turn placed on a
Workflow.
Normal parameters take exactly one of value or intervals. Special parameters
(Equipment, Consumables, Templates) take an entity ID as their value.
sequence is read-only: do not set it when building a workflow for
create. Provide the parent
group's id (PRG... or DAT...) on
ParameterGroupSetpoints; the SDK
resolves each setpoint's row id from that group before create.
Example
from albert.resources.parameters import ParameterCategory
from albert.resources.workflows import ParameterSetpoint, Interval
# A single fixed setpoint identified by parameter ID.
temp = ParameterSetpoint(parameter_id="PRM9999999", value="25")
# The same parameter intervalized across two values.
temp_varied = ParameterSetpoint(
parameter_id="PRM9999999",
intervals=[
Interval(value="25", unit={"id": "UNI9999999"}),
Interval(value="60", unit={"id": "UNI9999999"}),
],
)
# A Special parameter (an inventory item) takes the item's id as its value;
# short_name is only sent for Special parameters.
equipment = ParameterSetpoint(
parameter_id="PRM3",
category=ParameterCategory.SPECIAL,
value={"id": "INV9999999"},
short_name="Oven",
)
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"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"
},
"Interval": {
"description": "One value that an intervalized parameter is varied across.\n\nWhen a parameter is \"intervalized\" (tested at several values rather than a single\nsetpoint), each of those values is represented by an [`Interval`][albert.resources.workflows.Interval]. A list of\nthem is placed on the parameter's [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint] via its ``intervals``\nfield. The workflow then carries the resulting [`IntervalCombination`][albert.resources.workflows.IntervalCombination] entries,\none per interval (or per cartesian product of intervalized parameters).\n\n!!! example\n ```python\n from albert.resources.workflows import Interval\n\n # A Normal parameter varied across two temperatures.\n low = Interval(value=\"25\", unit={\"id\": \"UNI9999999\"})\n high = Interval(value=\"60\", unit={\"id\": \"UNI9999999\"})\n ```",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of this interval. For Normal parameters this is a scalar string (e.g. ``\"23\"``). For Special parameters (Equipment, Consumables, Templates) this may be an object with an ``id`` (and optional ``name``), matching [`ParameterSetpoint.value`][albert.resources.workflows.ParameterSetpoint.value]. Empty or hyphen intervals (represented as ``\"\"`` or ``None``) are permitted on the platform for optional parameters and exclusion matching. The sibling ``name`` field is independent and is not copied from an object value.",
"title": "Value"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the interval value. Populated for Special parameters (e.g. ``\"Pipette 0.01 -0.1 ml (10 - 100 \u03bcl)\"``). ``None`` for Normal parameters. Not auto-filled from an object ``value``.",
"title": "Name"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable. If given, the unit must have an ``id``. See Also --------",
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
},
"Parameter": {
"description": "The definition of a single experimental condition or input variable.\n\nA Parameter (ID format ``PRM...``) names an \"indirect variable\" such as\nTemperature, Spin Speed, or Instrument. The Parameter itself only defines the\nvariable; its actual value and unit are fixed to a setpoint later, inside a\n[`Workflow`][albert.resources.workflows.Workflow]. Parameters are the building\nblocks of Parameter Groups\n([`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup]) and form the\nparameter side of Data Templates\n([`DataTemplate`][albert.resources.data_templates.DataTemplate]).\n\nManage parameters through\n[`ParameterCollection`][albert.collections.parameters.ParameterCollection]\n(``client.parameters``).\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.parameters import Parameter\n client = Albert()\n param = client.parameters.create(parameter=Parameter(name=\"Temperature\"))\n param.id\n # 'PRM9999999'\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the parameter. Names must be unique.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the parameter (format ``PRM...``). Set when the parameter is retrieved from or created in Albert.",
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional user-defined metadata keyed by field name.",
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the parameter is ``Normal`` (scalar value) or ``Special`` (entity reference). Set by the platform and read-only."
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The rank of the returned parameter. Read-only.",
"title": "Rank"
},
"required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this parameter must be filled in within a Parameter Group.",
"title": "Required"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
},
"ParameterCategory": {
"description": "Whether a [`Parameter`][albert.resources.parameters.Parameter]'s value is a plain scalar or an entity reference.\n\nSet by the platform and read-only. It determines how a parameter's value is\ninterpreted when a setpoint is assigned to it inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nAttributes\n----------\nNORMAL : str\n A \"normal\" parameter whose value is a plain scalar (e.g. a number or text),\n such as Temperature or Spin Speed.\nSPECIAL : str\n A \"special\" parameter whose value references another entity (e.g. Equipment,\n a Consumable, or a Template). The setpoint value is that entity's ID rather\n than a plain scalar.",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Unit": {
"description": "A unit of measure (e.g. ``g``, ``mL``, ``\u00b0C``).\n\nUnits qualify quantities throughout the platform: inventory amounts,\nparameter values, and property results. Managed through\n[`UnitCollection`][albert.collections.units.UnitCollection] (``client.units``).\n\n!!! example\n ```python\n from albert.resources.units import Unit, UnitCategory\n unit = Unit(name=\"milliliter\", symbol=\"mL\", category=UnitCategory.LIQUID_VOLUME)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the unit (format ``UNI...``). Set when the unit is retrieved from or created in Albert.",
"title": "Albertid"
},
"name": {
"description": "Currently this is the only field that is displayed in Albert, so use this for display purposes. Therefore, users often use the symbol for the unit here as that's the preferred display.",
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display symbol for the unit (e.g. ``\"g\"``).",
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Alternate names or spellings that also refer to this unit.",
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The physical quantity the unit measures (e.g. ``Mass``, ``Volume``)."
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the unit has been verified in Albert. Read-only.",
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "The physical quantity a unit measures.\n\nAttributes\n----------\nLENGTH : str\n Length units (e.g. m, cm).\nVOLUME : str\n Volume units (e.g. m\u00b3).\nLIQUID_VOLUME : str\n Liquid volume units (e.g. L, mL).\nANGLES : str\n Angle units (e.g. degrees, radians).\nTIME : str\n Time units (e.g. s, h).\nFREQUENCY : str\n Frequency units (e.g. Hz).\nMASS : str\n Mass units (e.g. g, kg).\nCURRENT : str\n Electric current units (e.g. A).\nTEMPERATURE : str\n Temperature units (e.g. \u00b0C, K).\nAMOUNT : str\n Amount of substance units (e.g. mol).\nLUMINOSITY : str\n Luminous intensity units (e.g. cd).\nFORCE : str\n Force units (e.g. N).\nENERGY : str\n Energy units (e.g. J).\nPOWER : str\n Power units (e.g. W).\nPRESSURE : str\n Pressure units (e.g. Pa, bar).\nELECTRICITY_AND_MAGNETISM : str\n Electricity and magnetism units.\nOTHER : str\n Units that do not fit another category.\nWEIGHT : str\n Weight units.\nAREA : str\n Area units (e.g. m\u00b2).\nSURFACE_AREA : str\n Surface area units.\nBINARY : str\n Binary/digital-information units (e.g. bytes).\nCAPACITANCE : str\n Capacitance units (e.g. F).\nSPEED : str\n Speed units (e.g. m/s).\nELECTRICAL_CONDUCTIVITY : str\n Electrical conductivity units.\nELECTRICAL_PERMITTIVITY : str\n Electrical permittivity units.\nDENSITY : str\n Density units (e.g. g/mL).\nRESISTANCE : str\n Electrical resistance units (e.g. \u03a9).",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
}
},
"description": "The fixed value (or set of interval values) for one parameter within a workflow.\n\nA setpoint pins a single parameter to a condition. Provide either a single ``value``\n(plus ``unit`` where applicable) for a fixed setpoint, or a list of ``intervals`` to\nintervalize the parameter across several values. You must identify the parameter by\npassing either a full ``parameter`` object or its ``parameter_id``. Setpoints are\ngrouped under a [`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints], which is in turn placed on a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nNormal parameters take exactly one of ``value`` or ``intervals``. Special parameters\n(Equipment, Consumables, Templates) take an entity ID as their value.\n\n``sequence`` is read-only: do not set it when building a workflow for\n[`create`][albert.collections.workflows.WorkflowCollection.create]. Provide the parent\ngroup's ``id`` (``PRG...`` or ``DAT...``) on\n[`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints]; the SDK\nresolves each setpoint's row id from that group before create.\n\n!!! example\n ```python\n from albert.resources.parameters import ParameterCategory\n from albert.resources.workflows import ParameterSetpoint, Interval\n\n # A single fixed setpoint identified by parameter ID.\n temp = ParameterSetpoint(parameter_id=\"PRM9999999\", value=\"25\")\n\n # The same parameter intervalized across two values.\n temp_varied = ParameterSetpoint(\n parameter_id=\"PRM9999999\",\n intervals=[\n Interval(value=\"25\", unit={\"id\": \"UNI9999999\"}),\n Interval(value=\"60\", unit={\"id\": \"UNI9999999\"}),\n ],\n )\n\n # A Special parameter (an inventory item) takes the item's id as its value;\n # short_name is only sent for Special parameters.\n equipment = ParameterSetpoint(\n parameter_id=\"PRM3\",\n category=ParameterCategory.SPECIAL,\n value={\"id\": \"INV9999999\"},\n short_name=\"Oven\",\n )\n ```",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter to set. Provide either ``parameter`` or ``parameter_id``. If both are given they must refer to the same parameter."
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of the setpoint. For a Special parameter (an inventory item), provide the item's [`EntityLink`][albert.core.shared.models.base.EntityLink] (or a mapping with an ``id``). Mutually exclusive with ``intervals`` for Normal parameters.",
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable.",
"title": "Unit"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the parameter (e.g. ``\"PRM9999999\"``). Provide either ``parameter`` or ``parameter_id``.",
"title": "Id"
},
"Intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Interval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The interval values when the parameter is intervalized. Provide either ``intervals`` or ``value`` (plus ``unit``), not both.",
"title": "Intervals"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the parameter: ``SPECIAL`` for an inventory item (Equipment, Consumable, Template), ``NORMAL`` for everything else."
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The short / display name of the parameter. Only sent on create for ``SPECIAL``-category parameters; the platform rejects ``shortName`` on Normal parameters, so the SDK drops it there.",
"title": "Shortname"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter name. Auto-filled from ``parameter`` when one is provided.",
"title": "Name"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. The row ID of this parameter with respect to its interval row.",
"title": "Rowid"
},
"prgPrmRowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. Maps this setpoint to its row in the parent Data Template or Parameter Group. Populated by the SDK during [`create`][albert.collections.workflows.WorkflowCollection.create]; do not set when building workflows.",
"title": "Prgprmrowid"
}
},
"title": "ParameterSetpoint",
"type": "object"
}
Fields:
-
parameter(Parameter | None) -
value(str | dict[str, Any] | EntityLink | None) -
unit(SerializeAsEntityLink[Unit] | None) -
parameter_id(ParameterId | None) -
intervals(list[Interval] | None) -
category(ParameterCategory | None) -
short_name(str | None) -
name(str | None) -
row_id(RowId | None) -
sequence(str | None)
Validators:
parameter
parameter: Parameter | None = None
The parameter to set. Provide either parameter or parameter_id. If both are given they must refer to the same parameter.
value
value: str | dict[str, Any] | EntityLink | None = None
The value of the setpoint. For a Special parameter (an inventory item), provide the item's EntityLink (or a mapping with an id). Mutually exclusive with intervals for Normal parameters.
parameter_id
parameter_id: ParameterId | None = None
The ID of the parameter (e.g. "PRM9999999"). Provide either parameter or parameter_id.
intervals
The interval values when the parameter is intervalized. Provide either intervals or value (plus unit), not both.
category
category: ParameterCategory | None = None
The category of the parameter: SPECIAL for an inventory item (Equipment, Consumable, Template), NORMAL for everything else.
short_name
short_name: str | None = None
The short / display name of the parameter. Only sent on create for SPECIAL-category parameters; the platform rejects shortName on Normal parameters, so the SDK drops it there.
row_id
row_id: RowId | None = None
Read-only. The row ID of this parameter with respect to its interval row.
sequence
sequence: str | None = None
Read-only. Maps this setpoint to its row in the parent Data Template or Parameter Group. Populated by the SDK during create; do not set when building workflows.
validate_shape
validate_shape() -> ParameterSetpoint
Source code in src/albert/resources/workflows.py
ParameterGroupSetpoints
Bases: BaseAlbertModel
All parameter setpoints belonging to one Data Template or Parameter Group.
A workflow is organized by group: each ParameterGroupSetpoints names one
Data Template or Parameter Group (by id or by a full parameter_group object)
and carries the ParameterSetpoint list for the parameters in it. A
Workflow holds one of these per group. Both the order of setpoints within a
group and the order of groups within the workflow are part of what makes a workflow
unique, so preserve the order you intend. Group sequence is read-only; list order
alone defines group ordering when creating workflows. Setpoint sequence is also
read-only (see ParameterSetpoint).
Example
Show JSON schema:
{
"$defs": {
"ACL": {
"description": "A single access rule for a user.",
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
}
},
"required": [
"id"
],
"title": "ACL",
"type": "object"
},
"AccessControlLevel": {
"description": "Access control levels you can grant users.",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectStrictViewer",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer",
"CASFullAccess"
],
"title": "AccessControlLevel",
"type": "string"
},
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"Cas": {
"description": "A CAS entry: a chemical substance identified by its CAS Registry Number.\n\nA ``Cas`` is Albert's dictionary record for a substance. Raw-material Inventory\nItems reference these entries to declare what they are made of, pairing each\n``Cas`` with an amount (see [`CasAmount`][albert.resources.inventory.CasAmount]).\nManage entries through\n[`CasCollection`][albert.collections.cas.CasCollection] (``client.cas``): most fields\nare populated by Albert, so you typically only build a ``Cas`` from a registry\n``number`` when creating a new entry.\n\n!!! example\n ```python\n from albert.resources.cas import Cas\n # Build a CAS entry to register a new substance\n cas = Cas(number=\"7727-37-9\")\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"number": {
"description": "The CAS number.",
"title": "Number",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the CAS.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The description or name of the CAS.",
"title": "Description"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Notes related to the CAS.",
"title": "Notes"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/CasCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the CAS."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS SMILES notation.",
"title": "Cassmiles"
},
"inchiKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "InChIKey of the CAS.",
"title": "Inchikey"
},
"iUpacName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "IUPAC name of the CAS.",
"title": "Iupacname"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The AlbertID of the CAS.",
"title": "Albertid"
},
"hazards": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Hazard"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazards associated with the CAS.",
"title": "Hazards"
},
"wgk": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "German Water Hazard Class (WGK) number.",
"title": "Wgk"
},
"ecListNo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "European Community (EC) number.",
"title": "Eclistno"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Internal classification_type reference.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Classification type of the CAS.",
"title": "Classificationtype"
},
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS order.",
"title": "Order"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"description": "Custom metadata keyed by field. Updatable.",
"title": "Metadata",
"type": "object"
}
},
"required": [
"number"
],
"title": "Cas",
"type": "object"
},
"CasAmount": {
"description": "A single CAS constituent and its concentration within an [`InventoryItem`][albert.resources.inventory.InventoryItem].\n\nA ``CasAmount`` links one CAS number (a chemical substance identifier) to the\namount of that substance present in an inventory item, expressed as a range\n(``min`` to ``max``) with an optional ``target``. A list of these on an\n[`InventoryItem`][albert.resources.inventory.InventoryItem] gives the item's compositional breakdown.\n\nIdentify the CAS in one of two ways: pass a full [`Cas`][albert.resources.cas.Cas]\nobject as ``cas`` (its ``id``, ``number``, and ``cas_smiles`` are then copied onto\nthis amount), or pass just the CAS resource ``id`` string. Do not pass both.\n\n!!! example\n ```python\n from albert.resources.inventory import CasAmount\n\n # Reference an existing CAS resource by its Albert ID, 10-30% concentration\n amount = CasAmount(min=10.0, max=30.0, id=\"CAS1\")\n ```",
"properties": {
"min": {
"description": "The minimum amount (concentration) of the CAS in the item.",
"title": "Min",
"type": "number"
},
"max": {
"description": "The maximum amount (concentration) of the CAS in the item.",
"title": "Max",
"type": "number"
},
"inventoryValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target amount of the CAS in the item. Serialized as ``inventoryValue``.",
"title": "Inventoryvalue"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the CAS resource this amount represents. Provide either a ``cas`` object or an ``id``; when ``cas`` is given, this is set from it.",
"title": "Id"
},
"casCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the CAS is a trade secret.",
"title": "Cascategory"
},
"inventoryFunction": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/ListItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "string"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Business-controlled functions associated with the CAS in this inventory context (e.g. what role the substance plays). Values come from a managed list.",
"title": "Inventoryfunction"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS type. Can be retrieved from the CAS collection before construction.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The EU classification source for the CAS: harmonized, notified, or REACH.",
"title": "Classificationtype"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The substance ID linked to this CAS entry.",
"title": "Substanceid"
},
"cas": {
"anyOf": [
{
"$ref": "#/$defs/Cas"
},
{
"type": "null"
}
],
"default": null,
"description": "The full CAS object associated with this amount. Read-only after init; excluded from serialization. Provide either a ``cas`` or an ``id``."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string of the CAS resource. Read-only; set from the ``cas`` object.",
"title": "Cassmiles"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS number (e.g. ``\"7440-32-6\"``). Read-only; set from the ``cas`` object.",
"title": "Number"
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit metadata for creation. Read-only."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/CasAuditFieldsWithEmail"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit metadata for the last update. Read-only. See Also --------"
}
},
"required": [
"min",
"max"
],
"title": "CasAmount",
"type": "object"
},
"CasAuditFieldsWithEmail": {
"description": "The audit fields for a CAS resource with email",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
}
},
"title": "CasAuditFieldsWithEmail",
"type": "object"
},
"CasCategory": {
"enum": [
"User",
"Verisk",
"TSCA - Public",
"TSCA - Private",
"not TSCA",
"CAS linked to External Database",
"Unknown (Trade Secret)",
"CL_Inventory Upload"
],
"title": "CasCategory",
"type": "string"
},
"Company": {
"description": "A manufacturing company or supplier tracked in Albert.\n\nA Company is the organization that makes or supplies a material. It is the\n``company`` linked on raw-material inventory items: each raw material points\nback to the Company that manufactures it (see\n[`InventoryItem`][albert.resources.inventory.InventoryItem]). Companies are managed\nthrough [`CompanyCollection`][albert.collections.companies.CompanyCollection], accessed as\n``client.companies``.\n\nCompanies are identified by a Company ID (format ``COM...``). A Company is\ntypically minimal: a name plus its assigned ID. You construct one directly\n(``Company(name=\"Acme Chemicals\")``) to create it or to attach it to an\ninventory item.\n\n!!! example\n ```python\n from albert.resources.companies import Company\n\n # Build a company to create or attach to an inventory item\n company = Company(name=\"Acme Chemicals\")\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The company's name. This is the primary identifier used when searching for or creating a company.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Company ID (format ``COM...``). ``None`` until the company is created in or retrieved from Albert.",
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Search-relevance score returned when the company comes back as a search result. Read-only; not set on companies you build yourself.",
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
},
"DataType": {
"description": "The data type of a parameter value, driving how it is validated.\n\nUsed by [`ValueValidation`][albert.resources.parameter_groups.ValueValidation] to declare what kind of value a parameter\naccepts.\n\nAttributes\n----------\nNUMBER : str\n A numeric value.\nSTRING : str\n A free-text string value.\nENUM : str\n A value restricted to a fixed set of options (see\n [`EnumValidationValue`][albert.resources.parameter_groups.EnumValidationValue]).\nIMAGE : str\n An image value.\nCURVE : str\n A curve (series) value.\nDATE : str\n A calendar date value stored as ``YYYY-MM-DD``.\nTIMESTAMP : str\n A date-and-time value in ISO 8601 format with a UTC offset\n (e.g. ``2026-05-21T14:32:00+02:00``).",
"enum": [
"number",
"string",
"enum",
"image",
"curve",
"date",
"timestamp"
],
"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.",
"properties": {
"text": {
"description": "The text of the enum value.",
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the enum value. If not provided, the ID will be generated upon creation.",
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Hazard": {
"description": "A single GHS hazard classification associated with a CAS substance.\n\nHazards are read from the CAS record; a [`Cas`][albert.resources.cas.Cas] may carry a list of them.",
"properties": {
"subCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard subcategory",
"title": "Subcategory"
},
"hCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code",
"title": "Hcode"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard category",
"title": "Category"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard classification",
"title": "Class"
},
"hCodeText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code text",
"title": "Hcodetext"
}
},
"title": "Hazard",
"type": "object"
},
"Interval": {
"description": "One value that an intervalized parameter is varied across.\n\nWhen a parameter is \"intervalized\" (tested at several values rather than a single\nsetpoint), each of those values is represented by an [`Interval`][albert.resources.workflows.Interval]. A list of\nthem is placed on the parameter's [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint] via its ``intervals``\nfield. The workflow then carries the resulting [`IntervalCombination`][albert.resources.workflows.IntervalCombination] entries,\none per interval (or per cartesian product of intervalized parameters).\n\n!!! example\n ```python\n from albert.resources.workflows import Interval\n\n # A Normal parameter varied across two temperatures.\n low = Interval(value=\"25\", unit={\"id\": \"UNI9999999\"})\n high = Interval(value=\"60\", unit={\"id\": \"UNI9999999\"})\n ```",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of this interval. For Normal parameters this is a scalar string (e.g. ``\"23\"``). For Special parameters (Equipment, Consumables, Templates) this may be an object with an ``id`` (and optional ``name``), matching [`ParameterSetpoint.value`][albert.resources.workflows.ParameterSetpoint.value]. Empty or hyphen intervals (represented as ``\"\"`` or ``None``) are permitted on the platform for optional parameters and exclusion matching. The sibling ``name`` field is independent and is not copied from an object value.",
"title": "Value"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the interval value. Populated for Special parameters (e.g. ``\"Pipette 0.01 -0.1 ml (10 - 100 \u03bcl)\"``). ``None`` for Normal parameters. Not auto-filled from an object ``value``.",
"title": "Name"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable. If given, the unit must have an ``id``. See Also --------",
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
},
"InventoryCategory": {
"description": "The kind of material an [`InventoryItem`][albert.resources.inventory.InventoryItem] represents.\n\nEvery inventory item belongs to exactly one category, which determines how it\nis used across the platform and which fields are relevant to it.\n\nAttributes\n----------\nRAW_MATERIALS : str\n A purchased substance used as an ingredient (e.g. a solvent or pigment).\n Typically linked to a manufacturing ``company`` and one or more CAS numbers.\nCONSUMABLES : str\n Lab supplies consumed during work (e.g. gloves, vials, filters).\nEQUIPMENT : str\n Instruments and apparatus (e.g. a balance or spectrometer).\nFORMULAS : str\n A mixture designed in Albert under a Project. Creating a Formula item\n requires ``project_id`` set to the parent Project's ID.",
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
},
"InventoryDensity": {
"description": "The density of an inventory item or lot measured by volume.\n\nDensity is expressed in grams per milliliter (g/mL) and locked at creation.\nWhen creating a volume-based item or lot, supply either a bare numeric value\n(float, int, or string) or an [`InventoryDensity`][albert.resources.inventory.InventoryDensity]\ninstance. Metadata fields (attribute ID, unit ID, unit name, locked flag)\nare populated by the server and are read-only.\n\n!!! example\n ```python\n from albert.resources.inventory import InventoryDensity\n\n density = InventoryDensity(value=1.05)\n ```",
"properties": {
"value": {
"description": "The density value in g/mL.",
"title": "Value",
"type": "number"
},
"atrId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the density attribute definition. Read-only.",
"title": "Atrid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the density measurement unit. Read-only.",
"title": "Unitid"
},
"unitName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the density measurement unit (e.g. ``g/mL``). Read-only.",
"title": "Unitname"
},
"lockedAtCreation": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the density was locked when the parent entity was created. Read-only.",
"title": "Lockedatcreation"
}
},
"required": [
"value"
],
"title": "InventoryDensity",
"type": "object"
},
"InventoryItem": {
"description": "A catalog entry for a material tracked in Albert.\n\nAn ``InventoryItem`` is the canonical record for a raw material, consumable,\npiece of equipment, or formula. Its [`InventoryCategory`][albert.resources.inventory.InventoryCategory] determines how it\nis used across the platform, and once saved it is referenced everywhere by its\nInventory ID (format ``INV...``, e.g. ``\"INVA9999999\"``). Raw materials are typically\nlinked to a manufacturing ``company`` and a compositional breakdown of CAS\namounts. A Formula item represents a mixture designed in a Project; creating\none requires ``project_id`` set to the parent Project's ID.\n\nItems are managed through\n[`InventoryCollection`][albert.collections.inventory.InventoryCollection] (``client.inventory``).\n\n!!! example\n ```python\n from albert.resources.inventory import (\n InventoryCategory,\n InventoryDensity,\n InventoryItem,\n InventoryUnitCategory,\n )\n\n # Mass-based inventory item\n item = InventoryItem(\n name=\"Titanium Dioxide\",\n category=InventoryCategory.RAW_MATERIALS,\n company=\"Acme Chemicals\",\n )\n\n # Volume-based inventory item\n volume_item = InventoryItem(\n name=\"Isopropyl Alcohol\",\n category=InventoryCategory.RAW_MATERIALS,\n unit_category=InventoryUnitCategory.VOLUME,\n density=InventoryDensity(value=0.785),\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of Tag objects or strings representing tags.",
"title": "Tags"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the item.",
"title": "Name"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Inventory ID (format ``INV...``). Set when the item is retrieved from or created in Albert. Serialized as ``albertId``.",
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A free-text description of the item.",
"title": "Description"
},
"category": {
"$ref": "#/$defs/InventoryCategory",
"description": "The kind of material this item represents. Required. One of ``RawMaterials``, ``Consumables``, ``Equipment``, or ``Formulas``."
},
"unitCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryUnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The dimension the item is measured in (mass, volume, length, pressure, or units). If not supplied, it defaults from ``category``: mass for raw materials and formulas, units for equipment and consumables."
},
"density": {
"anyOf": [
{
"$ref": "#/$defs/InventoryDensity"
},
{
"type": "null"
}
],
"default": null,
"description": "The density in g/mL for volume-based inventory items. Required at creation when ``unit_category`` is volume. Locked at creation and cannot be changed."
},
"class": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null,
"description": "The access/security class of the item (e.g. confidential, shared, restricted)."
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The manufacturing Company associated with the item (links to the Company collection). Accepts a [`Company`][albert.resources.companies.Company] or a name string; a string is turned into a Company that is first-or-created on save.",
"title": "Company"
},
"minimum": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/InventoryMinimum"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Per-Location reorder thresholds for the item. See [`InventoryMinimum`][albert.resources.inventory.InventoryMinimum].",
"title": "Minimum"
},
"alias": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "An alternate name for the item.",
"title": "Alias"
},
"Cas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasAmount"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The item's compositional breakdown as CAS amounts. See [`CasAmount`][albert.resources.inventory.CasAmount].",
"title": "Cas"
},
"isFormulaOverride": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the substance/CAS-level breakdown for this formula has been overridden from the auto-calculated value; commonly set to indicate the formula is not a non-reactive homogeneous mixture.",
"title": "Isformulaoverride"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom metadata fields. Allowed keys are defined by the workspace's CustomFields configuration.",
"title": "Metadata"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parent Project ID. Required for Formulas. Serialized as ``parentId``.",
"title": "Parentid"
},
"ACL": {
"description": "Access-control entries governing who can act on the item.",
"items": {
"$ref": "#/$defs/ACL"
},
"title": "Acl",
"type": "array"
},
"onHand": {
"default": 0.0,
"description": "Total amount currently on hand across all lots. Read-only.",
"title": "Onhand",
"type": "number"
},
"onHandL": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Total amount currently on hand across all lots in litres for volume-based items. Read-only.",
"title": "Onhandl"
},
"TaskConfig": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Task configuration associated with the item. Read-only.",
"title": "Taskconfig"
},
"formulaId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The formula ID for a formula item. Read-only.",
"title": "Formulaid"
},
"Symbols": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard/pictogram symbols associated with the item. Read-only.",
"title": "Symbols"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The UN hazardous-material number, when applicable. Read-only.",
"title": "Unnumber"
},
"recentAttachmentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the most recent attachment on the item. Read-only. See Also --------",
"title": "Recentattachmentid"
}
},
"required": [
"category"
],
"title": "InventoryItem",
"type": "object"
},
"InventoryMinimum": {
"description": "A reorder threshold: the minimum stock of an [`InventoryItem`][albert.resources.inventory.InventoryItem] to keep at a Location.\n\nEach entry pairs one Location with the minimum quantity of an item that must be\nkept on hand there. An [`InventoryItem`][albert.resources.inventory.InventoryItem] may carry several of these, one per\nLocation. Identify the Location either by passing a full\n[`Location`][albert.resources.locations.Location] object as ``location`` (its ``id`` is\nthen copied onto ``id``), or by passing the location ``id`` string directly. Provide\none or the other, not both.\n\n!!! example\n ```python\n from albert.resources.inventory import InventoryMinimum\n\n minimum = InventoryMinimum(id=\"LOC9999999\", minimum=500)\n ```",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the Location this minimum applies to. Provide either a ``location`` or an ``id``; when ``location`` is given, this is set from it.",
"title": "Id"
},
"location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"type": "null"
}
],
"default": null,
"description": "The Location object this minimum applies to. Excluded from serialization. Provide either a ``location`` or an ``id``."
},
"minimum": {
"description": "The minimum amount of the item that must be kept in stock at the Location. Must be between 0 and 1e15. See Also --------",
"maximum": 1000000000000000,
"minimum": 0,
"title": "Minimum",
"type": "number"
}
},
"required": [
"minimum"
],
"title": "InventoryMinimum",
"type": "object"
},
"InventoryUnitCategory": {
"description": "The dimension of the unit an [`InventoryItem`][albert.resources.inventory.InventoryItem] is measured and stocked in.\n\nDetermines how quantities on hand and in formulas are interpreted. When not\nsupplied, the category defaults based on [`InventoryCategory`][albert.resources.inventory.InventoryCategory]: ``MASS``\nfor raw materials and formulas, ``UNITS`` for equipment and consumables.\n\nAttributes\n----------\nMASS : str\n Measured by mass (e.g. grams, kilograms).\nVOLUME : str\n Measured by volume (e.g. milliliters, liters). Supported for RawMaterials\n and Consumables; requires ``density`` at creation.\nLENGTH : str\n Measured by length (e.g. meters).\nPRESSURE : str\n Measured by pressure.\nUNITS : str\n Counted as discrete units (e.g. each item).",
"enum": [
"mass",
"volume",
"length",
"pressure",
"units"
],
"title": "InventoryUnitCategory",
"type": "string"
},
"ListItem": {
"description": "A single allowed value in a configurable list of options.\n\nList items back the choices offered by ``list``-type custom fields (e.g.\ndropdown options) and other fixed option sets in Albert. A\n[`CustomField`][albert.resources.custom_fields.CustomField] with\n[`LIST`][albert.resources.custom_fields.FieldType.LIST] defines a list (keyed\nby ``list_type``, typically the field's name); its selectable options are\n``ListItem`` records with a matching ``list_type``. Managed through\n[`ListsCollection`][albert.collections.lists.ListsCollection] (``client.lists``).\n\n!!! example\n ```python\n from albert.resources.lists import ListItem, ListItemCategory\n item = ListItem(name=\"In Progress\", category=ListItemCategory.USER_DEFINED)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The display name of the list item (the option value).",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the list item. Set when the item is retrieved from or created in Albert.",
"title": "Albertid"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ListItemCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the list item. Allowed values are ``businessDefined``, ``userDefined``, ``projects``, ``extensions``, and ``inventory``."
},
"listType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The list this item belongs to. For a list-type custom field this is typically the field's name (see [`CustomField`][albert.resources.custom_fields.CustomField]). For built-in categories the allowed values are ``projectState`` for ``projects``, ``extensions`` for ``extensions``, and ``casCategory`` or ``inventoryFunction`` for ``inventory``.",
"title": "Listtype"
}
},
"required": [
"name"
],
"title": "ListItem",
"type": "object"
},
"ListItemCategory": {
"description": "The category a list item belongs to, which governs its allowed list types.\n\nAttributes\n----------\nBUSINESS_DEFINED : str\n Predefined values managed at the business/organization level.\nUSER_DEFINED : str\n Custom values defined by users.\nPROJECTS : str\n Values used by projects (e.g. project states).\nEXTENSIONS : str\n Values used by extensions.\nINVENTORY : str\n Values used by inventory (e.g. CAS categories or inventory functions).",
"enum": [
"businessDefined",
"userDefined",
"projects",
"extensions",
"inventory"
],
"title": "ListItemCategory",
"type": "string"
},
"Location": {
"description": "A physical lab or site location in Albert.\n\nLocations are referenced by Tasks and Inventory Items to record where an\nactivity is performed or where a material lives, and each Location can hold\none or more Storage Locations\n([`StorageLocation`][albert.resources.storage_locations.StorageLocation]). Managed\nthrough [`LocationCollection`][albert.collections.locations.LocationCollection].\n\n!!! example\n ```python\n from albert.resources.locations import Location\n location = Location(\n name=\"Boston Lab\",\n latitude=42.3601,\n longitude=-71.0589,\n address=\"1 Main St\",\n country=\"US\",\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The human-readable name of the location.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the location. Assigned by Albert and populated once the location has been created or retrieved.",
"title": "Albertid"
},
"latitude": {
"description": "The latitude of the location, in decimal degrees.",
"title": "Latitude",
"type": "number"
},
"longitude": {
"description": "The longitude of the location, in decimal degrees.",
"title": "Longitude",
"type": "number"
},
"address": {
"description": "The street address of the location.",
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The two-letter country code of the location (for example, ``\"US\"``).",
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Operator": {
"description": "A comparison operator constraining a numeric parameter value.\n\nUsed by [`ValueValidation`][albert.resources.parameter_groups.ValueValidation] to bound acceptable values. ``between``\ntakes ``min`` and ``max``; every single-bound operator takes ``value`` (e.g. ``gte``\nwith ``value=\"0\"`` requires the value to be at least 0).\n\nAttributes\n----------\nBETWEEN : str\n Value must fall between ``min`` and ``max`` (inclusive).\nLESS_THAN : str\n Value must be less than ``value``.\nLESS_THAN_OR_EQUAL : str\n Value must be less than or equal to ``value``.\nGREATER_THAN_OR_EQUAL : str\n Value must be greater than or equal to ``value``.\nGREATER_THAN : str\n Value must be greater than ``value``.\nEQUALS : str\n Value must equal ``value``.\nNOT_EQUALS : str\n Not accepted by the API for parameter validations.",
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq",
"neq"
],
"title": "Operator",
"type": "string"
},
"PGType": {
"description": "The kind of task a [`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup] relates to.\n\nA Parameter Group is about making a sample and/or prepping it for measurement,\nand its type records which sort of task it is used in.\n\nAttributes\n----------\nGENERAL : str\n A group used in a general lab task (anything that is not a batch or\n property task).\nBATCH : str\n A group used in a Batch Task ([`BatchTask`][albert.resources.tasks.BatchTask]),\n e.g. a mixing step when manufacturing a batch.\nPROPERTY : str\n A group used in a property (measurement) task to prep a sample for testing.",
"enum": [
"general",
"batch",
"property"
],
"title": "PGType",
"type": "string"
},
"Parameter": {
"description": "The definition of a single experimental condition or input variable.\n\nA Parameter (ID format ``PRM...``) names an \"indirect variable\" such as\nTemperature, Spin Speed, or Instrument. The Parameter itself only defines the\nvariable; its actual value and unit are fixed to a setpoint later, inside a\n[`Workflow`][albert.resources.workflows.Workflow]. Parameters are the building\nblocks of Parameter Groups\n([`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup]) and form the\nparameter side of Data Templates\n([`DataTemplate`][albert.resources.data_templates.DataTemplate]).\n\nManage parameters through\n[`ParameterCollection`][albert.collections.parameters.ParameterCollection]\n(``client.parameters``).\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.parameters import Parameter\n client = Albert()\n param = client.parameters.create(parameter=Parameter(name=\"Temperature\"))\n param.id\n # 'PRM9999999'\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the parameter. Names must be unique.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the parameter (format ``PRM...``). Set when the parameter is retrieved from or created in Albert.",
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional user-defined metadata keyed by field name.",
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the parameter is ``Normal`` (scalar value) or ``Special`` (entity reference). Set by the platform and read-only."
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The rank of the returned parameter. Read-only.",
"title": "Rank"
},
"required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this parameter must be filled in within a Parameter Group.",
"title": "Required"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
},
"ParameterCategory": {
"description": "Whether a [`Parameter`][albert.resources.parameters.Parameter]'s value is a plain scalar or an entity reference.\n\nSet by the platform and read-only. It determines how a parameter's value is\ninterpreted when a setpoint is assigned to it inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nAttributes\n----------\nNORMAL : str\n A \"normal\" parameter whose value is a plain scalar (e.g. a number or text),\n such as Temperature or Spin Speed.\nSPECIAL : str\n A \"special\" parameter whose value references another entity (e.g. Equipment,\n a Consumable, or a Template). The setpoint value is that entity's ID rather\n than a plain scalar.",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"ParameterGroup": {
"description": "A reusable set of parameters (PRG) for making or prepping a sample.\n\nA Parameter Group bundles [`Parameter`][albert.resources.parameters.Parameter]\nentities, along with their values, units, and validation rules, into a reusable\nunit. Whereas a Data Template's parameters relate to a given measurement, a\nParameter Group is about *making* the sample and/or *prepping* it for\nmeasurement (e.g. a mixing step or a cure schedule). Some groups drive Batch\nTasks ([`BatchTask`][albert.resources.tasks.BatchTask]); others are stacked within a\ntask. A group's parameters, together with a Data Template's parameters, are\nfixed to setpoints inside a [`Workflow`][albert.resources.workflows.Workflow].\n\nOnce saved, a group is referenced by its Parameter Group ID (format ``PRG...``,\ne.g. ``\"PRG9999999\"``). Store test standards (e.g. ASTM or ISO) under the\n``\"Standards\"`` key of ``metadata``.\n\nGroups are managed through\n[`ParameterGroupCollection`][albert.collections.parameter_groups.ParameterGroupCollection]\n(``client.parameter_groups``).\n\n!!! example\n ```python\n from albert.resources.parameter_groups import (\n ParameterGroup,\n ParameterValue,\n PGType,\n )\n\n pg = ParameterGroup(\n name=\"Mixing Step\",\n type=PGType.BATCH,\n parameters=[ParameterValue(id=\"PRM9999999\", value=\"500\")],\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of Tag objects or strings representing tags.",
"title": "Tags"
},
"name": {
"description": "The name of the parameter group. Required.",
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/PGType"
},
{
"type": "null"
}
],
"default": null,
"description": "The kind of task the group relates to (``general``, ``batch``, or ``property``)."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Parameter Group ID (format ``PRG...``). Set when the group is retrieved from or created in Albert. Serialized as ``albertId``.",
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A free-text description of the group.",
"title": "Description"
},
"class": {
"$ref": "#/$defs/SecurityClass",
"default": "restricted",
"description": "The access/security class of the group. Defaults to ``RESTRICTED``. Serialized as ``class``."
},
"ACL": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/User"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Access-control entries governing who can act on the group. Serialized as ``ACL``.",
"title": "Acl"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"description": "Custom metadata fields. Test standards are stored under the ``\"Standards\"`` key. Serialized as ``Metadata``.",
"title": "Metadata",
"type": "object"
},
"Parameters": {
"description": "The parameters in the group, each with its value, unit, and validation. See [`ParameterValue`][albert.resources.parameter_groups.ParameterValue]. Serialized as ``Parameters``.",
"items": {
"$ref": "#/$defs/ParameterValue"
},
"title": "Parameters",
"type": "array"
},
"verified": {
"default": false,
"description": "Whether the group has been verified (an approval/governance state). Read-only.",
"title": "Verified",
"type": "boolean"
},
"Documents": {
"description": "Documents (e.g. SOPs) associated with the group. Read-only. Deserialized from ``Documents``.",
"items": {
"$ref": "#/$defs/EntityLink"
},
"title": "Documents",
"type": "array"
}
},
"required": [
"name"
],
"title": "ParameterGroup",
"type": "object"
},
"ParameterSetpoint": {
"description": "The fixed value (or set of interval values) for one parameter within a workflow.\n\nA setpoint pins a single parameter to a condition. Provide either a single ``value``\n(plus ``unit`` where applicable) for a fixed setpoint, or a list of ``intervals`` to\nintervalize the parameter across several values. You must identify the parameter by\npassing either a full ``parameter`` object or its ``parameter_id``. Setpoints are\ngrouped under a [`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints], which is in turn placed on a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nNormal parameters take exactly one of ``value`` or ``intervals``. Special parameters\n(Equipment, Consumables, Templates) take an entity ID as their value.\n\n``sequence`` is read-only: do not set it when building a workflow for\n[`create`][albert.collections.workflows.WorkflowCollection.create]. Provide the parent\ngroup's ``id`` (``PRG...`` or ``DAT...``) on\n[`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints]; the SDK\nresolves each setpoint's row id from that group before create.\n\n!!! example\n ```python\n from albert.resources.parameters import ParameterCategory\n from albert.resources.workflows import ParameterSetpoint, Interval\n\n # A single fixed setpoint identified by parameter ID.\n temp = ParameterSetpoint(parameter_id=\"PRM9999999\", value=\"25\")\n\n # The same parameter intervalized across two values.\n temp_varied = ParameterSetpoint(\n parameter_id=\"PRM9999999\",\n intervals=[\n Interval(value=\"25\", unit={\"id\": \"UNI9999999\"}),\n Interval(value=\"60\", unit={\"id\": \"UNI9999999\"}),\n ],\n )\n\n # A Special parameter (an inventory item) takes the item's id as its value;\n # short_name is only sent for Special parameters.\n equipment = ParameterSetpoint(\n parameter_id=\"PRM3\",\n category=ParameterCategory.SPECIAL,\n value={\"id\": \"INV9999999\"},\n short_name=\"Oven\",\n )\n ```",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter to set. Provide either ``parameter`` or ``parameter_id``. If both are given they must refer to the same parameter."
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of the setpoint. For a Special parameter (an inventory item), provide the item's [`EntityLink`][albert.core.shared.models.base.EntityLink] (or a mapping with an ``id``). Mutually exclusive with ``intervals`` for Normal parameters.",
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable.",
"title": "Unit"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the parameter (e.g. ``\"PRM9999999\"``). Provide either ``parameter`` or ``parameter_id``.",
"title": "Id"
},
"Intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Interval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The interval values when the parameter is intervalized. Provide either ``intervals`` or ``value`` (plus ``unit``), not both.",
"title": "Intervals"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the parameter: ``SPECIAL`` for an inventory item (Equipment, Consumable, Template), ``NORMAL`` for everything else."
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The short / display name of the parameter. Only sent on create for ``SPECIAL``-category parameters; the platform rejects ``shortName`` on Normal parameters, so the SDK drops it there.",
"title": "Shortname"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter name. Auto-filled from ``parameter`` when one is provided.",
"title": "Name"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. The row ID of this parameter with respect to its interval row.",
"title": "Rowid"
},
"prgPrmRowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. Maps this setpoint to its row in the parent Data Template or Parameter Group. Populated by the SDK during [`create`][albert.collections.workflows.WorkflowCollection.create]; do not set when building workflows.",
"title": "Prgprmrowid"
}
},
"title": "ParameterSetpoint",
"type": "object"
},
"ParameterValue": {
"description": "A single [`Parameter`][albert.resources.parameters.Parameter] and its value within a [`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup].\n\nA ``ParameterValue`` binds one Parameter to the value, unit, and validation\nrules it takes inside a group. Each entry must reference an existing Parameter,\nso provide exactly one of ``id`` (the Parameter's Albert ID) or ``parameter``\n(the [`Parameter`][albert.resources.parameters.Parameter] object itself); when a\n``parameter`` is given, the ``id``, ``category``, and ``name`` are populated\nfrom it. Values are later fixed to setpoints inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\n!!! example\n ```python\n from albert.resources.parameter_groups import ParameterValue\n\n # Reference the parameter by its Albert ID\n value = ParameterValue(id=\"PRM9999999\", value=\"500\")\n ```",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null,
"description": "The Parameter this value is associated with. Provide either ``id`` or ``parameter``. Excluded from serialization."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the associated Parameter. Provide either ``id`` or ``parameter``.",
"title": "Id"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the parameter (``Normal`` or ``Special``). Populated from ``parameter`` when one is provided. When only ``id`` is given, the parameter-group create API rejects the payload (``400 \"Category mismatch ... Category undefined expected\"``), so set ``category`` explicitly (``ParameterCategory.NORMAL`` for ordinary parameters) or pass the full ``parameter`` object."
},
"specialType": {
"anyOf": [
{
"$ref": "#/$defs/SpecialParameterType"
},
{
"type": "null"
}
],
"default": null,
"description": "The specific entity type for a ``Special`` parameter. ``None`` for ``Normal`` parameters. The platform does not validate this field on create the way it validates ``category``, so omitting it does not cause a 400."
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A short name for the parameter value. Serialized as ``shortName``.",
"title": "Shortname"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/InventoryItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"$ref": "#/$defs/User"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of the parameter. Can be a plain string, an [`InventoryItem`][albert.resources.inventory.InventoryItem] (e.g. when the parameter represents an instrument choice), or a [`User`][albert.resources.users.User] (e.g. a user reference such as \"Performed By\").",
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of measure for the value. Serialized as ``Unit``.",
"title": "Unit"
},
"Added": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this parameter is required. Defaults to False.",
"title": "Required"
},
"validation": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ValueValidation"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Validation rules applied to the value. See [`ValueValidation`][albert.resources.parameter_groups.ValueValidation].",
"title": "Validation"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the parameter. Read-only.",
"title": "Name"
},
"sequence": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The sequence of the parameter within the group. Read-only.",
"title": "Sequence"
},
"originalShortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalshortname"
},
"originalName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalname"
}
},
"title": "ParameterValue",
"type": "object"
},
"Role": {
"description": "A named set of access permissions within a tenant.\n\nA role bundles policies that determine what a holder is allowed to do. Roles\nare assigned to users ([`User`][albert.resources.users.User]) and referenced\nby entity ACLs. Roles are typically read from Albert rather than built by\nhand.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the role. Role IDs may contain ``#`` characters. Set once the role is retrieved from Albert.",
"title": "Albertid"
},
"name": {
"description": "The display name of the role.",
"title": "Name",
"type": "string"
},
"Policies": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The policies (permission rules) associated with the role.",
"title": "Policies"
},
"tenant": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the tenant the role belongs to. Omitted on role-only (id-filtered) responses.",
"title": "Tenant"
},
"visibility": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the role is visible in the platform's role listings.",
"title": "Visibility"
}
},
"required": [
"name"
],
"title": "Role",
"type": "object"
},
"SecurityClass": {
"description": "The security (access control) class of a resource.\n\nAttributes\n----------\nSHARED : str\n Accessible to all members of the tenant.\nRESTRICTED : str\n Access is restricted to specific teams or users.\nCONFIDENTIAL : str\n Access is limited to designated users only.\nPRIVATE : str\n Visible only to the owner. Used by Projects.\nPUBLIC : str\n Accessible publicly. Returned by Parameter Groups.",
"enum": [
"shared",
"restricted",
"confidential",
"private",
"public"
],
"title": "SecurityClass",
"type": "string"
},
"SpecialParameterType": {
"description": "The specific entity type referenced by a Special\n[`Parameter`][albert.resources.parameters.Parameter].\n\nNot returned by the platform parameter API (use Zeus reports RET48/RET52 to\nread the subtype from experiment data). Writable on\n[`ParameterValue`][albert.resources.parameter_groups.ParameterValue] and\n[`TargetParameter`][albert.resources.targets.TargetParameter].\n\nEach member implies an id-namespace for the value column in experiment reports\n(RET48/RET52): ``RAW_MATERIALS`` values carry ``INVA...`` ids, ``CONSUMABLES``\ncarry ``INVB...`` ids, ``EQUIPMENT`` carry ``INVC...`` ids, and ``FORMULAS``\ncarry ``INVMO...`` ids.\n\nMirrors [`InventoryCategory`][albert.resources.inventory.InventoryCategory],\nthe canonical \"kind of material\" an\n[`InventoryItem`][albert.resources.inventory.InventoryItem] belongs to. A\nSpecial parameter's value is always a reference to an `InventoryItem`, so its\nsubtype is one of that enum's members.\n\nAttributes\n----------\nRAW_MATERIALS : str\n A raw material entity. Values appear as ``INVA...`` ids in report columns.\nCONSUMABLES : str\n A consumable entity. Values appear as ``INVB...`` ids in report columns.\nEQUIPMENT : str\n An equipment entity. Values appear as ``INVC...`` ids in report columns.\nFORMULAS : str\n A formula entity (a mixture designed through a Worksheet). Values appear\n as ``INVMO...`` ids in report columns.",
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "SpecialParameterType",
"type": "string"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Tag": {
"description": "A freeform text label used to categorize and connect entities.\n\nTags are shared by name across the platform and can be applied to inventory\nitems, companies, tasks, and other records to group and filter them. Managed\nthrough [`TagCollection`][albert.collections.tags.TagCollection] (``client.tags``);\nthe usual entry point is [`get_or_create`][albert.collections.tags.TagCollection.get_or_create].\n\n!!! example\n ```python\n from albert.resources.tags import Tag\n tag = Tag(tag=\"high-priority\")\n ```\nMethods\n-------\nfrom_string(tag) -> Tag\n Build a Tag from its name string.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the tag (its text label).",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the tag (format ``TAG...``). Set when the tag is retrieved from or created in Albert. Methods ------- from_string(tag) -> Tag Build a Tag from its name string.",
"title": "Albertid"
}
},
"required": [
"name"
],
"title": "Tag",
"type": "object"
},
"Unit": {
"description": "A unit of measure (e.g. ``g``, ``mL``, ``\u00b0C``).\n\nUnits qualify quantities throughout the platform: inventory amounts,\nparameter values, and property results. Managed through\n[`UnitCollection`][albert.collections.units.UnitCollection] (``client.units``).\n\n!!! example\n ```python\n from albert.resources.units import Unit, UnitCategory\n unit = Unit(name=\"milliliter\", symbol=\"mL\", category=UnitCategory.LIQUID_VOLUME)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the unit (format ``UNI...``). Set when the unit is retrieved from or created in Albert.",
"title": "Albertid"
},
"name": {
"description": "Currently this is the only field that is displayed in Albert, so use this for display purposes. Therefore, users often use the symbol for the unit here as that's the preferred display.",
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display symbol for the unit (e.g. ``\"g\"``).",
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Alternate names or spellings that also refer to this unit.",
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The physical quantity the unit measures (e.g. ``Mass``, ``Volume``)."
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the unit has been verified in Albert. Read-only.",
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "The physical quantity a unit measures.\n\nAttributes\n----------\nLENGTH : str\n Length units (e.g. m, cm).\nVOLUME : str\n Volume units (e.g. m\u00b3).\nLIQUID_VOLUME : str\n Liquid volume units (e.g. L, mL).\nANGLES : str\n Angle units (e.g. degrees, radians).\nTIME : str\n Time units (e.g. s, h).\nFREQUENCY : str\n Frequency units (e.g. Hz).\nMASS : str\n Mass units (e.g. g, kg).\nCURRENT : str\n Electric current units (e.g. A).\nTEMPERATURE : str\n Temperature units (e.g. \u00b0C, K).\nAMOUNT : str\n Amount of substance units (e.g. mol).\nLUMINOSITY : str\n Luminous intensity units (e.g. cd).\nFORCE : str\n Force units (e.g. N).\nENERGY : str\n Energy units (e.g. J).\nPOWER : str\n Power units (e.g. W).\nPRESSURE : str\n Pressure units (e.g. Pa, bar).\nELECTRICITY_AND_MAGNETISM : str\n Electricity and magnetism units.\nOTHER : str\n Units that do not fit another category.\nWEIGHT : str\n Weight units.\nAREA : str\n Area units (e.g. m\u00b2).\nSURFACE_AREA : str\n Surface area units.\nBINARY : str\n Binary/digital-information units (e.g. bytes).\nCAPACITANCE : str\n Capacitance units (e.g. F).\nSPEED : str\n Speed units (e.g. m/s).\nELECTRICAL_CONDUCTIVITY : str\n Electrical conductivity units.\nELECTRICAL_PERMITTIVITY : str\n Electrical permittivity units.\nDENSITY : str\n Density units (e.g. g/mL).\nRESISTANCE : str\n Electrical resistance units (e.g. \u03a9).",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
},
"User": {
"description": "An Albert user account: a person who can log in and act in the platform.\n\nA user has a name and email, an optional home\n[`Location`][albert.resources.locations.Location], and a set of\n[`Role`][albert.resources.roles.Role] objects that govern what they can do.\nThe ``user_class`` sets a broad permission tier\n([`UserClass`][albert.resources.users.UserClass]). Users are grouped into teams\n([`Team`][albert.resources.teams.Team]), and are referenced across the\nplatform, for example as the assignee of a Task or in an entity's ACL.\n\n!!! example\n ```python\n from albert.resources.users import User, UserClass\n user = User(\n name=\"Ada Lovelace\",\n email=\"ada@example.com\",\n user_class=UserClass.STANDARD,\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The display name of the user.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert User ID (format ``USR...``). Set once the user is registered in or retrieved from Albert.",
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The user's home location.",
"title": "Location"
},
"email": {
"default": null,
"description": "The user's email address.",
"format": "email",
"title": "Email",
"type": "string"
},
"Roles": {
"description": "The roles the user holds, which determine their permissions.",
"items": {
"anyOf": [
{
"$ref": "#/$defs/Role"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"maxItems": 1,
"title": "Roles",
"type": "array"
},
"userClass": {
"$ref": "#/$defs/UserClass",
"default": "standard",
"description": "The ACL class level of the user (broad permission tier)."
},
"witnesser": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the user can act as a witness on tasks (only relevant when witnessing is enabled for the tenant).",
"title": "Witnesser"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom metadata attached to the user.",
"title": "Metadata"
}
},
"required": [
"name"
],
"title": "User",
"type": "object"
},
"UserClass": {
"description": "The ACL class level of a user, setting a broad permission tier.\n\nAttributes\n----------\nGUEST : str\n Most limited access; typically external or temporary users.\nSTANDARD : str\n Default access level for regular users.\nTRUSTED : str\n Elevated access above standard users.\nPRIVILEGED : str\n High access level below full administrators.\nADMIN : str\n Full administrative access to the tenant.",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
},
"ValueValidation": {
"description": "A validation rule constraining a [`ParameterValue`][albert.resources.parameter_groups.ParameterValue].\n\nDeclares the expected [`DataType`][albert.resources.parameter_groups.DataType] for a parameter value and, optionally,\nthe bounds or allowed options it must satisfy. Attach one or more of these to a\n[`ParameterValue`][albert.resources.parameter_groups.ParameterValue] via its ``validation`` field.\n\nWhen ``datatype`` is ``date`` or ``timestamp``, ``value``, ``min``, and ``max`` are\nstrings in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].\n\n!!! example\n ```python\n from albert.resources.parameter_groups import (\n DataType,\n Operator,\n ValueValidation,\n )\n\n rule = ValueValidation(\n datatype=DataType.NUMBER,\n operator=Operator.BETWEEN,\n min=\"0\",\n max=\"100\",\n )\n ```",
"properties": {
"datatype": {
"$ref": "#/$defs/DataType",
"description": "The data type the value must conform to. Required."
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "For ``ENUM`` types, the list of allowed options (see [`EnumValidationValue`][albert.resources.parameter_groups.EnumValidationValue]); otherwise the bound for single-bound operators (``lt``, ``lte``, ``gt``, ``gte``, ``eq``). For ``date`` and ``timestamp`` types, a string in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].",
"title": "Value"
},
"min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The lower bound, used only with ``operator=\"between\"``. For numeric types, a numeric string; for ``date`` and ``timestamp`` types, a string in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The upper bound, used only with ``operator=\"between\"``. For numeric types, a numeric string; for ``date`` and ``timestamp`` types, a string in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].",
"title": "Max"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null,
"description": "The comparison operator: ``between`` uses ``min`` and ``max``; the others use ``value``."
}
},
"required": [
"datatype"
],
"title": "ValueValidation",
"type": "object"
}
},
"description": "All parameter setpoints belonging to one Data Template or Parameter Group.\n\nA workflow is organized by group: each [`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints] names one\nData Template or Parameter Group (by ``id`` or by a full ``parameter_group`` object)\nand carries the [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint] list for the parameters in it. A\n[`Workflow`][albert.resources.workflows.Workflow] holds one of these per group. Both the order of setpoints within a\ngroup and the order of groups within the workflow are part of what makes a workflow\nunique, so preserve the order you intend. Group ``sequence`` is read-only; list order\nalone defines group ordering when creating workflows. Setpoint ``sequence`` is also\nread-only (see [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint]).\n\n!!! example\n ```python\n from albert.resources.workflows import (\n ParameterGroupSetpoints,\n ParameterSetpoint,\n )\n\n group = ParameterGroupSetpoints(\n id=\"PRG9999999\",\n parameter_setpoints=[\n ParameterSetpoint(parameter_id=\"PRM9999999\", value=\"25\"),\n ],\n )\n ```",
"properties": {
"parameter_group": {
"anyOf": [
{
"$ref": "#/$defs/ParameterGroup"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group to set setpoints on. Provide either ``parameter_group`` or ``id``. If both are given they must refer to the same group."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the parameter group (``PRG...``) or Data Template (``DAT...``). Provide either ``id`` or ``parameter_group``. Auto-filled from ``parameter_group`` when one is provided.",
"title": "Id"
},
"name": {
"default": "Pre-linked Parameters",
"description": "Read-only display name of the group (defaults to ``\"Pre-linked Parameters\"``).",
"title": "Name",
"type": "string"
},
"Parameters": {
"description": "The setpoints to apply to this group's parameters.",
"items": {
"$ref": "#/$defs/ParameterSetpoint"
},
"title": "Parameters",
"type": "array"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. The group's interval row ID.",
"title": "Rowid"
},
"prgSequence": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. Order of this group within the workflow. Assigned from list order when creating workflows; do not set.",
"title": "Prgsequence"
}
},
"title": "ParameterGroupSetpoints",
"type": "object"
}
Fields:
-
parameter_group(ParameterGroup | None) -
id(ParameterGroupId | DataTemplateId | None) -
parameter_group_name(str) -
parameter_setpoints(list[ParameterSetpoint]) -
row_id(RowId | None) -
sequence(int | None)
Validators:
parameter_group
parameter_group: ParameterGroup | None = None
The parameter group to set setpoints on. Provide either parameter_group or id. If both are given they must refer to the same group.
id
id: ParameterGroupId | DataTemplateId | None = None
The ID of the parameter group (PRG...) or Data Template (DAT...). Provide either id or parameter_group. Auto-filled from parameter_group when one is provided.
parameter_group_name
parameter_group_name: str = 'Pre-linked Parameters'
Read-only display name of the group (defaults to "Pre-linked Parameters").
parameter_setpoints
parameter_setpoints: list[ParameterSetpoint]
The setpoints to apply to this group's parameters.
sequence
sequence: int | None = None
Read-only. Order of this group within the workflow. Assigned from list order when creating workflows; do not set.
validate_identifiers
Source code in src/albert/resources/workflows.py
Workflow
Bases: BaseResource
A specific set of parameter setpoints: the independent variables of a test.
A workflow (WFL) captures only the independent variables of a test, the parameters and the setpoints (a value, plus a unit where applicable) they are fixed to. It is built from one or more groupings of parameters, where each grouping is either a Data Template that has pre-linked parameters or a Parameter Group. A single workflow can combine several groupings, for example one Data Template's pre-linked parameters together with a couple of Parameter Groups, each contributing its own parameter setpoints. Because a Data Template can carry pre-linked parameters, it is used here exactly like a Parameter Group: purely to describe a set of parameters and their setpoints.
A workflow does NOT include a Data Template's Data Columns (also called Results). Those are
the dependent variables, and they are recorded only in Property Data
(TaskPropertyData). In short: the Workflow holds
the independent variables; Property Data holds the dependent variables (the measured
results).
A workflow is uniquely identified by its full setpoint configuration: the value and
unit of every setpoint, the order of parameters within each Data Template / Parameter
Group, and the order of those groups within the workflow. For this reason workflows are
found-or-created rather than blindly created: build the object you want and pass it to
create, which returns the
existing match or makes a new one. IDs look like WFL....
Every tenant includes a built-in workflow WFL1 ("No Parameter Group") with no
parameter groups or setpoints. Use it when a task or block does not involve parameter
groups; it does not need to be created via
create.
When parameters are intervalized, the workflow acts as a parent that carries
the resulting IntervalCombination entries. Each combination has an interval ID of
the form ROW1 (one intervalized parameter) or ROW1XROW2X... (product of several). Use
get_interval_id to build the interval ID for a condition, then use it with the
property_data endpoints to read or write that condition's results.
To construct rules and combination overrides for Property tasks using parameter names
and values, use build_rule and
build_override.
Example
from albert import Albert
from albert.resources.workflows import (
Workflow,
ParameterGroupSetpoints,
ParameterSetpoint,
)
client = Albert()
# One workflow combining a Data Template's pre-linked parameters with two
# Parameter Groups. Each grouping is keyed by its DAT... or PRG... id.
workflow = Workflow(
parameter_group_setpoints=[
# Pre-linked parameters on a Data Template (used just like a PRG here)
ParameterGroupSetpoints(
id="DAT9999999",
parameter_setpoints=[
ParameterSetpoint(parameter_id="PRM9999999", value="23"),
ParameterSetpoint(parameter_id="PRM2", value="50"),
],
),
# A Parameter Group describing sample prep
ParameterGroupSetpoints(
id="PRG9999999",
parameter_setpoints=[
ParameterSetpoint(parameter_id="PRM3", value="24"),
],
),
# A second Parameter Group (e.g. the mixing step)
ParameterGroupSetpoints(
id="PRG2",
parameter_setpoints=[
ParameterSetpoint(parameter_id="PRM4", value="2000"),
],
),
],
)
created = client.workflows.create(workflows=[workflow])
created[0].id
# 'WFL1'
Show JSON schema:
{
"$defs": {
"ACL": {
"description": "A single access rule for a user.",
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
}
},
"required": [
"id"
],
"title": "ACL",
"type": "object"
},
"AccessControlLevel": {
"description": "Access control levels you can grant users.",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectStrictViewer",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer",
"CASFullAccess"
],
"title": "AccessControlLevel",
"type": "string"
},
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"Cas": {
"description": "A CAS entry: a chemical substance identified by its CAS Registry Number.\n\nA ``Cas`` is Albert's dictionary record for a substance. Raw-material Inventory\nItems reference these entries to declare what they are made of, pairing each\n``Cas`` with an amount (see [`CasAmount`][albert.resources.inventory.CasAmount]).\nManage entries through\n[`CasCollection`][albert.collections.cas.CasCollection] (``client.cas``): most fields\nare populated by Albert, so you typically only build a ``Cas`` from a registry\n``number`` when creating a new entry.\n\n!!! example\n ```python\n from albert.resources.cas import Cas\n # Build a CAS entry to register a new substance\n cas = Cas(number=\"7727-37-9\")\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"number": {
"description": "The CAS number.",
"title": "Number",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Name of the CAS.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The description or name of the CAS.",
"title": "Description"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Notes related to the CAS.",
"title": "Notes"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/CasCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the CAS."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS SMILES notation.",
"title": "Cassmiles"
},
"inchiKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "InChIKey of the CAS.",
"title": "Inchikey"
},
"iUpacName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "IUPAC name of the CAS.",
"title": "Iupacname"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The AlbertID of the CAS.",
"title": "Albertid"
},
"hazards": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Hazard"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazards associated with the CAS.",
"title": "Hazards"
},
"wgk": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "German Water Hazard Class (WGK) number.",
"title": "Wgk"
},
"ecListNo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "European Community (EC) number.",
"title": "Eclistno"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Internal classification_type reference.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Classification type of the CAS.",
"title": "Classificationtype"
},
"order": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "CAS order.",
"title": "Order"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"description": "Custom metadata keyed by field. Updatable.",
"title": "Metadata",
"type": "object"
}
},
"required": [
"number"
],
"title": "Cas",
"type": "object"
},
"CasAmount": {
"description": "A single CAS constituent and its concentration within an [`InventoryItem`][albert.resources.inventory.InventoryItem].\n\nA ``CasAmount`` links one CAS number (a chemical substance identifier) to the\namount of that substance present in an inventory item, expressed as a range\n(``min`` to ``max``) with an optional ``target``. A list of these on an\n[`InventoryItem`][albert.resources.inventory.InventoryItem] gives the item's compositional breakdown.\n\nIdentify the CAS in one of two ways: pass a full [`Cas`][albert.resources.cas.Cas]\nobject as ``cas`` (its ``id``, ``number``, and ``cas_smiles`` are then copied onto\nthis amount), or pass just the CAS resource ``id`` string. Do not pass both.\n\n!!! example\n ```python\n from albert.resources.inventory import CasAmount\n\n # Reference an existing CAS resource by its Albert ID, 10-30% concentration\n amount = CasAmount(min=10.0, max=30.0, id=\"CAS1\")\n ```",
"properties": {
"min": {
"description": "The minimum amount (concentration) of the CAS in the item.",
"title": "Min",
"type": "number"
},
"max": {
"description": "The maximum amount (concentration) of the CAS in the item.",
"title": "Max",
"type": "number"
},
"inventoryValue": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The target amount of the CAS in the item. Serialized as ``inventoryValue``.",
"title": "Inventoryvalue"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the CAS resource this amount represents. Provide either a ``cas`` object or an ``id``; when ``cas`` is given, this is set from it.",
"title": "Id"
},
"casCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the CAS is a trade secret.",
"title": "Cascategory"
},
"inventoryFunction": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/ListItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "string"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Business-controlled functions associated with the CAS in this inventory context (e.g. what role the substance plays). Values come from a managed list.",
"title": "Inventoryfunction"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS type. Can be retrieved from the CAS collection before construction.",
"title": "Type"
},
"classificationType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The EU classification source for the CAS: harmonized, notified, or REACH.",
"title": "Classificationtype"
},
"substanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The substance ID linked to this CAS entry.",
"title": "Substanceid"
},
"cas": {
"anyOf": [
{
"$ref": "#/$defs/Cas"
},
{
"type": "null"
}
],
"default": null,
"description": "The full CAS object associated with this amount. Read-only after init; excluded from serialization. Provide either a ``cas`` or an ``id``."
},
"casSmiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string of the CAS resource. Read-only; set from the ``cas`` object.",
"title": "Cassmiles"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The CAS number (e.g. ``\"7440-32-6\"``). Read-only; set from the ``cas`` object.",
"title": "Number"
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit metadata for creation. Read-only."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/CasAuditFieldsWithEmail"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit metadata for the last update. Read-only. See Also --------"
}
},
"required": [
"min",
"max"
],
"title": "CasAmount",
"type": "object"
},
"CasAuditFieldsWithEmail": {
"description": "The audit fields for a CAS resource with email",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
}
},
"title": "CasAuditFieldsWithEmail",
"type": "object"
},
"CasCategory": {
"enum": [
"User",
"Verisk",
"TSCA - Public",
"TSCA - Private",
"not TSCA",
"CAS linked to External Database",
"Unknown (Trade Secret)",
"CL_Inventory Upload"
],
"title": "CasCategory",
"type": "string"
},
"Company": {
"description": "A manufacturing company or supplier tracked in Albert.\n\nA Company is the organization that makes or supplies a material. It is the\n``company`` linked on raw-material inventory items: each raw material points\nback to the Company that manufactures it (see\n[`InventoryItem`][albert.resources.inventory.InventoryItem]). Companies are managed\nthrough [`CompanyCollection`][albert.collections.companies.CompanyCollection], accessed as\n``client.companies``.\n\nCompanies are identified by a Company ID (format ``COM...``). A Company is\ntypically minimal: a name plus its assigned ID. You construct one directly\n(``Company(name=\"Acme Chemicals\")``) to create it or to attach it to an\ninventory item.\n\n!!! example\n ```python\n from albert.resources.companies import Company\n\n # Build a company to create or attach to an inventory item\n company = Company(name=\"Acme Chemicals\")\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The company's name. This is the primary identifier used when searching for or creating a company.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Company ID (format ``COM...``). ``None`` until the company is created in or retrieved from Albert.",
"title": "Albertid"
},
"distance": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Search-relevance score returned when the company comes back as a search result. Read-only; not set on companies you build yourself.",
"title": "Distance"
}
},
"required": [
"name"
],
"title": "Company",
"type": "object"
},
"DataType": {
"description": "The data type of a parameter value, driving how it is validated.\n\nUsed by [`ValueValidation`][albert.resources.parameter_groups.ValueValidation] to declare what kind of value a parameter\naccepts.\n\nAttributes\n----------\nNUMBER : str\n A numeric value.\nSTRING : str\n A free-text string value.\nENUM : str\n A value restricted to a fixed set of options (see\n [`EnumValidationValue`][albert.resources.parameter_groups.EnumValidationValue]).\nIMAGE : str\n An image value.\nCURVE : str\n A curve (series) value.\nDATE : str\n A calendar date value stored as ``YYYY-MM-DD``.\nTIMESTAMP : str\n A date-and-time value in ISO 8601 format with a UTC offset\n (e.g. ``2026-05-21T14:32:00+02:00``).",
"enum": [
"number",
"string",
"enum",
"image",
"curve",
"date",
"timestamp"
],
"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.",
"properties": {
"text": {
"description": "The text of the enum value.",
"title": "Text",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the enum value. If not provided, the ID will be generated upon creation.",
"title": "Id"
},
"originalText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originaltext"
}
},
"required": [
"text"
],
"title": "EnumValidationValue",
"type": "object"
},
"Hazard": {
"description": "A single GHS hazard classification associated with a CAS substance.\n\nHazards are read from the CAS record; a [`Cas`][albert.resources.cas.Cas] may carry a list of them.",
"properties": {
"subCategory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard subcategory",
"title": "Subcategory"
},
"hCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code",
"title": "Hcode"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard category",
"title": "Category"
},
"class": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard classification",
"title": "Class"
},
"hCodeText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard code text",
"title": "Hcodetext"
}
},
"title": "Hazard",
"type": "object"
},
"Interval": {
"description": "One value that an intervalized parameter is varied across.\n\nWhen a parameter is \"intervalized\" (tested at several values rather than a single\nsetpoint), each of those values is represented by an [`Interval`][albert.resources.workflows.Interval]. A list of\nthem is placed on the parameter's [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint] via its ``intervals``\nfield. The workflow then carries the resulting [`IntervalCombination`][albert.resources.workflows.IntervalCombination] entries,\none per interval (or per cartesian product of intervalized parameters).\n\n!!! example\n ```python\n from albert.resources.workflows import Interval\n\n # A Normal parameter varied across two temperatures.\n low = Interval(value=\"25\", unit={\"id\": \"UNI9999999\"})\n high = Interval(value=\"60\", unit={\"id\": \"UNI9999999\"})\n ```",
"properties": {
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of this interval. For Normal parameters this is a scalar string (e.g. ``\"23\"``). For Special parameters (Equipment, Consumables, Templates) this may be an object with an ``id`` (and optional ``name``), matching [`ParameterSetpoint.value`][albert.resources.workflows.ParameterSetpoint.value]. Empty or hyphen intervals (represented as ``\"\"`` or ``None``) are permitted on the platform for optional parameters and exclusion matching. The sibling ``name`` field is independent and is not copied from an object value.",
"title": "Value"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the interval value. Populated for Special parameters (e.g. ``\"Pipette 0.01 -0.1 ml (10 - 100 \u03bcl)\"``). ``None`` for Normal parameters. Not auto-filled from an object ``value``.",
"title": "Name"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable. If given, the unit must have an ``id``. See Also --------",
"title": "Unit"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rowid"
}
},
"title": "Interval",
"type": "object"
},
"IntervalCombination": {
"description": "One realized condition (interval combination) carried by a workflow.\n\nReturned by the workflow endpoint when at least one parameter in the workflow has\nbeen intervalized. A combination is a single intervalized parameter (interval ID\n``ROW#``) or the cartesian product of any number of intervalized parameters\n(``ROW#XROW#X...``). On tenants with increased intervals the id may also be a child\nworkflow id (``WFL...``) or a case-sensitive barcode. Its ``interval_id`` is what you\npass to the property_data endpoints to read or write results for that specific\ncondition.",
"properties": {
"interval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The interval ID this combination is associated with. A ``ROW#`` chain of any length, a child workflow id (``WFL...``), a 9-character barcode, or ``\"default\"``. This is the same value [`get_interval_id`][albert.resources.workflows.Workflow.get_interval_id] returns for ROW-chain combinations.",
"title": "Interval"
},
"intervalParams": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameters participating in the interval.",
"title": "Intervalparams"
},
"intervalString": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A human-readable representation of the combination, of the form ``\"[Parameter Name]: [Parameter Value] [Parameter Unit]\"`` for each parameter.",
"title": "Intervalstring"
},
"intervalDetails": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/IntervalDetail"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Per-parameter breakdown of the combination. Each entry has ``name`` (parameter name) and ``value`` (display string, e.g. ``\"C191778 || Pipette ...\"``). See Also --------",
"title": "Intervaldetails"
}
},
"title": "IntervalCombination",
"type": "object"
},
"IntervalCombinationItem": {
"description": "One child-workflow interval combination on a task block (\ud83e\uddea Beta).\n\nReturned by\n[`get_block_combinations`][albert.collections.tasks.TaskCollection.get_block_combinations].\nUse that method rather than any combinations array embedded on a task or block:\nthe embedded array is empty once the block has 500 or more combinations.\n\n!!! warning \"Beta Feature!\"\n Increased intervals combination support is currently in beta and behind a platform\n feature flag. Please do not use in production or without explicit guidance from\n Albert. You might otherwise have a bad experience. This feature currently falls\n outside of the Albert support contract, but we'd love your feedback!\n\n!!! example\n ```python\n from albert import Albert\n\n client = Albert()\n combo = next(\n client.tasks.get_block_combinations(task_id=\"TASFOR1\", block_id=\"BLK1\", max_items=1)\n )\n combo.id\n # 'WFL999'\n combo.interval_barcode\n # 'OhI8ap0HY'\n ```",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The child workflow id for this combination (format ``WFL...``).",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Display name of the combination (parameter names and values).",
"title": "Name"
},
"intervalBarcode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Case-sensitive barcode for the combination. Serialized as ``intervalBarcode``.",
"title": "Intervalbarcode"
},
"intervalRowKey": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Legacy ROW-chain key (e.g. ``ROW3XROW7``). Serialized as ``intervalRowKey``.",
"title": "Intervalrowkey"
}
},
"title": "IntervalCombinationItem",
"type": "object"
},
"IntervalDetail": {
"description": "A single parameter's contribution to an interval combination.\n\nThis appears inside [`IntervalCombination`][albert.resources.workflows.IntervalCombination] (as its ``interval_details``) to\nbreak a combination down into the individual parameters that make it up. It is\nread from the workflow endpoint; you do not construct it directly.",
"properties": {
"name": {
"description": "The parameter name (e.g. ``\"Equipment\"``).",
"title": "Name",
"type": "string"
},
"value": {
"description": "The display value for this interval (e.g. ``\"C191778 || Pipette 0.01 -0.1 ml\"``). See Also --------",
"title": "Value",
"type": "string"
}
},
"required": [
"name",
"value"
],
"title": "IntervalDetail",
"type": "object"
},
"InventoryCategory": {
"description": "The kind of material an [`InventoryItem`][albert.resources.inventory.InventoryItem] represents.\n\nEvery inventory item belongs to exactly one category, which determines how it\nis used across the platform and which fields are relevant to it.\n\nAttributes\n----------\nRAW_MATERIALS : str\n A purchased substance used as an ingredient (e.g. a solvent or pigment).\n Typically linked to a manufacturing ``company`` and one or more CAS numbers.\nCONSUMABLES : str\n Lab supplies consumed during work (e.g. gloves, vials, filters).\nEQUIPMENT : str\n Instruments and apparatus (e.g. a balance or spectrometer).\nFORMULAS : str\n A mixture designed in Albert under a Project. Creating a Formula item\n requires ``project_id`` set to the parent Project's ID.",
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
},
"InventoryDensity": {
"description": "The density of an inventory item or lot measured by volume.\n\nDensity is expressed in grams per milliliter (g/mL) and locked at creation.\nWhen creating a volume-based item or lot, supply either a bare numeric value\n(float, int, or string) or an [`InventoryDensity`][albert.resources.inventory.InventoryDensity]\ninstance. Metadata fields (attribute ID, unit ID, unit name, locked flag)\nare populated by the server and are read-only.\n\n!!! example\n ```python\n from albert.resources.inventory import InventoryDensity\n\n density = InventoryDensity(value=1.05)\n ```",
"properties": {
"value": {
"description": "The density value in g/mL.",
"title": "Value",
"type": "number"
},
"atrId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the density attribute definition. Read-only.",
"title": "Atrid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the density measurement unit. Read-only.",
"title": "Unitid"
},
"unitName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the density measurement unit (e.g. ``g/mL``). Read-only.",
"title": "Unitname"
},
"lockedAtCreation": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the density was locked when the parent entity was created. Read-only.",
"title": "Lockedatcreation"
}
},
"required": [
"value"
],
"title": "InventoryDensity",
"type": "object"
},
"InventoryItem": {
"description": "A catalog entry for a material tracked in Albert.\n\nAn ``InventoryItem`` is the canonical record for a raw material, consumable,\npiece of equipment, or formula. Its [`InventoryCategory`][albert.resources.inventory.InventoryCategory] determines how it\nis used across the platform, and once saved it is referenced everywhere by its\nInventory ID (format ``INV...``, e.g. ``\"INVA9999999\"``). Raw materials are typically\nlinked to a manufacturing ``company`` and a compositional breakdown of CAS\namounts. A Formula item represents a mixture designed in a Project; creating\none requires ``project_id`` set to the parent Project's ID.\n\nItems are managed through\n[`InventoryCollection`][albert.collections.inventory.InventoryCollection] (``client.inventory``).\n\n!!! example\n ```python\n from albert.resources.inventory import (\n InventoryCategory,\n InventoryDensity,\n InventoryItem,\n InventoryUnitCategory,\n )\n\n # Mass-based inventory item\n item = InventoryItem(\n name=\"Titanium Dioxide\",\n category=InventoryCategory.RAW_MATERIALS,\n company=\"Acme Chemicals\",\n )\n\n # Volume-based inventory item\n volume_item = InventoryItem(\n name=\"Isopropyl Alcohol\",\n category=InventoryCategory.RAW_MATERIALS,\n unit_category=InventoryUnitCategory.VOLUME,\n density=InventoryDensity(value=0.785),\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of Tag objects or strings representing tags.",
"title": "Tags"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the item.",
"title": "Name"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Inventory ID (format ``INV...``). Set when the item is retrieved from or created in Albert. Serialized as ``albertId``.",
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A free-text description of the item.",
"title": "Description"
},
"category": {
"$ref": "#/$defs/InventoryCategory",
"description": "The kind of material this item represents. Required. One of ``RawMaterials``, ``Consumables``, ``Equipment``, or ``Formulas``."
},
"unitCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryUnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The dimension the item is measured in (mass, volume, length, pressure, or units). If not supplied, it defaults from ``category``: mass for raw materials and formulas, units for equipment and consumables."
},
"density": {
"anyOf": [
{
"$ref": "#/$defs/InventoryDensity"
},
{
"type": "null"
}
],
"default": null,
"description": "The density in g/mL for volume-based inventory items. Required at creation when ``unit_category`` is volume. Locked at creation and cannot be changed."
},
"class": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null,
"description": "The access/security class of the item (e.g. confidential, shared, restricted)."
},
"Company": {
"anyOf": [
{
"$ref": "#/$defs/Company"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The manufacturing Company associated with the item (links to the Company collection). Accepts a [`Company`][albert.resources.companies.Company] or a name string; a string is turned into a Company that is first-or-created on save.",
"title": "Company"
},
"minimum": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/InventoryMinimum"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Per-Location reorder thresholds for the item. See [`InventoryMinimum`][albert.resources.inventory.InventoryMinimum].",
"title": "Minimum"
},
"alias": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "An alternate name for the item.",
"title": "Alias"
},
"Cas": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/CasAmount"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The item's compositional breakdown as CAS amounts. See [`CasAmount`][albert.resources.inventory.CasAmount].",
"title": "Cas"
},
"isFormulaOverride": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the substance/CAS-level breakdown for this formula has been overridden from the auto-calculated value; commonly set to indicate the formula is not a non-reactive homogeneous mixture.",
"title": "Isformulaoverride"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom metadata fields. Allowed keys are defined by the workspace's CustomFields configuration.",
"title": "Metadata"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parent Project ID. Required for Formulas. Serialized as ``parentId``.",
"title": "Parentid"
},
"ACL": {
"description": "Access-control entries governing who can act on the item.",
"items": {
"$ref": "#/$defs/ACL"
},
"title": "Acl",
"type": "array"
},
"onHand": {
"default": 0.0,
"description": "Total amount currently on hand across all lots. Read-only.",
"title": "Onhand",
"type": "number"
},
"onHandL": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Total amount currently on hand across all lots in litres for volume-based items. Read-only.",
"title": "Onhandl"
},
"TaskConfig": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Task configuration associated with the item. Read-only.",
"title": "Taskconfig"
},
"formulaId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The formula ID for a formula item. Read-only.",
"title": "Formulaid"
},
"Symbols": {
"anyOf": [
{
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Hazard/pictogram symbols associated with the item. Read-only.",
"title": "Symbols"
},
"unNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The UN hazardous-material number, when applicable. Read-only.",
"title": "Unnumber"
},
"recentAttachmentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the most recent attachment on the item. Read-only. See Also --------",
"title": "Recentattachmentid"
}
},
"required": [
"category"
],
"title": "InventoryItem",
"type": "object"
},
"InventoryMinimum": {
"description": "A reorder threshold: the minimum stock of an [`InventoryItem`][albert.resources.inventory.InventoryItem] to keep at a Location.\n\nEach entry pairs one Location with the minimum quantity of an item that must be\nkept on hand there. An [`InventoryItem`][albert.resources.inventory.InventoryItem] may carry several of these, one per\nLocation. Identify the Location either by passing a full\n[`Location`][albert.resources.locations.Location] object as ``location`` (its ``id`` is\nthen copied onto ``id``), or by passing the location ``id`` string directly. Provide\none or the other, not both.\n\n!!! example\n ```python\n from albert.resources.inventory import InventoryMinimum\n\n minimum = InventoryMinimum(id=\"LOC9999999\", minimum=500)\n ```",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the Location this minimum applies to. Provide either a ``location`` or an ``id``; when ``location`` is given, this is set from it.",
"title": "Id"
},
"location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"type": "null"
}
],
"default": null,
"description": "The Location object this minimum applies to. Excluded from serialization. Provide either a ``location`` or an ``id``."
},
"minimum": {
"description": "The minimum amount of the item that must be kept in stock at the Location. Must be between 0 and 1e15. See Also --------",
"maximum": 1000000000000000,
"minimum": 0,
"title": "Minimum",
"type": "number"
}
},
"required": [
"minimum"
],
"title": "InventoryMinimum",
"type": "object"
},
"InventoryUnitCategory": {
"description": "The dimension of the unit an [`InventoryItem`][albert.resources.inventory.InventoryItem] is measured and stocked in.\n\nDetermines how quantities on hand and in formulas are interpreted. When not\nsupplied, the category defaults based on [`InventoryCategory`][albert.resources.inventory.InventoryCategory]: ``MASS``\nfor raw materials and formulas, ``UNITS`` for equipment and consumables.\n\nAttributes\n----------\nMASS : str\n Measured by mass (e.g. grams, kilograms).\nVOLUME : str\n Measured by volume (e.g. milliliters, liters). Supported for RawMaterials\n and Consumables; requires ``density`` at creation.\nLENGTH : str\n Measured by length (e.g. meters).\nPRESSURE : str\n Measured by pressure.\nUNITS : str\n Counted as discrete units (e.g. each item).",
"enum": [
"mass",
"volume",
"length",
"pressure",
"units"
],
"title": "InventoryUnitCategory",
"type": "string"
},
"ListItem": {
"description": "A single allowed value in a configurable list of options.\n\nList items back the choices offered by ``list``-type custom fields (e.g.\ndropdown options) and other fixed option sets in Albert. A\n[`CustomField`][albert.resources.custom_fields.CustomField] with\n[`LIST`][albert.resources.custom_fields.FieldType.LIST] defines a list (keyed\nby ``list_type``, typically the field's name); its selectable options are\n``ListItem`` records with a matching ``list_type``. Managed through\n[`ListsCollection`][albert.collections.lists.ListsCollection] (``client.lists``).\n\n!!! example\n ```python\n from albert.resources.lists import ListItem, ListItemCategory\n item = ListItem(name=\"In Progress\", category=ListItemCategory.USER_DEFINED)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The display name of the list item (the option value).",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the list item. Set when the item is retrieved from or created in Albert.",
"title": "Albertid"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ListItemCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the list item. Allowed values are ``businessDefined``, ``userDefined``, ``projects``, ``extensions``, and ``inventory``."
},
"listType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The list this item belongs to. For a list-type custom field this is typically the field's name (see [`CustomField`][albert.resources.custom_fields.CustomField]). For built-in categories the allowed values are ``projectState`` for ``projects``, ``extensions`` for ``extensions``, and ``casCategory`` or ``inventoryFunction`` for ``inventory``.",
"title": "Listtype"
}
},
"required": [
"name"
],
"title": "ListItem",
"type": "object"
},
"ListItemCategory": {
"description": "The category a list item belongs to, which governs its allowed list types.\n\nAttributes\n----------\nBUSINESS_DEFINED : str\n Predefined values managed at the business/organization level.\nUSER_DEFINED : str\n Custom values defined by users.\nPROJECTS : str\n Values used by projects (e.g. project states).\nEXTENSIONS : str\n Values used by extensions.\nINVENTORY : str\n Values used by inventory (e.g. CAS categories or inventory functions).",
"enum": [
"businessDefined",
"userDefined",
"projects",
"extensions",
"inventory"
],
"title": "ListItemCategory",
"type": "string"
},
"Location": {
"description": "A physical lab or site location in Albert.\n\nLocations are referenced by Tasks and Inventory Items to record where an\nactivity is performed or where a material lives, and each Location can hold\none or more Storage Locations\n([`StorageLocation`][albert.resources.storage_locations.StorageLocation]). Managed\nthrough [`LocationCollection`][albert.collections.locations.LocationCollection].\n\n!!! example\n ```python\n from albert.resources.locations import Location\n location = Location(\n name=\"Boston Lab\",\n latitude=42.3601,\n longitude=-71.0589,\n address=\"1 Main St\",\n country=\"US\",\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The human-readable name of the location.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the location. Assigned by Albert and populated once the location has been created or retrieved.",
"title": "Albertid"
},
"latitude": {
"description": "The latitude of the location, in decimal degrees.",
"title": "Latitude",
"type": "number"
},
"longitude": {
"description": "The longitude of the location, in decimal degrees.",
"title": "Longitude",
"type": "number"
},
"address": {
"description": "The street address of the location.",
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The two-letter country code of the location (for example, ``\"US\"``).",
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Operator": {
"description": "A comparison operator constraining a numeric parameter value.\n\nUsed by [`ValueValidation`][albert.resources.parameter_groups.ValueValidation] to bound acceptable values. ``between``\ntakes ``min`` and ``max``; every single-bound operator takes ``value`` (e.g. ``gte``\nwith ``value=\"0\"`` requires the value to be at least 0).\n\nAttributes\n----------\nBETWEEN : str\n Value must fall between ``min`` and ``max`` (inclusive).\nLESS_THAN : str\n Value must be less than ``value``.\nLESS_THAN_OR_EQUAL : str\n Value must be less than or equal to ``value``.\nGREATER_THAN_OR_EQUAL : str\n Value must be greater than or equal to ``value``.\nGREATER_THAN : str\n Value must be greater than ``value``.\nEQUALS : str\n Value must equal ``value``.\nNOT_EQUALS : str\n Not accepted by the API for parameter validations.",
"enum": [
"between",
"lt",
"lte",
"gte",
"gt",
"eq",
"neq"
],
"title": "Operator",
"type": "string"
},
"PGType": {
"description": "The kind of task a [`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup] relates to.\n\nA Parameter Group is about making a sample and/or prepping it for measurement,\nand its type records which sort of task it is used in.\n\nAttributes\n----------\nGENERAL : str\n A group used in a general lab task (anything that is not a batch or\n property task).\nBATCH : str\n A group used in a Batch Task ([`BatchTask`][albert.resources.tasks.BatchTask]),\n e.g. a mixing step when manufacturing a batch.\nPROPERTY : str\n A group used in a property (measurement) task to prep a sample for testing.",
"enum": [
"general",
"batch",
"property"
],
"title": "PGType",
"type": "string"
},
"Parameter": {
"description": "The definition of a single experimental condition or input variable.\n\nA Parameter (ID format ``PRM...``) names an \"indirect variable\" such as\nTemperature, Spin Speed, or Instrument. The Parameter itself only defines the\nvariable; its actual value and unit are fixed to a setpoint later, inside a\n[`Workflow`][albert.resources.workflows.Workflow]. Parameters are the building\nblocks of Parameter Groups\n([`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup]) and form the\nparameter side of Data Templates\n([`DataTemplate`][albert.resources.data_templates.DataTemplate]).\n\nManage parameters through\n[`ParameterCollection`][albert.collections.parameters.ParameterCollection]\n(``client.parameters``).\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.parameters import Parameter\n client = Albert()\n param = client.parameters.create(parameter=Parameter(name=\"Temperature\"))\n param.id\n # 'PRM9999999'\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the parameter. Names must be unique.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the parameter (format ``PRM...``). Set when the parameter is retrieved from or created in Albert.",
"title": "Albertid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional user-defined metadata keyed by field name.",
"title": "Metadata"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the parameter is ``Normal`` (scalar value) or ``Special`` (entity reference). Set by the platform and read-only."
},
"rank": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The rank of the returned parameter. Read-only.",
"title": "Rank"
},
"required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this parameter must be filled in within a Parameter Group.",
"title": "Required"
}
},
"required": [
"name"
],
"title": "Parameter",
"type": "object"
},
"ParameterCategory": {
"description": "Whether a [`Parameter`][albert.resources.parameters.Parameter]'s value is a plain scalar or an entity reference.\n\nSet by the platform and read-only. It determines how a parameter's value is\ninterpreted when a setpoint is assigned to it inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nAttributes\n----------\nNORMAL : str\n A \"normal\" parameter whose value is a plain scalar (e.g. a number or text),\n such as Temperature or Spin Speed.\nSPECIAL : str\n A \"special\" parameter whose value references another entity (e.g. Equipment,\n a Consumable, or a Template). The setpoint value is that entity's ID rather\n than a plain scalar.",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
},
"ParameterGroup": {
"description": "A reusable set of parameters (PRG) for making or prepping a sample.\n\nA Parameter Group bundles [`Parameter`][albert.resources.parameters.Parameter]\nentities, along with their values, units, and validation rules, into a reusable\nunit. Whereas a Data Template's parameters relate to a given measurement, a\nParameter Group is about *making* the sample and/or *prepping* it for\nmeasurement (e.g. a mixing step or a cure schedule). Some groups drive Batch\nTasks ([`BatchTask`][albert.resources.tasks.BatchTask]); others are stacked within a\ntask. A group's parameters, together with a Data Template's parameters, are\nfixed to setpoints inside a [`Workflow`][albert.resources.workflows.Workflow].\n\nOnce saved, a group is referenced by its Parameter Group ID (format ``PRG...``,\ne.g. ``\"PRG9999999\"``). Store test standards (e.g. ASTM or ISO) under the\n``\"Standards\"`` key of ``metadata``.\n\nGroups are managed through\n[`ParameterGroupCollection`][albert.collections.parameter_groups.ParameterGroupCollection]\n(``client.parameter_groups``).\n\n!!! example\n ```python\n from albert.resources.parameter_groups import (\n ParameterGroup,\n ParameterValue,\n PGType,\n )\n\n pg = ParameterGroup(\n name=\"Mixing Step\",\n type=PGType.BATCH,\n parameters=[ParameterValue(id=\"PRM9999999\", value=\"500\")],\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"Tags": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/Tag"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "A list of Tag objects or strings representing tags.",
"title": "Tags"
},
"name": {
"description": "The name of the parameter group. Required.",
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/PGType"
},
{
"type": "null"
}
],
"default": null,
"description": "The kind of task the group relates to (``general``, ``batch``, or ``property``)."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert Parameter Group ID (format ``PRG...``). Set when the group is retrieved from or created in Albert. Serialized as ``albertId``.",
"title": "Albertid"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A free-text description of the group.",
"title": "Description"
},
"class": {
"$ref": "#/$defs/SecurityClass",
"default": "restricted",
"description": "The access/security class of the group. Defaults to ``RESTRICTED``. Serialized as ``class``."
},
"ACL": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/User"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Access-control entries governing who can act on the group. Serialized as ``ACL``.",
"title": "Acl"
},
"Metadata": {
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"description": "Custom metadata fields. Test standards are stored under the ``\"Standards\"`` key. Serialized as ``Metadata``.",
"title": "Metadata",
"type": "object"
},
"Parameters": {
"description": "The parameters in the group, each with its value, unit, and validation. See [`ParameterValue`][albert.resources.parameter_groups.ParameterValue]. Serialized as ``Parameters``.",
"items": {
"$ref": "#/$defs/ParameterValue"
},
"title": "Parameters",
"type": "array"
},
"verified": {
"default": false,
"description": "Whether the group has been verified (an approval/governance state). Read-only.",
"title": "Verified",
"type": "boolean"
},
"Documents": {
"description": "Documents (e.g. SOPs) associated with the group. Read-only. Deserialized from ``Documents``.",
"items": {
"$ref": "#/$defs/EntityLink"
},
"title": "Documents",
"type": "array"
}
},
"required": [
"name"
],
"title": "ParameterGroup",
"type": "object"
},
"ParameterGroupSetpoints": {
"description": "All parameter setpoints belonging to one Data Template or Parameter Group.\n\nA workflow is organized by group: each [`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints] names one\nData Template or Parameter Group (by ``id`` or by a full ``parameter_group`` object)\nand carries the [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint] list for the parameters in it. A\n[`Workflow`][albert.resources.workflows.Workflow] holds one of these per group. Both the order of setpoints within a\ngroup and the order of groups within the workflow are part of what makes a workflow\nunique, so preserve the order you intend. Group ``sequence`` is read-only; list order\nalone defines group ordering when creating workflows. Setpoint ``sequence`` is also\nread-only (see [`ParameterSetpoint`][albert.resources.workflows.ParameterSetpoint]).\n\n!!! example\n ```python\n from albert.resources.workflows import (\n ParameterGroupSetpoints,\n ParameterSetpoint,\n )\n\n group = ParameterGroupSetpoints(\n id=\"PRG9999999\",\n parameter_setpoints=[\n ParameterSetpoint(parameter_id=\"PRM9999999\", value=\"25\"),\n ],\n )\n ```",
"properties": {
"parameter_group": {
"anyOf": [
{
"$ref": "#/$defs/ParameterGroup"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group to set setpoints on. Provide either ``parameter_group`` or ``id``. If both are given they must refer to the same group."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the parameter group (``PRG...``) or Data Template (``DAT...``). Provide either ``id`` or ``parameter_group``. Auto-filled from ``parameter_group`` when one is provided.",
"title": "Id"
},
"name": {
"default": "Pre-linked Parameters",
"description": "Read-only display name of the group (defaults to ``\"Pre-linked Parameters\"``).",
"title": "Name",
"type": "string"
},
"Parameters": {
"description": "The setpoints to apply to this group's parameters.",
"items": {
"$ref": "#/$defs/ParameterSetpoint"
},
"title": "Parameters",
"type": "array"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. The group's interval row ID.",
"title": "Rowid"
},
"prgSequence": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. Order of this group within the workflow. Assigned from list order when creating workflows; do not set.",
"title": "Prgsequence"
}
},
"title": "ParameterGroupSetpoints",
"type": "object"
},
"ParameterSetpoint": {
"description": "The fixed value (or set of interval values) for one parameter within a workflow.\n\nA setpoint pins a single parameter to a condition. Provide either a single ``value``\n(plus ``unit`` where applicable) for a fixed setpoint, or a list of ``intervals`` to\nintervalize the parameter across several values. You must identify the parameter by\npassing either a full ``parameter`` object or its ``parameter_id``. Setpoints are\ngrouped under a [`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints], which is in turn placed on a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nNormal parameters take exactly one of ``value`` or ``intervals``. Special parameters\n(Equipment, Consumables, Templates) take an entity ID as their value.\n\n``sequence`` is read-only: do not set it when building a workflow for\n[`create`][albert.collections.workflows.WorkflowCollection.create]. Provide the parent\ngroup's ``id`` (``PRG...`` or ``DAT...``) on\n[`ParameterGroupSetpoints`][albert.resources.workflows.ParameterGroupSetpoints]; the SDK\nresolves each setpoint's row id from that group before create.\n\n!!! example\n ```python\n from albert.resources.parameters import ParameterCategory\n from albert.resources.workflows import ParameterSetpoint, Interval\n\n # A single fixed setpoint identified by parameter ID.\n temp = ParameterSetpoint(parameter_id=\"PRM9999999\", value=\"25\")\n\n # The same parameter intervalized across two values.\n temp_varied = ParameterSetpoint(\n parameter_id=\"PRM9999999\",\n intervals=[\n Interval(value=\"25\", unit={\"id\": \"UNI9999999\"}),\n Interval(value=\"60\", unit={\"id\": \"UNI9999999\"}),\n ],\n )\n\n # A Special parameter (an inventory item) takes the item's id as its value;\n # short_name is only sent for Special parameters.\n equipment = ParameterSetpoint(\n parameter_id=\"PRM3\",\n category=ParameterCategory.SPECIAL,\n value={\"id\": \"INV9999999\"},\n short_name=\"Oven\",\n )\n ```",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter to set. Provide either ``parameter`` or ``parameter_id``. If both are given they must refer to the same parameter."
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of the setpoint. For a Special parameter (an inventory item), provide the item's [`EntityLink`][albert.core.shared.models.base.EntityLink] (or a mapping with an ``id``). Mutually exclusive with ``intervals`` for Normal parameters.",
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of ``value``, where applicable.",
"title": "Unit"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the parameter (e.g. ``\"PRM9999999\"``). Provide either ``parameter`` or ``parameter_id``.",
"title": "Id"
},
"Intervals": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Interval"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The interval values when the parameter is intervalized. Provide either ``intervals`` or ``value`` (plus ``unit``), not both.",
"title": "Intervals"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the parameter: ``SPECIAL`` for an inventory item (Equipment, Consumable, Template), ``NORMAL`` for everything else."
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The short / display name of the parameter. Only sent on create for ``SPECIAL``-category parameters; the platform rejects ``shortName`` on Normal parameters, so the SDK drops it there.",
"title": "Shortname"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter name. Auto-filled from ``parameter`` when one is provided.",
"title": "Name"
},
"rowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. The row ID of this parameter with respect to its interval row.",
"title": "Rowid"
},
"prgPrmRowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only. Maps this setpoint to its row in the parent Data Template or Parameter Group. Populated by the SDK during [`create`][albert.collections.workflows.WorkflowCollection.create]; do not set when building workflows.",
"title": "Prgprmrowid"
}
},
"title": "ParameterSetpoint",
"type": "object"
},
"ParameterValue": {
"description": "A single [`Parameter`][albert.resources.parameters.Parameter] and its value within a [`ParameterGroup`][albert.resources.parameter_groups.ParameterGroup].\n\nA ``ParameterValue`` binds one Parameter to the value, unit, and validation\nrules it takes inside a group. Each entry must reference an existing Parameter,\nso provide exactly one of ``id`` (the Parameter's Albert ID) or ``parameter``\n(the [`Parameter`][albert.resources.parameters.Parameter] object itself); when a\n``parameter`` is given, the ``id``, ``category``, and ``name`` are populated\nfrom it. Values are later fixed to setpoints inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\n!!! example\n ```python\n from albert.resources.parameter_groups import ParameterValue\n\n # Reference the parameter by its Albert ID\n value = ParameterValue(id=\"PRM9999999\", value=\"500\")\n ```",
"properties": {
"parameter": {
"anyOf": [
{
"$ref": "#/$defs/Parameter"
},
{
"type": "null"
}
],
"default": null,
"description": "The Parameter this value is associated with. Provide either ``id`` or ``parameter``. Excluded from serialization."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the associated Parameter. Provide either ``id`` or ``parameter``.",
"title": "Id"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the parameter (``Normal`` or ``Special``). Populated from ``parameter`` when one is provided. When only ``id`` is given, the parameter-group create API rejects the payload (``400 \"Category mismatch ... Category undefined expected\"``), so set ``category`` explicitly (``ParameterCategory.NORMAL`` for ordinary parameters) or pass the full ``parameter`` object."
},
"specialType": {
"anyOf": [
{
"$ref": "#/$defs/SpecialParameterType"
},
{
"type": "null"
}
],
"default": null,
"description": "The specific entity type for a ``Special`` parameter. ``None`` for ``Normal`` parameters. The platform does not validate this field on create the way it validates ``category``, so omitting it does not cause a 400."
},
"shortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A short name for the parameter value. Serialized as ``shortName``.",
"title": "Shortname"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/InventoryItem"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"$ref": "#/$defs/User"
},
{
"type": "null"
}
],
"default": null,
"description": "The value of the parameter. Can be a plain string, an [`InventoryItem`][albert.resources.inventory.InventoryItem] (e.g. when the parameter represents an instrument choice), or a [`User`][albert.resources.users.User] (e.g. a user reference such as \"Performed By\").",
"title": "Value"
},
"Unit": {
"anyOf": [
{
"$ref": "#/$defs/Unit"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit of measure for the value. Serialized as ``Unit``.",
"title": "Unit"
},
"Added": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"required": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this parameter is required. Defaults to False.",
"title": "Required"
},
"validation": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ValueValidation"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Validation rules applied to the value. See [`ValueValidation`][albert.resources.parameter_groups.ValueValidation].",
"title": "Validation"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the parameter. Read-only.",
"title": "Name"
},
"sequence": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The sequence of the parameter within the group. Read-only.",
"title": "Sequence"
},
"originalShortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalshortname"
},
"originalName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Originalname"
}
},
"title": "ParameterValue",
"type": "object"
},
"Role": {
"description": "A named set of access permissions within a tenant.\n\nA role bundles policies that determine what a holder is allowed to do. Roles\nare assigned to users ([`User`][albert.resources.users.User]) and referenced\nby entity ACLs. Roles are typically read from Albert rather than built by\nhand.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the role. Role IDs may contain ``#`` characters. Set once the role is retrieved from Albert.",
"title": "Albertid"
},
"name": {
"description": "The display name of the role.",
"title": "Name",
"type": "string"
},
"Policies": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The policies (permission rules) associated with the role.",
"title": "Policies"
},
"tenant": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the tenant the role belongs to. Omitted on role-only (id-filtered) responses.",
"title": "Tenant"
},
"visibility": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the role is visible in the platform's role listings.",
"title": "Visibility"
}
},
"required": [
"name"
],
"title": "Role",
"type": "object"
},
"SecurityClass": {
"description": "The security (access control) class of a resource.\n\nAttributes\n----------\nSHARED : str\n Accessible to all members of the tenant.\nRESTRICTED : str\n Access is restricted to specific teams or users.\nCONFIDENTIAL : str\n Access is limited to designated users only.\nPRIVATE : str\n Visible only to the owner. Used by Projects.\nPUBLIC : str\n Accessible publicly. Returned by Parameter Groups.",
"enum": [
"shared",
"restricted",
"confidential",
"private",
"public"
],
"title": "SecurityClass",
"type": "string"
},
"SpecialParameterType": {
"description": "The specific entity type referenced by a Special\n[`Parameter`][albert.resources.parameters.Parameter].\n\nNot returned by the platform parameter API (use Zeus reports RET48/RET52 to\nread the subtype from experiment data). Writable on\n[`ParameterValue`][albert.resources.parameter_groups.ParameterValue] and\n[`TargetParameter`][albert.resources.targets.TargetParameter].\n\nEach member implies an id-namespace for the value column in experiment reports\n(RET48/RET52): ``RAW_MATERIALS`` values carry ``INVA...`` ids, ``CONSUMABLES``\ncarry ``INVB...`` ids, ``EQUIPMENT`` carry ``INVC...`` ids, and ``FORMULAS``\ncarry ``INVMO...`` ids.\n\nMirrors [`InventoryCategory`][albert.resources.inventory.InventoryCategory],\nthe canonical \"kind of material\" an\n[`InventoryItem`][albert.resources.inventory.InventoryItem] belongs to. A\nSpecial parameter's value is always a reference to an `InventoryItem`, so its\nsubtype is one of that enum's members.\n\nAttributes\n----------\nRAW_MATERIALS : str\n A raw material entity. Values appear as ``INVA...`` ids in report columns.\nCONSUMABLES : str\n A consumable entity. Values appear as ``INVB...`` ids in report columns.\nEQUIPMENT : str\n An equipment entity. Values appear as ``INVC...`` ids in report columns.\nFORMULAS : str\n A formula entity (a mixture designed through a Worksheet). Values appear\n as ``INVMO...`` ids in report columns.",
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "SpecialParameterType",
"type": "string"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"Tag": {
"description": "A freeform text label used to categorize and connect entities.\n\nTags are shared by name across the platform and can be applied to inventory\nitems, companies, tasks, and other records to group and filter them. Managed\nthrough [`TagCollection`][albert.collections.tags.TagCollection] (``client.tags``);\nthe usual entry point is [`get_or_create`][albert.collections.tags.TagCollection.get_or_create].\n\n!!! example\n ```python\n from albert.resources.tags import Tag\n tag = Tag(tag=\"high-priority\")\n ```\nMethods\n-------\nfrom_string(tag) -> Tag\n Build a Tag from its name string.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The name of the tag (its text label).",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the tag (format ``TAG...``). Set when the tag is retrieved from or created in Albert. Methods ------- from_string(tag) -> Tag Build a Tag from its name string.",
"title": "Albertid"
}
},
"required": [
"name"
],
"title": "Tag",
"type": "object"
},
"Unit": {
"description": "A unit of measure (e.g. ``g``, ``mL``, ``\u00b0C``).\n\nUnits qualify quantities throughout the platform: inventory amounts,\nparameter values, and property results. Managed through\n[`UnitCollection`][albert.collections.units.UnitCollection] (``client.units``).\n\n!!! example\n ```python\n from albert.resources.units import Unit, UnitCategory\n unit = Unit(name=\"milliliter\", symbol=\"mL\", category=UnitCategory.LIQUID_VOLUME)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the unit (format ``UNI...``). Set when the unit is retrieved from or created in Albert.",
"title": "Albertid"
},
"name": {
"description": "Currently this is the only field that is displayed in Albert, so use this for display purposes. Therefore, users often use the symbol for the unit here as that's the preferred display.",
"title": "Name",
"type": "string"
},
"symbol": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display symbol for the unit (e.g. ``\"g\"``).",
"title": "Symbol"
},
"Synonyms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Alternate names or spellings that also refer to this unit.",
"title": "Synonyms"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/UnitCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The physical quantity the unit measures (e.g. ``Mass``, ``Volume``)."
},
"verified": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"description": "Whether the unit has been verified in Albert. Read-only.",
"title": "Verified"
}
},
"required": [
"name"
],
"title": "Unit",
"type": "object"
},
"UnitCategory": {
"description": "The physical quantity a unit measures.\n\nAttributes\n----------\nLENGTH : str\n Length units (e.g. m, cm).\nVOLUME : str\n Volume units (e.g. m\u00b3).\nLIQUID_VOLUME : str\n Liquid volume units (e.g. L, mL).\nANGLES : str\n Angle units (e.g. degrees, radians).\nTIME : str\n Time units (e.g. s, h).\nFREQUENCY : str\n Frequency units (e.g. Hz).\nMASS : str\n Mass units (e.g. g, kg).\nCURRENT : str\n Electric current units (e.g. A).\nTEMPERATURE : str\n Temperature units (e.g. \u00b0C, K).\nAMOUNT : str\n Amount of substance units (e.g. mol).\nLUMINOSITY : str\n Luminous intensity units (e.g. cd).\nFORCE : str\n Force units (e.g. N).\nENERGY : str\n Energy units (e.g. J).\nPOWER : str\n Power units (e.g. W).\nPRESSURE : str\n Pressure units (e.g. Pa, bar).\nELECTRICITY_AND_MAGNETISM : str\n Electricity and magnetism units.\nOTHER : str\n Units that do not fit another category.\nWEIGHT : str\n Weight units.\nAREA : str\n Area units (e.g. m\u00b2).\nSURFACE_AREA : str\n Surface area units.\nBINARY : str\n Binary/digital-information units (e.g. bytes).\nCAPACITANCE : str\n Capacitance units (e.g. F).\nSPEED : str\n Speed units (e.g. m/s).\nELECTRICAL_CONDUCTIVITY : str\n Electrical conductivity units.\nELECTRICAL_PERMITTIVITY : str\n Electrical permittivity units.\nDENSITY : str\n Density units (e.g. g/mL).\nRESISTANCE : str\n Electrical resistance units (e.g. \u03a9).",
"enum": [
"Length",
"Volume",
"Liquid volume",
"Angles",
"Time",
"Frequency",
"Mass",
"Electric current",
"Temperature",
"Amount of substance",
"Luminous intensity",
"Force",
"Energy",
"Power",
"Pressure",
"Electricity and magnetism",
"Other",
"Weight",
"Area",
"Surface Area",
"Binary",
"Capacitance",
"Speed",
"Electrical conductivity",
"Electrical permitivitty",
"Density",
"Resistance"
],
"title": "UnitCategory",
"type": "string"
},
"User": {
"description": "An Albert user account: a person who can log in and act in the platform.\n\nA user has a name and email, an optional home\n[`Location`][albert.resources.locations.Location], and a set of\n[`Role`][albert.resources.roles.Role] objects that govern what they can do.\nThe ``user_class`` sets a broad permission tier\n([`UserClass`][albert.resources.users.UserClass]). Users are grouped into teams\n([`Team`][albert.resources.teams.Team]), and are referenced across the\nplatform, for example as the assignee of a Task or in an entity's ACL.\n\n!!! example\n ```python\n from albert.resources.users import User, UserClass\n user = User(\n name=\"Ada Lovelace\",\n email=\"ada@example.com\",\n user_class=UserClass.STANDARD,\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The display name of the user.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert User ID (format ``USR...``). Set once the user is registered in or retrieved from Albert.",
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"description": "The user's home location.",
"title": "Location"
},
"email": {
"default": null,
"description": "The user's email address.",
"format": "email",
"title": "Email",
"type": "string"
},
"Roles": {
"description": "The roles the user holds, which determine their permissions.",
"items": {
"anyOf": [
{
"$ref": "#/$defs/Role"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"maxItems": 1,
"title": "Roles",
"type": "array"
},
"userClass": {
"$ref": "#/$defs/UserClass",
"default": "standard",
"description": "The ACL class level of the user (broad permission tier)."
},
"witnesser": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the user can act as a witness on tasks (only relevant when witnessing is enabled for the tenant).",
"title": "Witnesser"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EntityLinkWithName"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom metadata attached to the user.",
"title": "Metadata"
}
},
"required": [
"name"
],
"title": "User",
"type": "object"
},
"UserClass": {
"description": "The ACL class level of a user, setting a broad permission tier.\n\nAttributes\n----------\nGUEST : str\n Most limited access; typically external or temporary users.\nSTANDARD : str\n Default access level for regular users.\nTRUSTED : str\n Elevated access above standard users.\nPRIVILEGED : str\n High access level below full administrators.\nADMIN : str\n Full administrative access to the tenant.",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
},
"ValueValidation": {
"description": "A validation rule constraining a [`ParameterValue`][albert.resources.parameter_groups.ParameterValue].\n\nDeclares the expected [`DataType`][albert.resources.parameter_groups.DataType] for a parameter value and, optionally,\nthe bounds or allowed options it must satisfy. Attach one or more of these to a\n[`ParameterValue`][albert.resources.parameter_groups.ParameterValue] via its ``validation`` field.\n\nWhen ``datatype`` is ``date`` or ``timestamp``, ``value``, ``min``, and ``max`` are\nstrings in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].\n\n!!! example\n ```python\n from albert.resources.parameter_groups import (\n DataType,\n Operator,\n ValueValidation,\n )\n\n rule = ValueValidation(\n datatype=DataType.NUMBER,\n operator=Operator.BETWEEN,\n min=\"0\",\n max=\"100\",\n )\n ```",
"properties": {
"datatype": {
"$ref": "#/$defs/DataType",
"description": "The data type the value must conform to. Required."
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"$ref": "#/$defs/EnumValidationValue"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "For ``ENUM`` types, the list of allowed options (see [`EnumValidationValue`][albert.resources.parameter_groups.EnumValidationValue]); otherwise the bound for single-bound operators (``lt``, ``lte``, ``gt``, ``gte``, ``eq``). For ``date`` and ``timestamp`` types, a string in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].",
"title": "Value"
},
"min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The lower bound, used only with ``operator=\"between\"``. For numeric types, a numeric string; for ``date`` and ``timestamp`` types, a string in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The upper bound, used only with ``operator=\"between\"``. For numeric types, a numeric string; for ``date`` and ``timestamp`` types, a string in the wire format documented on [`DataType`][albert.resources.parameter_groups.DataType].",
"title": "Max"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/Operator"
},
{
"type": "null"
}
],
"default": null,
"description": "The comparison operator: ``between`` uses ``min`` and ``max``; the others use ``value``."
}
},
"required": [
"datatype"
],
"title": "ValueValidation",
"type": "object"
}
},
"description": "A specific set of parameter setpoints: the independent variables of a test.\n\nA workflow (WFL) captures only the *independent variables* of a test, the parameters and\nthe setpoints (a value, plus a unit where applicable) they are fixed to. It is built from\none or more groupings of parameters, where each grouping is either a Data Template that\nhas pre-linked parameters or a Parameter Group. A single workflow can combine several\ngroupings, for example one Data Template's pre-linked parameters together with a couple of\nParameter Groups, each contributing its own parameter setpoints. Because a Data Template\ncan carry pre-linked parameters, it is used here exactly like a Parameter Group: purely to\ndescribe a set of parameters and their setpoints.\n\nA workflow does NOT include a Data Template's Data Columns (also called Results). Those are\nthe *dependent variables*, and they are recorded only in Property Data\n([`TaskPropertyData`][albert.resources.property_data.TaskPropertyData]). In short: the Workflow holds\nthe independent variables; Property Data holds the dependent variables (the measured\nresults).\n\nA workflow is uniquely identified by its full setpoint configuration: the value and\nunit of every setpoint, the order of parameters within each Data Template / Parameter\nGroup, and the order of those groups within the workflow. For this reason workflows are\n*found-or-created* rather than blindly created: build the object you want and pass it to\n[`create`][albert.collections.workflows.WorkflowCollection.create], which returns the\nexisting match or makes a new one. IDs look like ``WFL...``.\n\nEvery tenant includes a built-in workflow ``WFL1`` (\"No Parameter Group\") with no\nparameter groups or setpoints. Use it when a task or block does not involve parameter\ngroups; it does not need to be created via\n[`create`][albert.collections.workflows.WorkflowCollection.create].\n\nWhen parameters are intervalized, the workflow acts as a *parent* that carries\nthe resulting [`IntervalCombination`][albert.resources.workflows.IntervalCombination] entries. Each combination has an interval ID of\nthe form ``ROW1`` (one intervalized parameter) or ``ROW1XROW2X...`` (product of several). Use\n[`get_interval_id`][albert.resources.workflows.Workflow.get_interval_id] to build the interval ID for a condition, then use it with the\nproperty_data endpoints to read or write that condition's results.\n\nTo construct rules and combination overrides for Property tasks using parameter names\nand values, use [`build_rule`][albert.resources.workflows.Workflow.build_rule] and\n[`build_override`][albert.resources.workflows.Workflow.build_override].\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.workflows import (\n Workflow,\n ParameterGroupSetpoints,\n ParameterSetpoint,\n )\n\n client = Albert()\n # One workflow combining a Data Template's pre-linked parameters with two\n # Parameter Groups. Each grouping is keyed by its DAT... or PRG... id.\n workflow = Workflow(\n parameter_group_setpoints=[\n # Pre-linked parameters on a Data Template (used just like a PRG here)\n ParameterGroupSetpoints(\n id=\"DAT9999999\",\n parameter_setpoints=[\n ParameterSetpoint(parameter_id=\"PRM9999999\", value=\"23\"),\n ParameterSetpoint(parameter_id=\"PRM2\", value=\"50\"),\n ],\n ),\n # A Parameter Group describing sample prep\n ParameterGroupSetpoints(\n id=\"PRG9999999\",\n parameter_setpoints=[\n ParameterSetpoint(parameter_id=\"PRM3\", value=\"24\"),\n ],\n ),\n # A second Parameter Group (e.g. the mixing step)\n ParameterGroupSetpoints(\n id=\"PRG2\",\n parameter_setpoints=[\n ParameterSetpoint(parameter_id=\"PRM4\", value=\"2000\"),\n ],\n ),\n ],\n )\n created = client.workflows.create(workflows=[workflow])\n created[0].id\n # 'WFL1'\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the workflow. Can be omitted on platform built-in workflows without parameter groups (such as `WFL1`).",
"title": "Name"
},
"ParameterGroups": {
"description": "The setpoints to apply, organized one entry per Data Template / Parameter Group. The order of these entries is part of the workflow's identity.",
"items": {
"$ref": "#/$defs/ParameterGroupSetpoints"
},
"title": "Parametergroups",
"type": "array"
},
"IntervalCombinations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/IntervalCombination"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "The realized conditions when parameters are intervalized. Populated by the platform; present when the workflow is retrieved, not something you set when building one.",
"title": "Intervalcombinations"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the workflow (``WFL...``). Set when a workflow is created or retrieved from the platform.",
"title": "Albertid"
},
"blockMapping": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Caller-supplied correlation key on workflow bulk create, used to tie each created workflow to a block position (e.g. ``\"0\"``, ``\"1\"``). Also hydrated on read when a Workflow is returned in the context of a block.",
"title": "Blockmapping"
},
"combinationsCount": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Number of child-workflow combinations on this workflow when it is a block's FINAL workflow. Always present (including ``0``) on flag-ON reads. The embedded ``combinations`` array is empty at 500 or more; use [`get_block_combinations`][albert.collections.tasks.TaskCollection.get_block_combinations] to list them.",
"title": "Combinationscount"
},
"Combinations": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/IntervalCombinationItem"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Child-workflow combinations embedded on a block's FINAL workflow. Read-only; excluded from serialization. Empty at 500 or more combinations.",
"title": "Combinations"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"title": "Workflow",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
name(str | None) -
parameter_group_setpoints(list[ParameterGroupSetpoints]) -
interval_combinations(list[IntervalCombination] | None) -
id(str | None) -
block_mapping(str | None) -
combinations_count(int | None) -
combinations(list[IntervalCombinationItem] | None) -
category(str | None)
name
name: str | None = None
The name of the workflow. Can be omitted on platform built-in workflows without parameter groups (such as WFL1).
parameter_group_setpoints
parameter_group_setpoints: list[ParameterGroupSetpoints]
The setpoints to apply, organized one entry per Data Template / Parameter Group. The order of these entries is part of the workflow's identity.
interval_combinations
interval_combinations: list[IntervalCombination] | None = (
None
)
The realized conditions when parameters are intervalized. Populated by the platform; present when the workflow is retrieved, not something you set when building one.
id
id: str | None = None
The Albert ID of the workflow (WFL...). Set when a workflow is created or retrieved from the platform.
block_mapping
block_mapping: str | None = None
Caller-supplied correlation key on workflow bulk create, used to tie each created workflow to a block position (e.g. "0", "1"). Also hydrated on read when a Workflow is returned in the context of a block.
combinations_count
combinations_count: int | None = None
Number of child-workflow combinations on this workflow when it is a block's FINAL workflow. Always present (including 0) on flag-ON reads. The embedded combinations array is empty at 500 or more; use get_block_combinations to list them.
combinations
combinations: list[IntervalCombinationItem] | None = None
Child-workflow combinations embedded on a block's FINAL workflow. Read-only; excluded from serialization. Empty at 500 or more combinations.
model_post_init
get_interval_id
Build the composite interval ID for a set of parameter values.
Matches each given parameter name and value against the workflow's intervalized
parameters and assembles the corresponding interval ID. This is the ID you pass to
the property_data endpoints to read or write results for that specific condition.
For a single intervalized parameter the result is one row ID (ROW1); for two,
the row IDs are joined with X (ROW1XROW2). Matching on value is
case-insensitive to type: 25 and "25" both match an interval value of
"25".
Example
# Single intervalized parameter
workflow.get_interval_id({"Temperature": 25})
# 'ROW1'
# Two intervalized parameters (cartesian product)
workflow.get_interval_id({"Temperature": 25, "Time": 60})
# 'ROW1XROW2'
# A value that matches no interval raises AlbertException
workflow.get_interval_id({"Temperature": 999})
# AlbertException: No matching interval found for parameter 'Temperature' ...
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_values
|
dict[str, Any]
|
Mapping of parameter names to their values. Values may be numbers or strings and must match interval values defined on the workflow. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The composite interval ID. A single interval ID for one parameter, or several
joined with |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If any parameter value does not match a defined interval in the workflow. |
See Also
IntervalCombination : The conditions whose interval IDs this method reproduces.
Source code in src/albert/resources/workflows.py
get_override_key
Build the compound override key for a set of parameter values (🧪 Beta).
Matches each given parameter name and value against the workflow's intervalized
parameters and assembles the compound key in the format
"{groupId}#{paramId}#{intervalRowId}-...".
This key uniquely identifies an individual combination variant in the Cartesian product
space. It is used with CombinationOverride
to skip or unskip specific combinations on a block when calling
set_block_rules or
creating a task via create_with_combinations.
Because overrides always take precedence over rules, this enables targeting individual
variants regardless of general rule evaluation.
The workflow instance must already be saved on the platform so that interval row IDs
are assigned. You can obtain a saved workflow from
client.workflows.get_by_id
or from a fetched task block's workflow.
Matching on value is case-insensitive to type: 25 and "25" both match an
interval value of "25". Matching on parameter name checks both the parameter's
name and short name (case-insensitive). Segments are ordered in the canonical
order that the parameters appear in the workflow.
Beta Feature!
Increased intervals combination support is currently in beta and behind a platform feature flag. Please do not use in production or without explicit guidance from Albert. You might otherwise have a bad experience. This feature currently falls outside of the Albert support contract, but we'd love your feedback!
Example
from albert import Albert
from albert.resources.interval_combinations import CombinationOverride, OverrideAction
client = Albert()
workflow = client.workflows.get_by_id(id="WFL456")
key = workflow.get_override_key(parameter_values={"Temperature": 25, "Speed": 500})
# 'PRG247776#PRM100#ROW4-PRG247776#PRM200#ROW9'
# Create an override to skip this specific combination:
override = CombinationOverride(key=key, action=OverrideAction.SKIP)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_values
|
dict[str, Any]
|
Mapping of parameter names (or short names) to their target interval values. Values may be numbers or strings and must match interval setpoint values defined on the workflow. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The compound override key (e.g. |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If any parameter value does not match a defined interval in the workflow, or if the workflow has not yet been assigned row IDs by the platform. |
Source code in src/albert/resources/workflows.py
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 | |
build_rule_condition
build_rule_condition(
*,
parameter: str,
operator: RuleOperator | str,
value: str | float | int | None = None,
unit: str | Unit | None = None,
group: str | None = None,
) -> RuleCondition
Build a rule condition from a parameter name, short name, or ID and value (🧪 Beta).
Resolves the parameter's group ID, parameter ID, row ID, and unit ID from this workflow's defined setpoints, avoiding the need to manually lookup internal IDs.
Beta Feature!
Increased intervals combination support is currently in beta and behind a platform feature flag. Please do not use in production or without explicit guidance from Albert. You might otherwise have a bad experience. This feature currently falls outside of the Albert support contract, but we'd love your feedback!
Example
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter
|
str
|
The name, short name, or parameter ID (case-insensitive) of the parameter. |
required |
operator
|
RuleOperator or str
|
The comparison operator. Accepts |
required |
value
|
(str, float, int)
|
The threshold value to compare against. |
None
|
unit
|
(str, Unit)
|
Optional unit constraint (unit name, symbol, ID, or Unit model). If omitted and the parameter defines a unit, that unit ID is used automatically. |
None
|
group
|
str
|
Parameter group ID (e.g. |
None
|
Returns:
| Type | Description |
|---|---|
RuleCondition
|
The fully populated rule condition. |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If no parameter matches, if multiple parameters match and |
ValueError
|
If an invalid operator string is provided. |
Source code in src/albert/resources/workflows.py
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 | |
build_rule
build_rule(
*,
name: str | None = None,
conditions: Sequence[
RuleCondition | Condition | tuple[Any, ...]
]
| None = None,
parameter: str | None = None,
operator: RuleOperator | str | None = None,
value: str | float | int | None = None,
unit: str | Unit | None = None,
group: str | None = None,
) -> ExclusionRule
Build a rule from conditions or parameter criteria (🧪 Beta).
Convenience builder that constructs a named ExclusionRule
using human-readable parameter names and values rather than internal IDs.
Supports single-condition rules directly via keyword arguments, or compound
rules with multiple conditions.
How Rules Function:
- Conditions: A condition compares a parameter against a threshold using an
operator (
=,!=,>,>=,<,<=). - AND logic within a rule: All conditions specified inside this rule must match for the rule to trigger.
- OR logic across rules: On a task block, if any rule triggers, its outcome applies.
- Starting Baseline (
intervals_start_from): - In Exclude Mode (
"all", default): The rule acts as an exclusion rule. Any combination satisfying all conditions is pruned/excluded from the task block. - In Include Mode (
"none"): The rule acts as an inclusion rule. Combinations satisfying all conditions are kept/included in the task block.
Beta Feature!
Increased intervals combination support is currently in beta and behind a platform feature flag. Please do not use in production or without explicit guidance from Albert. You might otherwise have a bad experience. This feature currently falls outside of the Albert support contract, but we'd love your feedback!
Example
from albert import Albert
client = Albert()
workflow = client.workflows.get_by_id(id="WFL456")
# 1. Single condition rule:
rule1 = workflow.build_rule(
name="Exclude cold temperatures",
conditions=[("Temperature", "<", 15)],
)
# 2. Multi-condition rule (AND logic):
rule2 = workflow.build_rule(
name="Crosslinking risk",
conditions=[
("Temperature", ">=", 90),
("Speed", ">=", 1500),
],
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
A descriptive label for the rule. |
None
|
conditions
|
Sequence[RuleCondition, Condition, or tuple]
|
A sequence of |
None
|
parameter
|
str
|
Parameter name, short name, or ID for a single-condition rule. |
None
|
operator
|
RuleOperator or str
|
Comparison operator for a single-condition rule. |
None
|
value
|
(str, float, int)
|
Threshold value for a single-condition rule. |
None
|
unit
|
(str, Unit)
|
Optional unit for a single-condition rule. |
None
|
group
|
str
|
Optional parameter group ID or name for disambiguation. |
None
|
Returns:
| Type | Description |
|---|---|
ExclusionRule
|
The constructed rule containing the resolved conditions. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If neither |
AlbertException
|
If any parameter cannot be resolved on the workflow. |
Source code in src/albert/resources/workflows.py
861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 | |
build_override
build_override(
*,
parameter_values: dict[str, Any],
action: OverrideAction | str = SKIP,
is_manual: bool | None = None,
) -> CombinationOverride
Build a combination override from parameter values (🧪 Beta).
Constructs a CombinationOverride
targeting a single specific combination variant by its exact parameter values,
resolving the compound key automatically via
get_override_key.
How Overrides Function:
- Targeted Combinations: Overrides target a single, specific combination in the Cartesian product space (e.g. Temperature = 25 and Speed = 500).
- Actions:
action="skip": Explicitly excludes the combination from the task.action="unskip": Explicitly keeps or forces the inclusion of the combination.- Override Precedence: Overrides are evaluated first and always take precedence over
rules. For example, an
"unskip"override guarantees a combination is retained even if an exclusion rule would otherwise drop it. - Manual Cherry-Picking (
is_manual=True): In Include Mode (intervals_start_from="none"), settingis_manual=Truedesignates a manually cherry-picked combination from an otherwise empty baseline.
Beta Feature!
Increased intervals combination support is currently in beta and behind a platform feature flag. Please do not use in production or without explicit guidance from Albert. You might otherwise have a bad experience. This feature currently falls outside of the Albert support contract, but we'd love your feedback!
Example
from albert import Albert
client = Albert()
workflow = client.workflows.get_by_id(id="WFL456")
# Skip a specific combination:
skip = workflow.build_override(
parameter_values={"Temperature": 25, "Speed": 500},
action="skip",
)
# Force-include a combination (in Include Mode):
unskip = workflow.build_override(
parameter_values={"Temperature": 25, "Speed": 500},
action="unskip",
is_manual=True,
)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter_values
|
dict[str, Any]
|
Mapping of parameter names (or short names) to their target interval values. |
required |
action
|
OverrideAction or str
|
The action to apply ( |
OverrideAction.SKIP
|
is_manual
|
bool
|
Whether the override was manually added (used in Include Mode). |
None
|
Returns:
| Type | Description |
|---|---|
CombinationOverride
|
The constructed combination override with the resolved compound key. |
Raises:
| Type | Description |
|---|---|
AlbertException
|
If any parameter value does not match an interval defined on the workflow. |
ValueError
|
If an invalid action string is provided. |
Source code in src/albert/resources/workflows.py
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | |
WorkflowParameterSet
Bases: BaseAlbertModel
One parameter constraint for workflow search filtering.
Show JSON schema:
{
"$defs": {
"ParameterCategory": {
"description": "Whether a [`Parameter`][albert.resources.parameters.Parameter]'s value is a plain scalar or an entity reference.\n\nSet by the platform and read-only. It determines how a parameter's value is\ninterpreted when a setpoint is assigned to it inside a\n[`Workflow`][albert.resources.workflows.Workflow].\n\nAttributes\n----------\nNORMAL : str\n A \"normal\" parameter whose value is a plain scalar (e.g. a number or text),\n such as Temperature or Spin Speed.\nSPECIAL : str\n A \"special\" parameter whose value references another entity (e.g. Equipment,\n a Consumable, or a Template). The setpoint value is that entity's ID rather\n than a plain scalar.",
"enum": [
"Normal",
"Special"
],
"title": "ParameterCategory",
"type": "string"
}
},
"description": "One parameter constraint for workflow search filtering.",
"properties": {
"parameter": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Parameter name for filtering. Optional inline range syntax: ``name``, ``name(value)``, ``name(>n)``, ``name(<n)``, or ``name(min-max)``.",
"title": "Parameter"
},
"parameterShortName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The short name of the parameter.",
"title": "Parametershortname"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Lower bound on the parameter value.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Upper bound on the parameter value.",
"title": "Max"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit name for the parameter value.",
"title": "Unit"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit ID (format ``UNI...``).",
"title": "Unitid"
},
"parameter_group": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group ID (format ``PRG...``).",
"title": "Parameter Group"
},
"parameterGroupName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the parameter group.",
"title": "Parametergroupname"
},
"dataTemplateName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The name of the data template.",
"title": "Datatemplatename"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/ParameterCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "The category of the parameter: ``SPECIAL`` for an inventory item (Equipment, Consumable, Template), ``NORMAL`` for everything else."
}
},
"title": "WorkflowParameterSet",
"type": "object"
}
Fields:
-
parameter(str | None) -
parameter_short_name(str | None) -
min(float | None) -
max(float | None) -
unit(str | None) -
unit_id(str | None) -
parameter_group(str | None) -
parameter_group_name(str | None) -
data_template_name(str | None) -
category(ParameterCategory | None)
parameter
parameter: str | None = None
Parameter name for filtering. Optional inline range syntax: name, name(value), name(>n), name(<n), or name(min-max).
category
category: ParameterCategory | None = None
The category of the parameter: SPECIAL for an inventory item (Equipment, Consumable, Template), NORMAL for everything else.
WorkflowSearchItemGroup
Bases: BaseAlbertModel
A lightweight data template or parameter group reference in a workflow search hit.
Show JSON schema:
{
"description": "A lightweight data template or parameter group reference in a workflow search hit.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the group. ``None`` when omitted from the search hit.",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the group.",
"title": "Name"
}
},
"title": "WorkflowSearchItemGroup",
"type": "object"
}
Fields:
WorkflowSearchItem
Bases: BaseAlbertModel, HydrationMixin[Workflow]
Lightweight workflow search hit.
Returned by search.
Call hydrate() to fetch the full
Workflow.
Show JSON schema:
{
"$defs": {
"SecurityClass": {
"description": "The security (access control) class of a resource.\n\nAttributes\n----------\nSHARED : str\n Accessible to all members of the tenant.\nRESTRICTED : str\n Access is restricted to specific teams or users.\nCONFIDENTIAL : str\n Access is limited to designated users only.\nPRIVATE : str\n Visible only to the owner. Used by Projects.\nPUBLIC : str\n Accessible publicly. Returned by Parameter Groups.",
"enum": [
"shared",
"restricted",
"confidential",
"private",
"public"
],
"title": "SecurityClass",
"type": "string"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"WorkflowSearchItemGroup": {
"description": "A lightweight data template or parameter group reference in a workflow search hit.",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the group. ``None`` when omitted from the search hit.",
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the group.",
"title": "Name"
}
},
"title": "WorkflowSearchItemGroup",
"type": "object"
}
},
"description": "Lightweight workflow search hit.\n\nReturned by [`search`][albert.collections.workflows.WorkflowCollection.search].\nCall `hydrate()` to fetch the full\n[`Workflow`][albert.resources.workflows.Workflow].",
"properties": {
"albertId": {
"description": "The Albert ID of the workflow (format ``WFL...``).",
"title": "Albertid",
"type": "string"
},
"name": {
"description": "The name of the workflow.",
"title": "Name",
"type": "string"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The lifecycle status of the workflow."
},
"createdBy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The ID of the user who created the workflow.",
"title": "Createdby"
},
"createdByName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The display name of the user who created the workflow.",
"title": "Createdbyname"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ISO 8601 timestamp of when the workflow was created.",
"title": "Createdat"
},
"resourceClass": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null,
"description": "The security class of the workflow."
},
"dataTemplateIds": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "IDs of data templates linked to the workflow.",
"title": "Datatemplateids"
},
"parameterGroupIds": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "IDs of parameter groups linked to the workflow.",
"title": "Parametergroupids"
},
"parameterIds": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "IDs of parameters linked to the workflow.",
"title": "Parameterids"
},
"dataTemplates": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/WorkflowSearchItemGroup"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Data templates linked to the workflow.",
"title": "Datatemplates"
},
"parameterGroups": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/WorkflowSearchItemGroup"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Parameter groups linked to the workflow.",
"title": "Parametergroups"
}
},
"required": [
"albertId",
"name"
],
"title": "WorkflowSearchItem",
"type": "object"
}
Fields:
-
_collection(BaseCollection | None) -
id(str) -
name(str) -
status(Status | None) -
created_by(str | None) -
created_by_name(str | None) -
created_at(str | None) -
resource_class(SecurityClass | None) -
data_template_ids(list[str] | None) -
parameter_group_ids(list[str] | None) -
parameter_ids(list[str] | None) -
data_templates(list[WorkflowSearchItemGroup] | None) -
parameter_groups(list[WorkflowSearchItemGroup] | None)
created_by_name
created_by_name: str | None = None
The display name of the user who created the workflow.
data_template_ids
IDs of data templates linked to the workflow.
parameter_group_ids
IDs of parameter groups linked to the workflow.
data_templates
data_templates: list[WorkflowSearchItemGroup] | None = None
Data templates linked to the workflow.
parameter_groups
parameter_groups: list[WorkflowSearchItemGroup] | None = (
None
)
Parameter groups linked to the workflow.