Skip to content

Commit 9c6a24f

Browse files
authored
Merge pull request #26226 from microsoftgraph/list-tasks
Update List Tasks in Business Scenario to require one filter, update …
2 parents cc4e247 + e645188 commit 9c6a24f

File tree

2 files changed

+21
-86
lines changed

2 files changed

+21
-86
lines changed

api-reference/beta/api/businessscenarioplanner-list-tasks.md

Lines changed: 19 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ Choose the permission or permissions marked as least privileged for this API. Us
3030
}
3131
-->
3232
``` http
33-
GET /solutions/businessScenarios/{businessScenarioId}/planner/tasks
33+
GET /solutions/businessScenarios/{businessScenarioId}/planner/tasks?$filter=businessScenarioProperties/externalObjectId eq '{externalObjectId}'
34+
GET /solutions/businessScenarios/{businessScenarioId}/planner/tasks?$filter=businessScenarioProperties/externalContextId eq '{externalContextId}'
35+
GET /solutions/businessScenarios/{businessScenarioId}/planner/tasks?$filter=target/microsoft.graph.businessScenarioGroupTarget/groupId eq '{groupId}'
3436
```
3537

36-
## Optional query parameters
38+
## Query parameters
3739

38-
This method supports some of the OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters). You can query tasks with their context ID or location as filters.
40+
This method requires the `$filter` (`eq`) query parameter to scope the request to an **externalObjectId**, **externalContextId**, or a **groupId**.
41+
42+
This method supports some of the OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters).
3943

4044
## Request headers
4145

@@ -53,59 +57,24 @@ If successful, this method returns a `200 OK` response code and a collection of
5357

5458
## Examples
5559

56-
### Example 1: Get all tasks for a scenario
60+
### Example 1: Get tasks associated with a specific externalObjectId
5761

58-
The following example shows a request that gets all tasks related to a scenario.
62+
The following example shows a request that gets all tasks associated with a specific external ID.
5963

6064
#### Request
6165

6266
The following example shows a request.
6367

64-
# [HTTP](#tab/http)
6568
<!-- {
6669
"blockType": "request",
6770
"name": "list_businessscenariotask_e1",
6871
"sampleKeys": ["c5d514e6c6864911ac46c720affb6e4d"]
6972
}
7073
-->
7174
``` http
72-
GET https://graph.microsoft.com/beta/solutions/businessScenarios/c5d514e6c6864911ac46c720affb6e4d/planner/tasks
75+
GET https://graph.microsoft.com/beta/solutions/businessScenarios/c5d514e6c6864911ac46c720affb6e4d/planner/tasks?$filter=businessScenarioProperties/externalObjectId eq 'Order#12010'
7376
```
7477

75-
# [C#](#tab/csharp)
76-
[!INCLUDE [sample-code](../includes/snippets/csharp/list-businessscenariotask-e1-csharp-snippets.md)]
77-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
78-
79-
# [CLI](#tab/cli)
80-
[!INCLUDE [sample-code](../includes/snippets/cli/list-businessscenariotask-e1-cli-snippets.md)]
81-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
82-
83-
# [Go](#tab/go)
84-
[!INCLUDE [sample-code](../includes/snippets/go/list-businessscenariotask-e1-go-snippets.md)]
85-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
86-
87-
# [Java](#tab/java)
88-
[!INCLUDE [sample-code](../includes/snippets/java/list-businessscenariotask-e1-java-snippets.md)]
89-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
90-
91-
# [JavaScript](#tab/javascript)
92-
[!INCLUDE [sample-code](../includes/snippets/javascript/list-businessscenariotask-e1-javascript-snippets.md)]
93-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
94-
95-
# [PHP](#tab/php)
96-
[!INCLUDE [sample-code](../includes/snippets/php/list-businessscenariotask-e1-php-snippets.md)]
97-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
98-
99-
# [PowerShell](#tab/powershell)
100-
[!INCLUDE [sample-code](../includes/snippets/powershell/list-businessscenariotask-e1-powershell-snippets.md)]
101-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
102-
103-
# [Python](#tab/python)
104-
[!INCLUDE [sample-code](../includes/snippets/python/list-businessscenariotask-e1-python-snippets.md)]
105-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
106-
107-
---
108-
10978
#### Response
11079

