outlookTask 资源类型outlookTask resource type

重要说明: Microsoft Graph 中 /beta 版本下的 API 是预览版,可能会发生变化。Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

可以跟踪工作项的 Outlook 项目。An Outlook item that can track a work item.

任务可用于跟踪开始、 截止日期和实际完成日期和时间,它的进度或状态,无论它定期约会,并要求提醒。You can use a task to track the start, due and actual completion dates and times, its progress or status, whether it's recurring, and requires reminding.

日期相关outlookTask资源中的属性包括以下项:Date-related properties in the outlookTask resource include the following:

  • completedDateTimecompletedDateTime
  • createdDateTimecreatedDateTime
  • dueDateTimedueDateTime
  • lastModifiedDateTimelastModifiedDateTime
  • reminderDateTimereminderDateTime
  • startDateTimestartDateTime

默认情况下,POST、 获取、 PATCH 和完成操作 UTC 他们 REST 的响应中返回与日期相关的属性。By default, the POST, GET, PATCH, and complete operations return date-related properties in their REST responses in UTC. 您可以使用Prefer: outlook.timezone标头,使其具有不同于 UTC 时区中表示的响应中的所有日期相关的属性。You can use the Prefer: outlook.timezone header to have all the date-related properties in the response represented in a time zone different than UTC. 下面的示例返回在东部时间与日期相关的属性的相应的响应中:The following example returns date-related properties in EST in the corresponding response:

Prefer: outlook.timezone="Eastern Standard Time"

方法Methods

方法Method 返回类型Return Type 说明Description
获取 outlookTaskGet outlookTask outlookTaskoutlookTask 获取用户的邮箱中的属性和 Outlook 任务的关系。Get the properties and relationships of an Outlook task in the user's mailbox.
UpdateUpdate outlookTaskoutlookTask 更改 Outlook 任务的可写属性。Change writeable properties of an Outlook task.
删除Delete None 删除用户的邮箱中指定的任务。Delete the specified task in the user's mailbox.
CompleteComplete outlookTask集合outlookTask collection 完成 Outlook 任务,这将completedDateTime属性设置为当前日期,并状态属性设为completedComplete an Outlook task which sets the completedDateTime property to the current date, and status property to completed.
附件Attachments
列出附件List attachments attachment 集合attachment collection 获取有关 Outlook 任务的所有附件。Get all attachments on an Outlook task.
Add attachmentAdd attachment attachmentattachment 添加的文件、 项 (邮件、 事件或联系人) 或链接到文件作为附件到一个任务。Add a file, item (message, event or contact), or link to a file as an attachment to a task.
扩展属性Extended properties
创建单值扩展属性Create single-value extended property outlookTaskoutlookTask 创建新的或现有 Outlook 任务中的一个或多个单值扩展的属性。Create one or more single-value extended properties in a new or existing Outlook task.
获取与扩展的单值属性的任务Get task with single-value extended property outlookTaskoutlookTask 获取包含一个单值使用扩展属性的 Outlook 任务$expand$filterGet Outlook tasks that contain a single-value extended property by using $expand or $filter.
创建多值扩展属性Create multi-value extended property outlookTaskoutlookTask 创建新的或现有 Outlook 任务中的一个或多个多值扩展的属性。Create one or more multi-value extended properties in a new or existing Outlook task.
获取与多值扩展属性的任务Get task with multi-value extended property outlookTaskoutlookTask 获取包含多值扩展的属性,通过使用 Outlook 任务$expandGet an Outlook task that contains a multi-value extended property by using $expand.

属性Properties

