REST Resource: notes

Resource: Note

A single note.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "trashTime": string,
  "trashed": boolean,
  "attachments": [
    {
      object (Attachment)
    }
  ],
  "permissions": [
    {
      object (Permission)
    }
  ],
  "title": string,
  "body": {
    object (Section)
  }
}
Fields
name

string

Output only. The resource name of this note. See general note on identifiers in KeepService.

createTime

string (Timestamp format)

Output only. When this note was created.

updateTime

string (Timestamp format)

Output only. When this note was last modified.

trashTime

string (Timestamp format)

Output only. When this note was trashed. If trashed, the note is eventually deleted. If the note is not trashed, this field is not set (and the trashed field is false).

trashed

boolean

Output only. true if this note has been trashed. If trashed, the note is eventually deleted.

attachments[]

object (Attachment)

Output only. The attachments attached to this note.

permissions[]

object (Permission)

Output only. The list of permissions set on the note. Contains at least one entry for the note owner.

title

string

The title of the note. Length must be less than 1,000 characters.

body

object (Section)

The body of the note.

Attachment

An attachment to a note.

JSON representation
{
  "name": string,
  "mimeType": [
    string
  ]
}
Fields
name

string

The resource name;

mimeType[]

string

The MIME types (IANA media types) in which the attachment is available.

Permission

A single permission on the note. Associates a member with a role.

JSON representation
{
  "name": string,
  "role": enum (Role),
  "email": string,
  "deleted": boolean,

  // Union field member can be only one of the following:
  "user": {
    object (User)
  },
  "group": {
    object (Group)
  },
  "family": {
    object (Family)
  }
  // End of list of possible types for union field member.
}
Fields
name

string

Output only. The resource name.

role

enum (Role)

The role granted by this permission. The role determines the entity’s ability to read, write, and share notes.

email

string

The email associated with the member. If set on create, the email field in the User or Group message must either be empty or match this field. On read, may be unset if the member does not have an associated email.

deleted

boolean

Output only. Whether this member has been deleted. If the member is recovered, this value is set to false and the recovered member retains the role on the note.

Union field member. Specifies the identity granted the role. Member is unset if the member has been deleted. member can be only one of the following:
user

object (User)

Output only. The user to whom this role applies.

group

object (Group)

Output only. The group to which this role applies.

family

object (Family)

Output only. The Google Family to which this role applies.

Role

Defines the various roles an entity can have.

Enums
ROLE_UNSPECIFIED An undefined role.
OWNER A role granting full access. This role cannot be added or removed. Defined by the creator of the note.
WRITER A role granting the ability to contribute content and modify note permissions.

User

Describes a single user.

JSON representation
{
  "email": string
}
Fields
email

string

The user's email.

Group

Describes a single Group.

JSON representation
{
  "email": string
}
Fields
email

string

The group email.

Family

This type has no fields.

Describes a single Google Family.

Section

The content of the note.

JSON representation
{

  // Union field Content can be only one of the following:
  "text": {
    object (TextContent)
  },
  "list": {
    object (ListContent)
  }
  // End of list of possible types for union field Content.
}
Fields
Union field Content. The section's content must be one of these value types. Content can be only one of the following:
text

object (TextContent)

Used if this section's content is a block of text. The length of the text content must be less than 20,000 characters.

list

object (ListContent)

Used if this section's content is a list.

TextContent

The block of text for a single text section or list item.

JSON representation
{
  "text": string
}
Fields
text

string

The text of the note. The limits on this vary with the specific field using this type.

ListContent

The list of items for a single list note.

JSON representation
{
  "listItems": [
    {
      object (ListItem)
    }
  ]
}
Fields
listItems[]

object (ListItem)

The items in the list. The number of items must be less than 1,000.

ListItem

A single list item in a note's list.

JSON representation
{
  "childListItems": [
    {
      object (ListItem)
    }
  ],
  "text": {
    object (TextContent)
  },
  "checked": boolean
}
Fields
childListItems[]

object (ListItem)

If set, list of list items nested under this list item. Only one level of nesting is allowed.

text

object (TextContent)

The text of this item. Length must be less than 1,000 characters.

checked

boolean

Whether this item has been checked off or not.

Methods

create

Creates a new note.

delete

Deletes a note.

get

Gets a note.

list

Lists notes.