attachment 资源类型attachment resource type

可以附件形式向事件邮件帖子添加相关内容。You can add related content to an event, message, or post in the form of an attachment.

附件是以下附件派生类型的基础资源:attachment is the base resource for the following derived types of attachments:

方法Methods

以下方法适用于所有附件派生类型(fileAttachmentitemAttachmentreferenceAttachment)。The following methods apply to any of the derived types of attachments (fileAttachment, itemAttachment, or referenceAttachment).

方法Method 返回类型Return Type 说明Description
获取附件Get attachment attachmentattachment 读取附加到事件、邮件或帖子的附件的属性和关系。Read the properties and relationships of an attachment, attached to an event, message, or post.
Add attachment to an eventAdd attachment to an event 附件attachment 将文件、项目或链接附件添加到事件中。Add a file, item, or link attachment to an event.
将附件添加到邮件中Add attachment to a message 附件attachment 将文件、项目或将附件链接添加到邮件中。Add a file, item, or link attachment to a message.
将附件添加到帖子中Add attachment to a post 附件attachment 将文件、项目或将附件链接添加到帖子中。Add a file, item, or link attachment to a post.
列出事件的附件List attachments of an event 附件 集合attachment collection 获取事件的附件列表。Get a list of attachments for an event.
列出邮件的附件List attachments of a message 附件 集合attachment collection 获取邮件的附件列表。Get a list of attachments for a message.
列出帖子的附件List attachments of a post 附件 集合attachment collection 获取帖子的附件列表。Get a list of attachments for a post.
删除Delete None 删除事件、邮件或帖子的附件。Delete an attachment on an event, message, or post.

属性Properties

下面介绍了任意 attachment 资源的基础属性。有关其他属性,请参阅具体附件类型(fileAttachmentitemAttachmentreferenceAttachment)。The following are the base properties of any attachment resource. Refer to the specific type of attachment (fileAttachment, itemAttachment, or referenceAttachment) for additional properties.

属性Property 类型Type 说明Description
contentTypecontentType StringString MIME 类型。The MIME type.
idid StringString 只读。Read-only.
isInlineisInline BooleanBoolean 如果附件是内嵌附件,则为 true;否则为 falsetrue if the attachment is an inline attachment; otherwise, false.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 时间戳类型表示使用 ISO 8601 格式的日期和时间信息,并且始终处于 UTC 时间。例如,2014 年 1 月 1 日午夜 UTC 类似于如下形式:'2014-01-01T00:00:00Z'The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'
名称name StringString 附件的文件名。The attachment's file name.
sizesize Int32Int32 附件大小,以字节为单位。The length of the attachment in bytes.

RelationshipsRelationships

None

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

{
  "contentType": "string",
  "id": "string (identifier)",
  "isInline": true,
  "lastModifiedDateTime": "String (timestamp)",
  "name": "string",
  "size": 1024
}