属性Property 类型Type 说明Description
assignedToassignedTo 字符串String 已分配任务的人员的名称。The name of the person who has been assigned the task.
bodybody itemBodyitemBody 任务正文通常包含有关任务的信息。The task body that typically contains information about the task. 请注意,仅 HTML 支持类型。Note that only HTML type is supported.
categoriescategories String collectionString collection 类别与任务关联。The categories associated with the task. 每个类别对应于用户已定义outlookCategorydisplayName属性。Each category corresponds to the displayName property of an outlookCategory that the user has defined.
changeKeychangeKey 字符串String 任务的版本。The version of the task.
completedDateTimecompletedDateTime dateTimeTimeZonedateTimeTimeZone 中指定的时区任务已完成的日期。The date in the specified time zone that the task was finished.
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 日期和时间创建任务时。The date and time when the task was created. 默认情况下,它是采用 UTC。By default, it is in UTC. 您可以提供请求标头中自定义时区。You can provide a custom time zone in the request header. 该属性值使用 ISO 8601 格式。The property value uses ISO 8601 format. 例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.
dueDateTimedueDateTime dateTimeTimeZonedateTimeTimeZone 在指定时区的任务完成日期。The date in the specified time zone that the task is to be finished.
hasAttachmentshasAttachments 布尔Boolean 设置为 true 如果任务的附件。Set to true if the task has attachments.
idid 字符串String 任务的唯一标识符。The unique identifier of the task. 只读。Read-only.
importanceimportance stringstring 事件的重要性。The importance of the event. 可取值为:lownormalhighPossible values are: low, normal, high.
isReminderOnisReminderOn 布尔Boolean 如果,设置为 true 设置通知提醒的用户的任务。Set to true if an alert is set to remind the user of the task.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 日期和上次修改任务的时间。The date and time when the task was last modified. 默认情况下,它是采用 UTC。By default, it is in UTC. 您可以提供请求标头中自定义时区。You can provide a custom time zone in the request header. 该属性值使用 ISO 8601 格式,并且始终处于 UTC 时间。The property value uses ISO 8601 format and is always in UTC time. 例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.
ownerowner 字符串String 创建任务的人员的名称。The name of the person who created the task.
parentFolderIdparentFolderId StringString 任务的父文件夹的唯一标识符。The unique identifier for the task's parent folder.
recurrencerecurrence patternedRecurrencepatternedRecurrence 定期模式的任务。The recurrence pattern for the task.
reminderDateTimereminderDateTime dateTimeTimeZonedateTimeTimeZone 发生的日期和时间的任务的提醒通知。The date and time for a reminder alert of the task to occur.
sensitivitysensitivity stringstring 指示任务的隐私级别。Indicates the level of privacy for the task. 可取值为:normalpersonalprivateconfidentialPossible values are: normal, personal, private, confidential.
startDateTimestartDateTime dateTimeTimeZonedateTimeTimeZone 在指定时区时的任务是开始日期。The date in the specified time zone when the task is to begin.
statusstatus stringstring 指示的状态或任务进度。Indicates the state or progress of the task. 可取值为:notStartedinProgresscompletedwaitingOnOthersdeferredPossible values are: notStarted, inProgress, completed, waitingOnOthers, deferred.
subjectsubject 字符串String 简要说明或任务的标题。A brief description or title of the task.

RelationshipsRelationships

关系Relationship 类型Type 说明Description
attachmentsattachments 附件 集合attachment collection FileAttachmentitemAttachmentreferenceAttachment附件任务的集合。The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the task. 只读。Read-only. 可为 Null。Nullable.
multiValueExtendedPropertiesmultiValueExtendedProperties multiValueLegacyExtendedProperty 集合multiValueLegacyExtendedProperty collection 多值定义任务的扩展属性的集合。The collection of multi-value extended properties defined for the task. 只读。Read-only. 可为 Null。Nullable.
singleValueExtendedPropertiessingleValueExtendedProperties singleValueLegacyExtendedProperty collectionsingleValueLegacyExtendedProperty collection 定义任务的单值扩展属性的集合。The collection of single-value extended properties defined for the task. 只读。Read-only. 可为 Null。Nullable.

JSON 表示形式JSON representation

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

{
  "assignedTo": "String",
  "body": {"@odata.type": "microsoft.graph.itemBody"},
  "categories": ["String"],
  "changeKey": "String",
  "completedDateTime": {"@odata.type": "microsoft.graph.dateTimeTimeZone"},
  "createdDateTime": "String (timestamp)",
  "dueDateTime": {"@odata.type": "microsoft.graph.dateTimeTimeZone"},
  "hasAttachments": true,
  "id": "String (identifier)",
  "importance": "string",
  "isReminderOn": true,
  "lastModifiedDateTime": "String (timestamp)",
  "owner": "String",
  "parentFolderId": "String",
  "recurrence": {"@odata.type": "microsoft.graph.patternedRecurrence"},
  "reminderDateTime": {"@odata.type": "microsoft.graph.dateTimeTimeZone"},
  "sensitivity": "string",
  "startDateTime": {"@odata.type": "microsoft.graph.dateTimeTimeZone"},
  "status": "string",
  "subject": "String"
}