Projects
albert.resources.projects
ProjectClass
State
The current state of a project
Attributes:
Name | Type | Description |
---|---|---|
NOT_STARTED |
|
|
ACTIVE |
|
|
CLOSED_SUCCESS |
|
|
CLOSED_ARCHIVED |
|
TaskConfig
Bases: BaseAlbertModel
The task configuration for a project
Show JSON schema:
{
"description": "The task configuration for a project",
"properties": {
"datatemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Datatemplateid"
},
"workflowId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Workflowid"
},
"defaultTaskName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Defaulttaskname"
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Target"
},
"hidden": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": false,
"title": "Hidden"
}
},
"title": "TaskConfig",
"type": "object"
}
Fields:
-
datatemplateId
(str | None
) -
workflowId
(str | None
) -
defaultTaskName
(str | None
) -
target
(str | None
) -
hidden
(bool | None
)
GridDefault
Project
Bases: BaseResource
A project in Albert.
Attributes:
Name | Type | Description |
---|---|---|
description |
str
|
The description of the project. Used as the name of the project as well. |
id |
str | None
|
The Albert ID of the project. Set when the project is retrieved from Albert. |
locations |
list[Location] | None
|
The locations associated with the project. Optional. |
project_class |
ProjectClass
|
The class of the project. Defaults to PRIVATE. |
metadata |
dict[str, str | list[EntityLink] | EntityLink] | None
|
The metadata of the project. Optional. Metadata allowed values can be found using the Custom Fields API. |
prefix |
str | None
|
The prefix of the project. Optional. |
acl |
list[ACL] | None
|
The ACL of the project. Optional. |
task_config |
list[TaskConfig] | None
|
The task configuration of the project. Optional. |
grid |
GridDefault | None
|
The default grid of the project. Optional. |
state |
State | None
|
The state/status of the project. Allowed states are customizeable using the entitystatus API. Optional. |
application_engineering_inventory_ids |
list[str] | None
|
Inventory Ids to be added as application engineering. Optional. |
Methods:
Name | Description |
---|---|
validate_status |
Somehow, some statuses are capitalized in the API response. This ensures they are always lowercase. |
locations
locations: list[SerializeAsEntityLink[Location]] | None = (
Field(
default=None,
min_length=1,
max_length=20,
alias="Locations",
)
)
application_engineering_inventory_ids
application_engineering_inventory_ids: list[str] | None = (
Field(
default=None,
alias="appEngg",
description="Inventory Ids to be added as application engineering",
)
)
validate_status
Somehow, some statuses are capitalized in the API response. This ensures they are always lowercase.
Source code in src/albert/resources/projects.py
ProjectSearchItem
Bases: BaseAlbertModel
, HydrationMixin[Project]
Show JSON schema:
{
"properties": {
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"description": {
"maxLength": 2000,
"minLength": 1,
"title": "Description",
"type": "string"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"required": [
"description"
],
"title": "ProjectSearchItem",
"type": "object"
}
Fields:
-
_collection
(BaseCollection | None
) -
id
(ProjectId | None
) -
description
(str
) -
status
(str | None
)