編輯

共用方式為


Update businessScenarioTask

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Update the properties of a businessScenarioTask object.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) BusinessScenarioData.ReadWrite.OwnedBy Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application BusinessScenarioData.ReadWrite.OwnedBy Not available.

HTTP request

PATCH /solutions/businessScenarios/{businessScenarioId}/planner/tasks/{businessScenarioTaskId}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.
If-Match Last known ETag value for the businessScenarioTask to be updated. Required.

Request body

In the request body, supply only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.

The following table specifies the properties that can be updated.

Property Type Description
appliedCategories plannerAppliedCategories The categories to which the task has been applied. For possible values, see plannerAppliedCategories. Inherited from plannerTask.
assigneePriority String Hint used to order items of this type in a list view. For details about the supported format, see Using order hints in Planner. Inherited from plannerTask.
assignments plannerAssignments The set of assignees the task is assigned to. Inherited from plannerTask.
bucketId String Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It's 28 characters long and case-sensitive. The format validation is done on the service. Inherited from plannerTask.
businessScenarioProperties businessScenarioProperties Scenario-specific properties of the task. Optional.
conversationThreadId String Thread ID of the conversation on the task. This is the ID of the conversation thread object created in the group. Inherited from plannerTask.
dueDateTime DateTimeOffset Date and time at which the task is due. 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 is 2014-01-01T00:00:00Z. Inherited from plannerTask.
orderHint String Hint used to order items of this type in a list view. For details about the supported format, see Using order hints in Planner. Inherited from plannerTask.
percentComplete Int32 Percentage of task completion. When set to 100, the task is considered completed. Inherited from plannerTask.
planId String Identifier of the plan to which the task belongs. Inherited from plannerTask.
priority Int32 Priority of the task. Valid range of values is between 0 and 10 (inclusive), with increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as "urgent", 2, 3, and 4 as "important", 5, 6, and 7 as "medium", and 8, 9, and 10 as "low". Currently, Planner sets the value 1 for "urgent", 3 for "important", 5 for "medium", and 9 for "low". Inherited from plannerTask.
startDateTime DateTimeOffset Date and time at which the task starts. 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 is 2014-01-01T00:00:00Z. Inherited from plannerTask.
target businessScenarioTaskTargetBase Target of the task that specifies where the task should be placed. Optional.
title String Title of the task. Inherited from plannerTask.

Response

If successful, this method returns a 200 OK response code and an updated businessScenarioTask object in the response body.

Examples

Request

The following example shows a request.

PATCH https://graph.microsoft.com/beta/solutions/businessScenarios/c5d514e6c6864911ac46c720affb6e4d/planner/tasks/pmc1rS1Io0C3rXQhyXIsNmUAOeIi
Content-Type: application/json
If-Match: W/"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc="

{
  "title": "Customer order #12010",
  "percentComplete": 20,
  "priority": 1,
  "businessScenarioProperties": {
    "externalObjectVersion": "000003"
  }
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.businessScenarioTask",
  "title": "Customer order #12010",
  "percentComplete": 20,
  "priority": 1,
  "id": "pmc1rS1Io0C3rXQhyXIsNmUAOeIi",
  "target": {
    "@odata.type": "microsoft.graph.businessScenarioGroupTarget",
    "taskTargetKind": "group",
    "groupId": "7a339254-4b2b-4410-b295-c890a16776ee"
  },
  "businessScenarioProperties": {
    "externalObjectId": "Order#12010",
    "externalContextId": "Warehouse-CA-36",
    "externalObjectVersion": "000003",
    "webUrl": "https://ordertracking.contoso.com/view?id=12010",
    "externalBucketId": "deliveryBucket"
  }
}