11180
The following example shows the response.
@@ -129,16 +98,16 @@ Content-Type: application/json
12998
"priority": 5,
13099
"id": "pmc1rS1Io0C3rXQhyXIsNmUAOeIi",
131100
"target": {
132-
"@odata.type": "microsoft.graph.businessScenarioGroupTarget",
133-
"taskTargetKind": "group",
134-
"groupId": "7a339254-4b2b-4410-b295-c890a16776ee"
101+
"@odata.type": "microsoft.graph.businessScenarioGroupTarget",
102+
"taskTargetKind": "group",
103+
"groupId": "7a339254-4b2b-4410-b295-c890a16776ee"
135104
},
136105
"businessScenarioProperties": {
137-
"externalObjectId": "Order#12010",
138-
"externalContextId": "Warehouse-CA-36",
139-
"externalObjectVersion": "000001",
140-
"webUrl": "https://ordertracking.contoso.com/view?id=12010",
141-
"externalBucketId": "deliveryBucket"
106+
"externalObjectId": "Order#12010",
107+
"externalContextId": "Warehouse-CA-36",
108+
"externalObjectVersion": "000001",
109+
"webUrl": "https://ordertracking.contoso.com/view?id=12010",
110+
"externalBucketId": "deliveryBucket"
142111
}
143112
}
144113
]
@@ -245,51 +214,16 @@ The following example shows a request that gets all tasks created in a specific
245214

246215
The following example shows a request.
247216

248-
# [HTTP](#tab/http)
249217
<!-- {
250218
"blockType": "request",
251219
"name": "list_businessscenariotask_e3",
252220
"sampleKeys": ["c5d514e6c6864911ac46c720affb6e4d"]
253221
}
254222
-->
255223
``` http
256-
GET https://graph.microsoft.com/beta/solutions/businessScenarios/c5d514e6c6864911ac46c720affb6e4d/planner/tasks?$filter=location/microsoft.graph.businessScenarioGroupTarget/groupId eq '7a339254-4b2b-4410-b295-c890a16776ee'
224+
GET https://graph.microsoft.com/beta/solutions/businessScenarios/c5d514e6c6864911ac46c720affb6e4d/planner/tasks?$filter=target/microsoft.graph.businessScenarioGroupTarget/groupId eq '7a339254-4b2b-4410-b295-c890a16776ee'
257225
```
258226

259-
# [C#](#tab/csharp)
260-
[!INCLUDE [sample-code](../includes/snippets/csharp/list-businessscenariotask-e3-csharp-snippets.md)]
261-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
262-
263-
# [CLI](#tab/cli)
264-
[!INCLUDE [sample-code](../includes/snippets/cli/list-businessscenariotask-e3-cli-snippets.md)]
265-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
266-
267-
# [Go](#tab/go)
268-
[!INCLUDE [sample-code](../includes/snippets/go/list-businessscenariotask-e3-go-snippets.md)]
269-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
270-
271-
# [Java](#tab/java)
272-
[!INCLUDE [sample-code](../includes/snippets/java/list-businessscenariotask-e3-java-snippets.md)]
273-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
274-
275-
# [JavaScript](#tab/javascript)
276-
[!INCLUDE [snippet-not-available](../includes/snippets/snippet-not-available.md)]
277-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
278-
279-
# [PHP](#tab/php)
280-
[!INCLUDE [sample-code](../includes/snippets/php/list-businessscenariotask-e3-php-snippets.md)]
281-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
282-
283-
# [PowerShell](#tab/powershell)
284-
[!INCLUDE [sample-code](../includes/snippets/powershell/list-businessscenariotask-e3-powershell-snippets.md)]
285-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
286-
287-
# [Python](#tab/python)
288-
[!INCLUDE [sample-code](../includes/snippets/python/list-businessscenariotask-e3-python-snippets.md)]
289-
[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]
290-
291-
---
292-
293227
#### Response
294228

295229
The following example shows the response.

concepts/whats-new-overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ Added [teamsMessageEvidence](/graph/api/resources/security-teamsmessageevidence?
5858

5959
### Tasks and plans
6060

61-
[List Planner plans](/graph/api/teamschannelplanner-list-plans?view=graph-rest-beta&preserve-view=true) owned by a shared channel in Teams.
61+
- [List Planner plans](/graph/api/teamschannelplanner-list-plans?view=graph-rest-beta&preserve-view=true) owned by a shared channel in Teams.
62+
- Updated the request URL of the [List businessScenarioTasks](/graph/api/businessscenarioplanner-list-tasks?view=graph-rest-beta&preserve-view=true) method to require the `$filter` query parameter to scope the request to an **externalObjectId**, **externalContextId**, or a **groupId**.
6263

6364
### Teamwork and communications | Messaging
6465

0 commit comments

Comments
 (0)