Tasks
albert.collections.tasks
DataTemplateId
module-attribute
AlbertHTTPError
Bases: AlbertException
Base class for all erors due to HTTP responses.
Source code in src/albert/exceptions.py
AlbertPaginator
AlbertPaginator(
*,
path: str,
mode: PaginationMode,
session: AlbertSession,
deserialize: Callable[
[Iterable[dict]], Iterable[ItemType]
],
params: dict[str, str] | None = None,
)
Bases: Iterator[ItemType]
Helper class for pagination through Albert endpoints.
Two pagination modes are possible:
- Offset-based via by the offset query parameter
- Key-based via by the startKey query parameter and 'lastKey' response field
A custom deserialize function is provided when additional logic is required to load
the raw items returned by the search listing, e.g., making additional Albert API calls.
Source code in src/albert/core/pagination.py
AlbertSession
AlbertSession(
*,
base_url: str,
token: str | None = None,
auth_manager: AlbertClientCredentials
| AlbertSSOClient
| None = None,
retries: int | None = None,
)
Bases: Session
A session that has a base URL, which is prefixed to all request URLs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
The base URL to prefix to all relative request paths (e.g., "https://app.albertinvent.com"). |
required |
token
|
str | None
|
A static JWT token for authentication. Ignored if |
None
|
auth_manager
|
AlbertClientCredentials | AlbertSSOClient
|
An authentication manager used to dynamically fetch and refresh tokens.
If provided, it overrides |
None
|
retries
|
int
|
The number of automatic retries on failed requests (default is 3). |
None
|
Methods:
| Name | Description |
|---|---|
request |
|
Source code in src/albert/core/session.py
request
Source code in src/albert/core/session.py
BaseCollection
BaseCollection(*, session: AlbertSession)
BaseCollection is the base class for all collection classes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The Albert API Session instance. |
required |
Source code in src/albert/collections/base.py
BaseTask
Bases: BaseTaggedResource
Base class for all task types. Use PropertyTask, BatchTask, or GeneralTask for specific task types.
assigned_to
class-attribute
instance-attribute
assigned_to: SerializeAsEntityLink[User] | None = Field(
default=None, alias="AssignedTo"
)
claimed_date
class-attribute
instance-attribute
claimed_date: str | None = Field(
alias="claimedDate", default=None
)
closed_date
class-attribute
instance-attribute
closed_date: str | None = Field(
alias="closedDate", default=None
)
completed_date
class-attribute
instance-attribute
completed_date: str | None = Field(
alias="completedDate", default=None
)
due_date
class-attribute
instance-attribute
due_date: str | None = Field(alias='dueDate', default=None)
inventory_information
class-attribute
instance-attribute
inventory_information: list[TaskInventoryInformation] = (
Field(alias="Inventories", default=None)
)
location
class-attribute
instance-attribute
location: SerializeAsEntityLink[Location] | None = Field(
default=None, alias="Location"
)
metadata
class-attribute
instance-attribute
page_state
class-attribute
instance-attribute
parent_id
class-attribute
instance-attribute
parent_id: str | None = Field(
alias="parentId", default=None
)
pass_fail
class-attribute
instance-attribute
pass_fail: bool | None = Field(
alias="passOrFail", default=None
)
project
class-attribute
instance-attribute
project: (
SerializeAsEntityLink[Project]
| list[SerializeAsEntityLink[Project]]
| None
) = Field(default=None, alias="Project")
security_class
class-attribute
instance-attribute
sources
class-attribute
instance-attribute
start_date
class-attribute
instance-attribute
start_date: str | None = Field(
alias="startDate", default=None
)
BatchTask
Bases: BaseTask
Represents a batch task.
This class is used to create and manage batch tasks. It includes the base task attributes and additional attributes specific to batch tasks.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the batch task. |
inventory_information |
list[TaskInventoryInformation]
|
Information about the inventory associated with the batch task. |
location |
SerializeAsEntityLink[Location]
|
The location where the batch task is performed. |
parent_id |
str
|
The ID of the parent project. |
id |
(str, optional)
|
The ID of the batch task, by default None. |
batch_size_unit |
(str, optional)
|
The unit of measurement for the batch size, by default None. |
metadata |
(dict[str, MetadataItem], optional)
|
Metadata associated with the batch task, by default an empty dictionary. |
workflows |
(list[SerializeAsEntityLink[Workflow]], optional)
|
A list of workflows associated with the batch task, by default None. |
due_date |
(str, optional)
|
The due date of the batch task. YYY-MM-DD format, by default None. |
notes |
(str, optional)
|
Notes associated with the batch task, by default None. |
priority |
(TaskPriority, optional)
|
The priority of the batch task, by default None. |
project |
(SerializeAsEntityLink[Project] | list[SerializeAsEntityLink[Project]], optional)
|
The project(s) associated with the batch task, by default None. |
assigned_to |
(SerializeAsEntityLink[User], optional)
|
The user assigned to the batch task, by default None. |
state |
(TaskState, optional)
|
The state of the batch task, by default None. |
sources |
(list[TaskSource], optional)
|
A list of sources associated with the batch task, by default an empty list. |
security_class |
(SecurityClass, optional)
|
The security class of the batch task, by default None. |
pass_fail |
(bool, optional)
|
Whether the batch task is pass/fail, by default None. |
start_date |
str, read only
|
The start date of the batch task, by default None. |
claimed_date |
str, read only
|
The claimed date of the batch task, by default None. |
completed_date |
str, read only
|
The completed date of the batch task, by default None. |
closed_date |
str, read only
|
The closed date of the batch task, by default None. |
qc_task |
(bool, optional)
|
Whether the batch task is a QC task, by default None. |
batch_task_id |
(str, optional)
|
The ID of the batch task, by default None. |
target |
(str, optional)
|
The target of the batch task, by default None. |
qc_task_data |
(list[QCTaskData], optional)
|
A list of QC task data associated with the batch task, by default None. |
batch_size_unit
class-attribute
instance-attribute
batch_task_id
class-attribute
instance-attribute
batch_task_id: str | None = Field(
alias="batchTaskId", default=None
)
qc_task
class-attribute
instance-attribute
qc_task: bool | None = Field(alias='qcTask', default=None)
qc_task_data
class-attribute
instance-attribute
qc_task_data: list[QCTaskData] | None = Field(
alias="QCTaskData", default=None
)
GeneralTask
OrderBy
PaginationMode
PropertyTask
Bases: BaseTask
Represents a batch task.
This class is used to create and manage batch tasks. It includes the base task attributes and additional attributes specific to batch tasks.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the batch task. |
inventory_information |
list[TaskInventoryInformation]
|
Information about the inventory associated with the batch task. |
location |
SerializeAsEntityLink[Location]
|
The location where the batch task is performed. |
parent_id |
str
|
The ID of the parent project. |
blocks |
list[Block]
|
A list of blocks associated with the batch task. |
id |
(str, optional)
|
The ID of the batch task, by default None. |
metadata |
(dict[str, MetadataItem], optional)
|
Metadata associated with the batch task, by default an empty dictionary. |
due_date |
(str, optional)
|
The due date of the batch task. YYY-MM-DD format, by default None. |
notes |
(str, optional)
|
Notes associated with the batch task, by default None. |
priority |
(TaskPriority, optional)
|
The priority of the batch task, by default None. |
assigned_to |
(SerializeAsEntityLink[User], optional)
|
The user assigned to the batch task, by default None. |
state |
(TaskState, optional)
|
The state of the batch task, by default None. |
sources |
(list[TaskSource], optional)
|
A list of sources associated with the batch task, by default an empty list. |
security_class |
(SecurityClass, optional)
|
The security class of the batch task, by default None. |
start_date |
str, read only
|
The start date of the batch task, by default None. |
claimed_date |
str, read only
|
The claimed date of the batch task, by default None. |
completed_date |
str, read only
|
The completed date of the batch task, by default None. |
closed_date |
str, read only
|
The closed date of the batch task, by default None. |
batch_task_id
class-attribute
instance-attribute
batch_task_id: str | None = Field(
alias="batchTaskId", default=None
)
blocks
class-attribute
instance-attribute
blocks: list[Block] | None = Field(
alias="Blocks", default=None
)
qc_task
class-attribute
instance-attribute
qc_task: bool | None = Field(alias='qcTask', default=None)
TaskCollection
TaskCollection(*, session: AlbertSession)
Bases: BaseCollection
TaskCollection is a collection class for managing Task entities in the Albert platform.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The Albert Session information |
required |
Methods:
| Name | Description |
|---|---|
add_block |
Add a block to a Property task. |
create |
Create a new task. Tasks can be of different types, such as PropertyTask, and are created using the provided task object. |
delete |
Delete a task. |
get_all |
Retrieve fully hydrated Task entities with optional filters. |
get_by_id |
Retrieve a task by its ID. |
get_history |
|
remove_block |
Remove a block from a Property task. |
search |
Search for Task matching the provided criteria. |
update |
Update a task. |
update_block_workflow |
Update the workflow of a specific block within a task. |
Source code in src/albert/collections/tasks.py
add_block
add_block(
*,
task_id: TaskId,
data_template_id: DataTemplateId,
workflow_id: WorkflowId,
) -> None
Add a block to a Property task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
TaskId
|
The ID of the task to add the block to. |
required |
data_template_id
|
DataTemplateId
|
The ID of the data template to use for the block. |
required |
workflow_id
|
WorkflowId
|
The ID of the workflow to assign to the block. |
required |
Returns:
| Type | Description |
|---|---|
None
|
This method does not return any value. |
Source code in src/albert/collections/tasks.py
create
create(
*, task: PropertyTask | GeneralTask | BatchTask
) -> BaseTask
Create a new task. Tasks can be of different types, such as PropertyTask, and are created using the provided task object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
PropertyTask | GeneralTask | BatchTask
|
The task object to create. |
required |
Returns:
| Type | Description |
|---|---|
BaseTask
|
The registered task object. |
Source code in src/albert/collections/tasks.py
delete
delete(*, id: TaskId) -> None
Delete a task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
TaskId
|
The ID of the task to delete. |
required |
get_all
get_all(
*, params: TaskFilterParams | None = None
) -> Iterator[BaseTask]
Retrieve fully hydrated Task entities with optional filters.
This method returns complete entity data using get_by_id or get_by_ids.
Use :meth:search for faster retrieval when you only need lightweight, partial (unhydrated) entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
TaskFilterParams
|
Filter and pagination options passed to the search query. |
None
|
Yields:
| Type | Description |
|---|---|
Iterator[BaseTask]
|
A stream of fully hydrated Task objects (PropertyTask, BatchTask, or GeneralTask). |
Source code in src/albert/collections/tasks.py
get_by_id
Retrieve a task by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
TaskId
|
The ID of the task to retrieve. |
required |
Returns:
| Type | Description |
|---|---|
BaseTask
|
The task object with the provided ID. |
Source code in src/albert/collections/tasks.py
get_history
get_history(
*,
id: TaskId,
order: OrderBy = DESCENDING,
limit: int = 1000,
entity: HistoryEntity | None = None,
blockId: str | None = None,
startKey: str | None = None,
) -> TaskHistory
Source code in src/albert/collections/tasks.py
remove_block
Remove a block from a Property task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
ID of the Task to remove the block from (e.g., TASFOR1234) |
required |
block_id
|
str
|
ID of the Block to remove (e.g., BLK1) |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/albert/collections/tasks.py
search
search(
*, params: TaskFilterParams | None = None
) -> Iterator[TaskSearchItem]
Search for Task matching the provided criteria.
⚠️ This method returns partial (unhydrated) entities to optimize performance.
To retrieve fully detailed entities, use :meth:get_all instead.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
TaskFilterParams
|
Structured query parameters including filters, sort order, and pagination. |
None
|
Yields:
| Type | Description |
|---|---|
Iterator[BaseTask]
|
An iterator of matching, fully hydrated Task objects. |
Source code in src/albert/collections/tasks.py
update
Update a task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
BaseTask
|
The updated Task object. |
required |
Returns:
| Type | Description |
|---|---|
BaseTask
|
The updated Task object as it exists in the Albert platform. |
Source code in src/albert/collections/tasks.py
update_block_workflow
update_block_workflow(
*,
task_id: TaskId,
block_id: BlockId,
workflow_id: WorkflowId,
) -> None
Update the workflow of a specific block within a task.
This method updates the workflow of a specified block within a task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
The ID of the task. |
required |
block_id
|
str
|
The ID of the block within the task. |
required |
workflow_id
|
str
|
The ID of the new workflow to be assigned to the block. |
required |
Returns:
| Type | Description |
|---|---|
None
|
This method does not return any value. |
Notes
- The method asserts that the retrieved task is an instance of
PropertyTask. - If the block's current workflow matches the new workflow ID, no update is performed.
- The method handles the case where the block has a default workflow named "No Parameter Group".
Source code in src/albert/collections/tasks.py
TaskFilterParams
pydantic-model
Bases: BaseAlbertModel
Filtering and query parameters for searching tasks.
This model centralizes all supported filters, sorting, and pagination options used in task search operations.
Show JSON schema:
{
"$defs": {
"OrderBy": {
"enum": [
"desc",
"asc"
],
"title": "OrderBy",
"type": "string"
},
"TaskCategory": {
"enum": [
"Property",
"Batch",
"General",
"BatchWithQC"
],
"title": "TaskCategory",
"type": "string"
}
},
"description": "Filtering and query parameters for searching tasks.\n\nThis model centralizes all supported filters, sorting, and pagination options\nused in task search operations.",
"properties": {
"order": {
"$ref": "#/$defs/OrderBy",
"default": "desc",
"description": "The order in which to return results (asc or desc)."
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Text search across multiple task fields.",
"title": "Text"
},
"sort_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Attribute to sort tasks by (e.g., createdAt, name).",
"title": "Sort By"
},
"tags": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Filter by tags associated with tasks.",
"title": "Tags"
},
"task_id": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Specific task IDs to search for.",
"title": "Task Id"
},
"linked_task": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Task IDs linked to the ones being searched.",
"title": "Linked Task"
},
"category": {
"anyOf": [
{
"$ref": "#/$defs/TaskCategory"
},
{
"type": "null"
}
],
"default": null,
"description": "Task category filter (e.g., Experiment, Analysis)."
},
"albert_id": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Albert-specific task identifiers.",
"title": "Albert Id"
},
"data_template": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Data template IDs associated with tasks.",
"title": "Data Template"
},
"assigned_to": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "User IDs assigned to the tasks.",
"title": "Assigned To"
},
"location": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Locations where tasks are carried out.",
"title": "Location"
},
"priority": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Priority levels for filtering tasks.",
"title": "Priority"
},
"status": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Task status values (e.g., Open, Done).",
"title": "Status"
},
"parameter_group": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Parameter Group IDs associated with tasks.",
"title": "Parameter Group"
},
"created_by": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "User IDs who created the tasks.",
"title": "Created By"
},
"project_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the parent project for filtering tasks.",
"title": "Project Id"
},
"limit": {
"default": 100,
"description": "Maximum number of results to return (default: 100).",
"maximum": 1000,
"minimum": 1,
"title": "Limit",
"type": "integer"
},
"offset": {
"default": 0,
"description": "Number of results to skip for pagination (default: 0).",
"minimum": 0,
"title": "Offset",
"type": "integer"
}
},
"title": "TaskFilterParams",
"type": "object"
}
Fields:
-
order(OrderBy) -
text(str | None) -
sort_by(str | None) -
tags(list[str] | None) -
task_id(list[str] | None) -
linked_task(list[str] | None) -
category(TaskCategory | None) -
albert_id(list[str] | None) -
data_template(list[str] | None) -
assigned_to(list[str] | None) -
location(list[str] | None) -
priority(list[str] | None) -
status(list[str] | None) -
parameter_group(list[str] | None) -
created_by(list[str] | None) -
project_id(str | None) -
limit(int) -
offset(int)
category
pydantic-field
Task category filter (e.g., Experiment, Analysis).
data_template
pydantic-field
Data template IDs associated with tasks.
linked_task
pydantic-field
Task IDs linked to the ones being searched.
order
pydantic-field
order: OrderBy = DESCENDING
The order in which to return results (asc or desc).
parameter_group
pydantic-field
Parameter Group IDs associated with tasks.
project_id
pydantic-field
project_id: str | None = None
ID of the parent project for filtering tasks.
sort_by
pydantic-field
sort_by: str | None = None
Attribute to sort tasks by (e.g., createdAt, name).
TaskHistory
pydantic-model
Bases: BaseAlbertModel
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"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"Location": {
"description": "A location in Albert.\n\nAttributes\n----------\nname : str\n The name of the location.\nid : str | None\n The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n The latitude of the location.\nlongitude : float\n The longitude of the location.\naddress : str\n The address of the location.\ncountry : str | None\n The country code of the location. Must be two characters long.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"latitude": {
"title": "Latitude",
"type": "number"
},
"longitude": {
"title": "Longitude",
"type": "number"
},
"address": {
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Role": {
"description": "A role in Albert. Note: Roles are not currently creatable via the SDK.\n\nAttributes\n----------\nname : str\n The name of the role.\nid : str\n The Albert ID of the role. Set when the role is retrieved from Albert.\npolicies : list[Any] | None\n The policies associated with the role.\ntenant : str\n The tenant ID of the role.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"policies": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Policies"
},
"tenant": {
"title": "Tenant",
"type": "string"
}
},
"required": [
"name",
"tenant"
],
"title": "Role",
"type": "object"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"TaskHistoryEvent": {
"properties": {
"state": {
"title": "State",
"type": "string"
},
"action": {
"title": "Action",
"type": "string"
},
"actionAt": {
"format": "date-time",
"title": "Actionat",
"type": "string"
},
"User": {
"anyOf": [
{
"$ref": "#/$defs/User"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"title": "User"
},
"oldValue": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Oldvalue"
},
"newValue": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"title": "Newvalue"
}
},
"required": [
"state",
"action",
"actionAt",
"User"
],
"title": "TaskHistoryEvent",
"type": "object"
},
"User": {
"description": "Represents a User on the Albert Platform\n\nAttributes\n----------\nname : str\n The name of the user.\nid : str | None\n The Albert ID of the user. Set when the user is retrieved from Albert.\nlocation : Location | None\n The location of the user.\nemail : EmailStr | None\n The email of the user.\nroles : list[Role]\n The roles of the user.\nuser_class : UserClass\n The ACL class level of the user.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"email": {
"default": null,
"format": "email",
"title": "Email",
"type": "string"
},
"Roles": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/Role"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"maxItems": 1,
"title": "Roles",
"type": "array"
},
"userClass": {
"$ref": "#/$defs/UserClass",
"default": "standard"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"name"
],
"title": "User",
"type": "object"
},
"UserClass": {
"description": "The ACL class level of the user",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
}
},
"properties": {
"Items": {
"items": {
"$ref": "#/$defs/TaskHistoryEvent"
},
"title": "Items",
"type": "array"
}
},
"required": [
"Items"
],
"title": "TaskHistory",
"type": "object"
}
Fields:
TaskPatchPayload
TaskSearchItem
pydantic-model
Bases: BaseAlbertModel, HydrationMixin[BaseTask]
Lightweight representation of a Task returned from unhydrated search().
Show JSON schema:
{
"$defs": {
"TaskSearchDataTemplate": {
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "TaskSearchDataTemplate",
"type": "object"
},
"TaskSearchInventory": {
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"albertIdAndName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertidandname"
}
},
"title": "TaskSearchInventory",
"type": "object"
},
"TaskSearchLocation": {
"properties": {
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "TaskSearchLocation",
"type": "object"
},
"TaskSearchLot": {
"properties": {
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
},
"selectedLot": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Selectedlot"
}
},
"title": "TaskSearchLot",
"type": "object"
},
"TaskSearchTag": {
"properties": {
"tagName": {
"title": "Tagname",
"type": "string"
}
},
"required": [
"tagName"
],
"title": "TaskSearchTag",
"type": "object"
},
"TaskSearchWorkflow": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"category": {
"title": "Category",
"type": "string"
}
},
"required": [
"id",
"category"
],
"title": "TaskSearchWorkflow",
"type": "object"
}
},
"description": "Lightweight representation of a Task returned from unhydrated search().",
"properties": {
"albertId": {
"title": "Albertid",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"category": {
"title": "Category",
"type": "string"
},
"priority": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Priority"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"assignedTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Assignedto"
},
"assignedToUserId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Assignedtouserid"
},
"createdByName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Createdbyname"
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Createdat"
},
"dueDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Duedate"
},
"completedDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Completeddate"
},
"startDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Startdate"
},
"closedDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Closeddate"
},
"location": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TaskSearchLocation"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"inventory": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TaskSearchInventory"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Inventory"
},
"tags": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TaskSearchTag"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Tags"
},
"lot": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TaskSearchLot"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Lot"
},
"dataTemplate": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TaskSearchDataTemplate"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Datatemplate"
},
"workflow": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/TaskSearchWorkflow"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Workflow"
},
"projectId": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Projectid"
},
"isQCTask": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Isqctask"
},
"parentBatchStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentbatchstatus"
}
},
"required": [
"albertId",
"name",
"category"
],
"title": "TaskSearchItem",
"type": "object"
}
Fields:
-
_collection(BaseCollection | None) -
id(TaskId) -
name(str) -
category(str) -
priority(str | None) -
state(str | None) -
assigned_to(str | None) -
assigned_to_user_id(str | None) -
created_by_name(str | None) -
created_at(str | None) -
due_date(str | None) -
completed_date(str | None) -
start_date(str | None) -
closed_date(str | None) -
location(list[TaskSearchLocation] | None) -
inventory(list[TaskSearchInventory] | None) -
tags(list[TaskSearchTag] | None) -
lot(list[TaskSearchLot] | None) -
data_template(list[TaskSearchDataTemplate] | None) -
workflow(list[TaskSearchWorkflow] | None) -
project_id(list[str] | None) -
is_qc_task(bool | None) -
parent_batch_status(str | None)