Skip to content

Commit 66bdfaf

Browse files
committed
check
1 parent c8c2ca1 commit 66bdfaf

15 files changed

+71
-66
lines changed

powerapps-docs/developer/data-platform/webapi/associate-disassociate-entities-using-web-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ The following example shows how to associate multiple existing [ActivityParty](.
271271
**Request:**
272272
273273
```HTTP
274-
PUT [Organization URI]/api/data/v9.0/emails(2479d20d-3a39-e711-8145-e0071b6a2001)/email_activity_parties
274+
PUT [Organization URI]/api/data/v9.2/emails(2479d20d-3a39-e711-8145-e0071b6a2001)/email_activity_parties
275275
Content-Type: application/json
276276
Accept: application/json
277277
OData-MaxVersion: 4.0

powerapps-docs/developer/data-platform/webapi/compose-http-requests-handle-errors.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Compose HTTP requests and handle errors
33
description: Learn about the HTTP methods and headers that form a part of HTTP requests for the Web API and how to identify and handle errors returned in the response.
44
ms.topic: how-to
5-
ms.date: 09/26/2023
5+
ms.date: 08/29/2024
66
author: MicroSri
77
ms.author: sriknair
88
ms.reviewer: jdaly
@@ -51,9 +51,11 @@ Protocol + Environment Name + Region + Base URL + Web API path + Version + Resou
5151

5252
The maximum length of URL accepted by is 32 KB (32768 characters). This should be adequate for most kinds of request except certain `GET` operations which require very long string query parameters, such as queries using FetchXml. If you send requests inside the body of a `$batch` request, you can send requests with URLs up to 64 KB (65,536 characters). [Learn more about sending FetchXml within a $batch request](../fetchxml/retrieve-data.md#use-fetchxml-within-a-batch-request).
5353

54-
### Maximum OData Segment length
54+
### Maximum OData segment length
5555

56-
The maximum length of any individual segment in an odata request cannot be longer than 260 characters. If a single segment of the odata request is more than 260 characters in length, then this can result in 400 Bad Request - Invalid URL. The segment is the 'Resource' part of the url as described above and includes all characters needed to describe the endpoint and any inline paramters. i.e. for the request `api/data/v9.0/MyApi(MyParameter='longvalue')`, `MyApi(MyParameter='longvalue')` is the segment that cannot exceed 260 characters. One work around is to use parameter aliasing like `<org>/api/data/v9.0/MyApi(MyParameter=@alias)?@alias='longvalue'` which shortens the segment to just `MyApi(MyParameter=@alias)`. An alternate work around is to use the $batch API to pass the request. [Learn more about sending FetchXml within a $batch request](../fetchxml/retrieve-data.md#use-fetchxml-within-a-batch-request)
56+
The maximum length of any individual segment in an OData request cannot be longer than 260 characters. If a single segment of the OData request is more than 260 characters in length, then this can result in `400 Bad Request - Invalid URL`. The segment is the 'Resource' part of the url as described above and includes all characters needed to describe the endpoint and any inline parameters.
57+
58+
For example, if the request is `api/data/v9.2/MyApi(MyParameter='longvalue')`, `MyApi(MyParameter='longvalue')` is the segment that cannot exceed 260 characters. We recommend that you always use parameter aliases with OData functions. For example, composing your function as `/api/data/v9.2/MyApi(MyParameter=@alias)?@alias='longvalue'` shortens the segment to just `MyApi(MyParameter=@alias)`. [Learn more about using parameter aliases with Web API functions](use-web-api-functions.md#passing-parameters-to-a-function)
5759

5860
<a name="version_compatiblity"></a>
5961

@@ -242,7 +244,7 @@ When this plug-in is registered on the Create message of an account entity, and
242244
**Request:**
243245

244246
```http
245-
POST https://yourorg.api.crm.dynamics.com/api/data/v9.1/accounts HTTP/1.1
247+
POST https://yourorg.api.crm.dynamics.com/api/data/v9.2/accounts HTTP/1.1
246248
Content-Type: application/json;
247249
Prefer: odata.include-annotations="*"
248250
{

powerapps-docs/developer/data-platform/webapi/create-entity-web-api.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Use a `POST` request to send data to create a table row (entity record). You can
3232

3333
```http
3434
35-
POST [Organization URI]/api/data/v9.0/accounts
35+
POST [Organization URI]/api/data/v9.2/accounts
3636
Content-Type: application/json; charset=utf-8
3737
OData-MaxVersion: 4.0
3838
OData-Version: 4.0
@@ -54,7 +54,7 @@ Accept: application/json
5454
5555
HTTP/1.1 204 No Content
5656
OData-Version: 4.0
57-
OData-EntityId: [Organization URI]/api/data/v9.0/accounts(7eb682f1-ca75-e511-80d4-00155d2a68d1)
57+
OData-EntityId: [Organization URI]/api/data/v9.2/accounts(7eb682f1-ca75-e511-80d4-00155d2a68d1)
5858
5959
```
6060

@@ -84,7 +84,7 @@ This example creates a new account entity and returns the requested data in the
8484

8585
```http
8686
87-
POST [Organization URI]/api/data/v9.0/accounts?$select=name,creditonhold,address1_latitude,description,revenue,accountcategorycode,createdon
87+
POST [Organization URI]/api/data/v9.2/accounts?$select=name,creditonhold,address1_latitude,description,revenue,accountcategorycode,createdon
8888
OData-MaxVersion: 4.0
8989
OData-Version: 4.0
9090
Accept: application/json
@@ -111,7 +111,7 @@ Preference-Applied: return=representation
111111
OData-Version: 4.0
112112
113113
{
114-
"@odata.context": "[Organization URI]/api/data/v9.0/$metadata#accounts/$entity",
114+
"@odata.context": "[Organization URI]/api/data/v9.2/$metadata#accounts/$entity",
115115
"@odata.etag": "W/\"536530\"",
116116
"accountid": "d6f193fc-ce85-e611-80d8-00155d2a68de",
117117
"accountcategorycode": 1,
@@ -158,7 +158,7 @@ More information:
158158
**Request:**
159159

160160
```http
161-
POST [Organization URI]/api/data/v9.0/accounts
161+
POST [Organization URI]/api/data/v9.2/accounts
162162
Content-Type: application/json; charset=utf-8
163163
OData-MaxVersion: 4.0
164164
OData-Version: 4.0
@@ -191,7 +191,7 @@ Accept: application/json
191191
192192
HTTP/1.1 204 No Content
193193
OData-Version: 4.0
194-
OData-EntityId: [Organization URI]/api/data/v9.0/accounts(3c6e4b5f-86f6-e411-80dd-00155d2a68cb)
194+
OData-EntityId: [Organization URI]/api/data/v9.2/accounts(3c6e4b5f-86f6-e411-80dd-00155d2a68cb)
195195
196196
```
197197

@@ -209,7 +209,7 @@ This request is using the `Prefer: return=representation` header so it returns t
209209

210210
```http
211211
212-
POST [Organization URI]/api/data/v9.0/accounts?$select=name&$expand=primarycontactid($select=fullname),Account_Tasks($select=subject)
212+
POST [Organization URI]/api/data/v9.2/accounts?$select=name&$expand=primarycontactid($select=fullname),Account_Tasks($select=subject)
213213
Content-Type: application/json; charset=utf-8
214214
OData-MaxVersion: 4.0
215215
OData-Version: 4.0
@@ -236,7 +236,7 @@ OData-Version: 4.0
236236
Preference-Applied: return=representation
237237
238238
{
239-
"@odata.context": "[Organization URI]/api/data/v9.1/$metadata#accounts(name,primarycontactid(fullname),Account_Tasks(subject))/$entity",
239+
"@odata.context": "[Organization URI]/api/data/v9.2/$metadata#accounts(name,primarycontactid(fullname),Account_Tasks(subject))/$entity",
240240
"@odata.etag": "W/\"36236432\"",
241241
"name": "Sample Account",
242242
"accountid": "00000000-0000-0000-0000-000000000004",
@@ -289,7 +289,7 @@ Use the [InitializeFrom function](xref:Microsoft.Dynamics.CRM.InitializeFrom) to
289289

290290
To determine whether two entities can be mapped, use the following query:
291291

292-
`GET [Organization URI]/api/data/v9.1/entitymaps?$select=sourceentityname,targetentityname&$orderby=sourceentityname`
292+
`GET [Organization URI]/api/data/v9.2/entitymaps?$select=sourceentityname,targetentityname&$orderby=sourceentityname`
293293

294294
Creating a new record from another record is a two-step process. First, use the `InitializeFrom` function to return property values mapped from the original record. Then, combine the response data returned in the `InitializeFrom` function with any changes you want to make and then `POST` the data to create the record.
295295

@@ -300,7 +300,7 @@ The following example shows how to create an account record using the values of
300300
**Request:**
301301

302302
```http
303-
GET [Organization URI]/api/data/v9.0/InitializeFrom(EntityMoniker=@p1,TargetEntityName=@p2,TargetFieldType=@p3)?@p1={'@odata.id':'accounts(00000000-0000-0000-0000-000000000001)'}&@p2='account'&@p3=Microsoft.Dynamics.CRM.TargetFieldType'ValidForCreate'
303+
GET [Organization URI]/api/data/v9.2/InitializeFrom(EntityMoniker=@p1,TargetEntityName=@p2,TargetFieldType=@p3)?@p1={'@odata.id':'accounts(00000000-0000-0000-0000-000000000001)'}&@p2='account'&@p3=Microsoft.Dynamics.CRM.TargetFieldType'ValidForCreate'
304304
If-None-Match: null
305305
OData-Version: 4.0
306306
OData-MaxVersion: 4.0
@@ -312,7 +312,7 @@ Accept: application/json
312312

313313
```json
314314
{
315-
"@odata.context": "[Organization URI]/api/data/v9.0/$metadata#accounts/$entity",
315+
"@odata.context": "[Organization URI]/api/data/v9.2/$metadata#accounts/$entity",
316316
"@odata.type": "#Microsoft.Dynamics.CRM.account",
317317
"[email protected]": "accounts(00000000-0000-0000-0000-000000000001)",
318318
"[email protected]": "transactioncurrencies(732e87e1-1d96-e711-80e4-00155db75426)",
@@ -331,14 +331,14 @@ The response received from `InitializeFrom` function consists of values of mappe
331331
Other property values can also be set and/or modified for the new record by adding them in the JSON request body, as shown in the following example:
332332

333333
```http
334-
POST [Organization URI]/api/data/v9.0/accounts
334+
POST [Organization URI]/api/data/v9.2/accounts
335335
Content-Type: application/json; charset=utf-8
336336
OData-MaxVersion: 4.0
337337
OData-Version: 4.0
338338
Accept: application/json
339339
340340
{
341-
"@odata.context": "[Organization URI]/api/data/v9.0/$metadata#accounts/$entity",
341+
"@odata.context": "[Organization URI]/api/data/v9.2/$metadata#accounts/$entity",
342342
"@odata.type": "#Microsoft.Dynamics.CRM.account",
343343
"[email protected]": "accounts(00000000-0000-0000-0000-000000000001)",
344344
"[email protected]": "transactioncurrencies(732e87e1-1d96-e711-80e4-00155db75426)",

powerapps-docs/developer/data-platform/webapi/impersonate-another-user-web-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ There are two ways you can impersonate a user, both of which are made possible b
4242
**Request:**
4343

4444
```http
45-
POST [Organization URI]/api/data/v9.0/accounts HTTP/1.1
45+
POST [Organization URI]/api/data/v9.2/accounts HTTP/1.1
4646
CallerObjectId: e39c5d16-675b-48d1-8e67-667427e9c084
4747
Accept: application/json
4848
Content-Type: application/json; charset=utf-8
@@ -57,7 +57,7 @@ OData-Version: 4.0
5757
```http
5858
HTTP/1.1 204 No Content
5959
OData-Version: 4.0
60-
OData-EntityId: [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-000000000003)
60+
OData-EntityId: [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-000000000003)
6161
```
6262

6363
<a name="bkmk_Determinetheactualuser"></a>
@@ -69,7 +69,7 @@ When an operation such as creating an entity is performed using impersonation, y
6969
**Request:**
7070

7171
```http
72-
GET [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-000000000003)?$select=name&$expand=createdby($select=fullname),createdonbehalfby($select=fullname),owninguser($select=fullname) HTTP/1.1
72+
GET [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-000000000003)?$select=name&$expand=createdby($select=fullname),createdonbehalfby($select=fullname),owninguser($select=fullname) HTTP/1.1
7373
Accept: application/json
7474
OData-MaxVersion: 4.0
7575
OData-Version: 4.0
@@ -83,7 +83,7 @@ Content-Type: application/json; odata.metadata=minimal
8383
ETag: W/"506868"
8484
8585
{
86-
"@odata.context": "[Organization URI]/api/data/v9.0/$metadata#accounts(name,createdby(fullname,azureactivedirectoryobjectid),createdonbehalfby(fullname,azureactivedirectoryobjectid),owninguser(fullname,azureactivedirectoryobjectid))/$entity",
86+
"@odata.context": "[Organization URI]/api/data/v9.2/$metadata#accounts(name,createdby(fullname,azureactivedirectoryobjectid),createdonbehalfby(fullname,azureactivedirectoryobjectid),owninguser(fullname,azureactivedirectoryobjectid))/$entity",
8787
"@odata.etag": "W/\"2751197\"",
8888
"name": "Sample Account created using impersonation",
8989
"accountid": "00000000-0000-0000-000000000003",

powerapps-docs/developer/data-platform/webapi/manage-duplicate-detection-create-update.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following example shows how to detect duplicates during `Create` and `Update
3939
**Request:**
4040

4141
```http
42-
POST [Organization URI]/org1/api/data/v9.0/leads HTTP/1.1
42+
POST [Organization URI]/org1/api/data/v9.2/leads HTTP/1.1
4343
If-None-Match: null
4444
OData-Version: 4.0
4545
OData-MaxVersion: 4.0
@@ -86,7 +86,7 @@ The example shown below attempts to update an existing lead entity record which
8686
**Request:**
8787

8888
```http
89-
PATCH [Organization URI]/api/data/v9.0/leads(c4567bb6-47a3-e711-811b-e0071b6ac1b1) HTTP/1.1
89+
PATCH [Organization URI]/api/data/v9.2/leads(c4567bb6-47a3-e711-811b-e0071b6ac1b1) HTTP/1.1
9090
If-None-Match: null
9191
OData-Version: 4.0
9292
OData-MaxVersion: 4.0

powerapps-docs/developer/data-platform/webapi/merge-entity-using-web-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This example merges two account entity records while updating `accountnumber` pr
4646
**Request:**
4747

4848
```http
49-
POST [Organization URI]/api/data/v9.0/Merge HTTP/1.1
49+
POST [Organization URI]/api/data/v9.2/Merge HTTP/1.1
5050
Content-Type: application/json; charset=utf-8
5151
OData-MaxVersion: 4.0
5252
OData-Version: 4.0

powerapps-docs/developer/data-platform/webapi/multitable-lookup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ The following JSON is the body of the response from the HTTP `POST` request cont
168168
```json
169169
{
170170
    "@odata.context":
171-
"http://<organization URL>/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.CreatePolymorphicLookupAttributeResponse",
171+
"http://<organization URL>/api/data/v9.2/$metadata#Microsoft.Dynamics.CRM.CreatePolymorphicLookupAttributeResponse",
172172

173173
    "RelationshipIds":[
174174
        "77d4c6e9-0397-eb11-a81c-000d3a6cfaba",
@@ -203,7 +203,7 @@ The following table lists the operations relevant for table and attribute data.
203203
The following example request that creates a new record with two rows.
204204

205205
```http
206-
POST [OrganizationUrl]/api/data/v9.1/new_checkouts
206+
POST [OrganizationUrl]/api/data/v9.2/new_checkouts
207207
```
208208

209209
```http

powerapps-docs/developer/data-platform/webapi/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Use the Microsoft Dataverse Web API (Dataverse)| Microsoft Docs"
33
description: "The Microsoft Dataverse Web API implements the OData v4 protocol and provides a development experience that can be used across a wide variety of programming languages, platforms, and devices"
4-
ms.date: 06/20/2023
4+
ms.date: 08/29/2024
55
author: MicroSri
66
ms.author: sriknair
77
ms.reviewer: jdaly
@@ -32,7 +32,7 @@ The Web API allows you to do all the same operations as the SDK for .NET but pre
3232

3333
Now that you have read an overview of the Web API, proceed to the [Get started with Dataverse Web API](get-started-dynamics-365-web-api-csharp.md) topic to learn how to write your first C# program in Visual Studio that uses the Web API.
3434

35-
If you are a JavaScript developer and want to use the Web API in model-driven apps, navigate to [Client-side JavaScript using Web API in model-driven apps](get-started-web-api-client-side-javascript.md).
35+
If you are a JavaScript developer and want to use the Web API in model-driven apps, look at [Client-side JavaScript using Web API in model-driven apps](get-started-web-api-client-side-javascript.md).
3636

3737
### Related Sections
3838

powerapps-docs/developer/data-platform/webapi/perform-conditional-operations-using-web-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The following example message pair returns data for an account record with the `
4545
**Request:**
4646

4747
```http
48-
GET [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-0000-000000000001)?$select=accountcategorycode,accountnumber,creditonhold,createdon,numberofemployees,name,revenue HTTP/1.1
48+
GET [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-0000-000000000001)?$select=accountcategorycode,accountnumber,creditonhold,createdon,numberofemployees,name,revenue HTTP/1.1
4949
Accept: application/json
5050
OData-MaxVersion: 4.0
5151
OData-Version: 4.0
@@ -67,7 +67,7 @@ The following sections describe limitations to using conditional retrievals.
6767
Check if an table has optimistic concurrency enabled using the following Web API request. Tables that have optimistic concurrency enabled have [EntityMetadata.IsOptimisticConcurrencyEnabled](xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.IsOptimisticConcurrencyEnabled) property set to `true`.
6868

6969
```http
70-
GET [Organization URI]/api/data/v9.0/EntityDefinitions(LogicalName='<Entity Logical Name>')?$select=IsOptimisticConcurrencyEnabled
70+
GET [Organization URI]/api/data/v9.2/EntityDefinitions(LogicalName='<Entity Logical Name>')?$select=IsOptimisticConcurrencyEnabled
7171
```
7272

7373
### Query must not include $expand
@@ -95,7 +95,7 @@ If you're updating data and there's some possibility that the record was deleted
9595
**Request:**
9696

9797
```http
98-
PATCH [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
98+
PATCH [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
9999
Content-Type: application/json
100100
OData-MaxVersion: 4.0
101101
OData-Version: 4.0
@@ -137,7 +137,7 @@ If you're inserting data, there's some possibility that a record with the same `
137137
**Request:**
138138

139139
```http
140-
PATCH [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
140+
PATCH [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
141141
Content-Type: application/json
142142
OData-MaxVersion: 4.0
143143
OData-Version: 4.0
@@ -184,7 +184,7 @@ The following delete request for an account with `accountid` of`00000000-0000-00
184184
**Request:**
185185

186186
```http
187-
DELETE [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
187+
DELETE [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
188188
If-Match: W/"470867"
189189
Accept: application/json
190190
OData-MaxVersion: 4.0
@@ -214,7 +214,7 @@ The following update request for an account with `accountid` of `00000000-0000-0
214214
**Request:**
215215

216216
```http
217-
PATCH [Organization URI]/api/data/v9.0/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
217+
PATCH [Organization URI]/api/data/v9.2/accounts(00000000-0000-0000-0000-000000000001) HTTP/1.1
218218
If-Match: W/"470867"
219219
Accept: application/json
220220
OData-MaxVersion: 4.0

powerapps-docs/developer/data-platform/webapi/retrieve-and-execute-predefined-queries.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,27 @@ Dataverse allows you to define, save, and execute two types of queries as listed
5454
Records for both of these types of entities contain the FetchXML definition for the data to return. You can query the respective entity type to retrieve the primary key value. With the primary key value, you can execute the query by passing the primary key value. For example, to execute the **Active Accounts** saved query, you must first get the primary key using a query like this.
5555

5656
```http
57-
GET [Organization URI]/api/data/v9.0/savedqueries?$select=name,savedqueryid&$filter=name eq 'Active Accounts'
57+
GET [Organization URI]/api/data/v9.2/savedqueries?$select=name,savedqueryid&$filter=name eq 'Active Accounts'
5858
```
5959

6060
You can then use the `savedqueryid` value and pass it as the value to the savedQuery parameter to the accounts entity set.
6161

6262
```http
63-
GET [Organization URI]/api/data/v9.0/accounts?savedQuery=00000000-0000-0000-00aa-000010001002
63+
GET [Organization URI]/api/data/v9.2/accounts?savedQuery=00000000-0000-0000-00aa-000010001002
6464
```
6565

6666
Use the same approach to get the `userqueryid` and pass it as the value to the `userQuery` parameter to the entity set that matches the corresponding `returnedtypecode` of the saved query.
6767

6868
```http
69-
GET [Organization URI]/api/data/v9.0/accounts?userQuery=121c6fd8-1975-e511-80d4-00155d2a68d1
69+
GET [Organization URI]/api/data/v9.2/accounts?userQuery=121c6fd8-1975-e511-80d4-00155d2a68d1
7070
```
7171

7272
### Apply a query to any collection of the appropriate type
7373

7474
In addition to simply applying the saved query to the main entity set collection, you can also use a saved query or user query to apply the same filtering on any collection of the appropriate type of entities. For example, if you want to apply a query against just the entities related to a specific entity, you can apply the same pattern. For example, the following URL will apply the **Open Opportunities** query against the opportunities related to a specific account via the `opportunity_parent_account` collection-valued navigation property.
7575

7676
```http
77-
GET [Organization URI]/api/data/v9.0/accounts(8f390c24-9c72-e511-80d4-00155d2a68d1)/opportunity_parent_account/?savedQuery=00000000-0000-0000-00aa-000010003001
77+
GET [Organization URI]/api/data/v9.2/accounts(8f390c24-9c72-e511-80d4-00155d2a68d1)/opportunity_parent_account/?savedQuery=00000000-0000-0000-00aa-000010003001
7878
```
7979
## See also
8080

0 commit comments

Comments
 (0)