Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.experimental.boards.record

Module Contents

BoardAccessibility

class roboto.experimental.boards.record.BoardAccessibility#View Source

Bases: roboto.compat.StrEnum

Who can open a board.

A new board is user: only the user who created it and the organization’s admins can open it. Sharing it with UpdateBoardAccessRequest makes it organization, for good: every member of the organization can then open and edit it. BoardRecord.accessibility says which applies to a board.

Attributes

BoardAccessibility.Organization

Organization = 'organization' #

Every member of the organization that owns the board can open and edit it.

BoardAccessibility.User

User = 'user' #

Only the user who owns the board, and the organization’s admins, can open it.

BoardRecord

class roboto.experimental.boards.record.BoardRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of a board.

Parameters

data Any

Properties

BoardRecord.accessibility

accessibility BoardAccessibility #

Computed from owner_principal_id: organization when the org principal owns the board, user otherwise.

Return type: BoardAccessibility

Attributes

BoardRecord.board_definition

board_definition dict[str, Any] #

The board definition as a JSON object, describing panels arranged on a canvas and the stages that provide their data.

The definition carries its own schema version for the clients that read it. The platform writes only its top-level title, which is kept equal to name while it is a non-empty string. A request is refused when BoardDefinition refuses its definition’s top level. The panels and stages inside are stored as sent, so a panel or stage that a client cannot parse comes back unchanged, and a person can fix it in the board’s JSON editor.

The platform stores the definition as parsed JSON, so it may return keys in a different order, keep only the last of a duplicated key, and write a number differently from how it was sent.

BoardRecord.board_id

board_id str #

Unique identifier for the board.

BoardRecord.created

created datetime.datetime #

Timestamp when the board was created.

BoardRecord.created_by

created_by str #

User ID of the board’s creator. Audit metadata only; ownership is carried by owner_principal_id.

BoardRecord.modified

modified datetime.datetime #

Timestamp when the board was last modified.

BoardRecord.modified_by

modified_by str #

User ID of the last user to modify the board.

BoardRecord.name

name str #

Human-readable name for the board, which the board list and board page show. Unique per owner within an organization; boards with different owners may share a name, so by-name lookups can match more than one board.

BoardRecord.org_id

org_id str #

Organization ID that owns the board.

BoardRecord.owner_principal_id

owner_principal_id str #

Principal that owns the board, serialized in the RobotoPrincipal ptype:id format.

org:<org_id> for a board shared with the organization, user:<user_id> for a personal board. The owner alone decides who can open the board: any member of the organization for a shared board, the owning user or an org admin for a personal one. Board names are unique per owner within an organization.

BoardRecord.revision

revision int = 0 #

How many times the board’s definition content has been written, starting at 0.

The server advances it on each write of definition content: a new definition, or a rename that rewrites the definition’s title. Sharing a board, and renaming one whose definition has no title, leave it unchanged. Clients never set it. They send the value they loaded back as base_revision when writing definition content, so the server can reject a write built on an outdated revision instead of erasing someone else’s edit.

definition_title()

roboto.experimental.boards.record.definition_title(board_definition)#View Source

Return the definition’s top-level title when it is a non-empty string, else None.

BoardRecord.name is kept equal to the title this returns. A null or empty title is stored as sent, leaves the name alone, and reads here as None. A request whose title is any other kind of value is refused.

Parameters

board_definition dict[str, Any]

Return type

str | None

Was this page helpful?