Skip to content

Attachments

albert.resources.attachments

AttachmentCategory

Bases: str, Enum

Attributes:

Name Type Description
OTHER
SDS
LABEL
SCRIPT

OTHER

OTHER = 'Other'

SDS

SDS = 'SDS'

LABEL

LABEL = 'Label'

SCRIPT

SCRIPT = 'Script'

Attachment

Bases: BaseResource

Used for attching files to Notes on Tasks, Projects, Inventory, etc. Key should match File.name

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"
    },
    "Status": {
      "description": "The status of a resource",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "description": "Used for attching files to Notes on Tasks, Projects, Inventory, etc.\nKey should match File.name",
  "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"
    },
    "parentId": {
      "title": "Parentid",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "key": {
      "title": "Key",
      "type": "string"
    },
    "nameSpace": {
      "default": "result",
      "title": "Namespace",
      "type": "string"
    },
    "category": {
      "anyOf": [
        {
          "const": "Other",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Category"
    },
    "fileSize": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filesize"
    },
    "mimeType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Mimetype"
    },
    "signedURL": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Signedurl"
    },
    "signedURLV2": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Signedurlv2"
    },
    "Metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Metadata"
    }
  },
  "required": [
    "parentId",
    "name",
    "key"
  ],
  "title": "Attachment",
  "type": "object"
}

Fields:

id

id: str | None = None

parent_id

parent_id: str

name

name: str

key

key: str

namespace

namespace: str = 'result'

category

category: Literal[OTHER] | None = None

file_size

file_size: int | None = None

mime_type

mime_type: str | None = None

signed_url

signed_url: str | None = None

signed_url_v2

signed_url_v2: str | None = None

metadata

metadata: dict[str, str] | None = None