Notes
albert.resources.notes
NoteAttachmentEntityLink
Bases: EntityLinkWithName
A file attached to a note, with an optional signed download URL.
Returned as part of a Note when it has attached files. Not
constructed directly; files are attached via the
AttachmentCollection.
Show JSON schema:
{
"description": "A file attached to a note, with an optional signed download URL.\n\nReturned as part of a [`Note`][albert.resources.notes.Note] when it has attached files. Not\nconstructed directly; files are attached via the\n[`AttachmentCollection`][albert.collections.attachments.AttachmentCollection].",
"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"
},
"key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The storage key of the underlying file.",
"title": "Key"
},
"fileSize": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The size of the file in bytes.",
"title": "Filesize"
},
"signedURL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A temporary signed URL for downloading the file, when available.",
"title": "Signedurl"
}
},
"required": [
"id"
],
"title": "NoteAttachmentEntityLink",
"type": "object"
}
Fields:
Note
Bases: BaseResource
A free-text note attached to another entity in Albert.
A note records a comment or observation against a parent entity (its
parent_id), such as a Task, Project, or Inventory Item. Users can be
mentioned inside the note text by embedding
to_note_mention in an f-string, for
example f"Hello {tagged_user.to_note_mention()}!". Notes are managed
through the NotesCollection.
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"
},
"NoteAttachmentEntityLink": {
"description": "A file attached to a note, with an optional signed download URL.\n\nReturned as part of a [`Note`][albert.resources.notes.Note] when it has attached files. Not\nconstructed directly; files are attached via the\n[`AttachmentCollection`][albert.collections.attachments.AttachmentCollection].",
"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"
},
"key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The storage key of the underlying file.",
"title": "Key"
},
"fileSize": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The size of the file in bytes.",
"title": "Filesize"
},
"signedURL": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "A temporary signed URL for downloading the file, when available.",
"title": "Signedurl"
}
},
"required": [
"id"
],
"title": "NoteAttachmentEntityLink",
"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"
}
},
"description": "A free-text note attached to another entity in Albert.\n\nA note records a comment or observation against a parent entity (its\n``parent_id``), such as a Task, Project, or Inventory Item. Users can be\nmentioned inside the ``note`` text by embedding\n[`to_note_mention`][albert.resources.users.User.to_note_mention] in an f-string, for\nexample ``f\"Hello {tagged_user.to_note_mention()}!\"``. Notes are managed\nthrough the [`NotesCollection`][albert.collections.notes.NotesCollection].\n\n!!! example\n ```python\n from albert.resources.notes import Note\n note = Note(parent_id=\"TASA1\", note=\"Reviewed the results.\")\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."
},
"parentId": {
"description": "The ID of the entity the note is attached to (e.g. a Task ID). Must include the full entity prefix.",
"title": "Parentid",
"type": "string"
},
"note": {
"description": "The text content of the note.",
"title": "Note",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the note. Assigned by Albert when the note is created.",
"title": "Albertid"
},
"Attachments": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/NoteAttachmentEntityLink"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Files attached to the note. Read-only; populated when the note is retrieved.",
"title": "Attachments"
}
},
"required": [
"parentId",
"note"
],
"title": "Note",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
parent_id(str) -
note(str) -
id(str | None) -
attachments(list[NoteAttachmentEntityLink] | None)
parent_id
parent_id: str
The ID of the entity the note is attached to (e.g. a Task ID). Must include the full entity prefix.
attachments
attachments: list[NoteAttachmentEntityLink] | None = None
Files attached to the note. Read-only; populated when the note is retrieved.