You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/webapi/compose-http-requests-handle-errors.md
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: "Compose HTTP requests and handle errors (Microsoft Dataverse)| Microsoft Docs"
3
-
description: "Read about the HTTP methods and headers that form a part of HTTP requests that interact with the Web API, and then learn how to identify and handle errors returned in the response"
3
+
description: "Read about the HTTP methods and headers that form a part of HTTP requests for the Web API, and then learn how to identify and handle errors returned in the response"
4
4
ms.custom: ""
5
-
ms.date: 04/21/2021
5
+
ms.date: 04/29/2021
6
6
ms.service: powerapps
7
7
ms.suite: ""
8
8
ms.tgt_pltfrm: ""
@@ -42,7 +42,7 @@ To access the Web API you must compose a URL using the parts in the following ta
42
42
|Base URL|`dynamics.com.`|
43
43
|Web API path|The path to the web API is `/api/data/`.|
44
44
|Version| The version is expressed this way: `v[Major_version].[Minor_version][PatchVersion]/`. The valid version for this release is `v9.1`.|
45
-
|Resource|The name of the entity, function, or action you want to use.|
45
+
|Resource|The name of the entity (table), function, or action you want to use.|
46
46
47
47
The URL you will use will be composed with these parts: Protocol + Environment Name + Region + Base URL + Web API path + Version + Resource.
48
48
@@ -105,13 +105,13 @@ You can use additional headers to enable specific capabilities.
105
105
106
106
- To return formatted values with a query, include the odata.include-annotations preference set to `Microsoft.Dynamics.CRM.formattedvalue` using the [Prefer](https://tools.ietf.org/html/rfc7240) header. More information:[Include formatted values](query-data-web-api.md#bkmk_includeFormattedValues)
107
107
108
-
- You also use the `Prefer` header with the `odata.maxpagesize` option to specify how many pages you want to return. More information:[Specify the number of entities to return in a page](query-data-web-api.md#bkmk_specifyNumber)
108
+
- You also use the `Prefer` header with the `odata.maxpagesize` option to specify how many pages you want to return. More information:[Specify the number of tables (entities) to return in a page](query-data-web-api.md#bkmk_specifyNumber)
109
109
110
-
- To impersonate another user when the caller has the privileges to do so, add the `CallerObjectId` header with the user's Azure Active Directory Object Id value of the user to impersonate. This data is in the [SystemUser entity](/reference/entities/systemuser)[AzureActiveDirectoryObjectId](/reference/entities/systemuser#BKMK_AzureActiveDirectoryObjectId) attribute. More information:[Impersonate another user using the Web API](impersonate-another-user-web-api.md).
110
+
- To impersonate another user when the caller has the privileges to do so, add the `CallerObjectId` header with the user's Azure Active Directory Object Id value of the user to impersonate. This data is in the [SystemUser table/entity](/reference/entities/systemuser)[AzureActiveDirectoryObjectId](/reference/entities/systemuser#BKMK_AzureActiveDirectoryObjectId) attribute (column). More information:[Impersonate another user using the Web API](impersonate-another-user-web-api.md).
111
111
112
112
- To apply optimistic concurrency, you can apply the [If-Match](https://tools.ietf.org/html/rfc7232#section-3.1) header with an `Etag` value. More information:[Apply optimistic concurrency](perform-conditional-operations-using-web-api.md#bkmk_Applyoptimisticconcurrency).
113
113
114
-
- To control whether an upsert operation should actually create or update an entity, you can also use the `If-Match` and [If-None-Match](https://tools.ietf.org/html/rfc7232#section-3.2) headers. More information:[Upsert an entity](update-delete-entities-using-web-api.md#bkmk_upsert).
114
+
- To control whether an upsert operation should actually create or update an entity, you can also use the `If-Match` and [If-None-Match](https://tools.ietf.org/html/rfc7232#section-3.2) headers. More information:[Upsert a table (entity)](update-delete-entities-using-web-api.md#bkmk_upsert).
115
115
116
116
- When you execute batch operations, you must apply a number of different headers in the request and with each part sent in the body. More information:[Execute batch operations using the Web API](execute-batch-operations-using-web-api.md).
117
117
@@ -288,16 +288,15 @@ This can also be done using the Organization Service: [Add a Shared Variable fro
288
288
### See also
289
289
290
290
[Perform operations using the Web API](perform-operations-web-api.md)<br />
291
-
[Query Data using the Web API](query-data-web-api.md)<br />
292
-
[Create an entity using the Web API](create-entity-web-api.md)<br />
293
-
[Retrieve an entity using the Web API](retrieve-entity-using-web-api.md)<br />
294
-
[Update and delete entities using the Web API](update-delete-entities-using-web-api.md)<br />
295
-
[Associate and disassociate entities using the Web API](associate-disassociate-entities-using-web-api.md)<br />
291
+
[Query data using the Web API](query-data-web-api.md)<br />
292
+
[Create a table (entity) using the Web API](create-entity-web-api.md)<br />
293
+
[Retrieve a table (entity) using the Web API](retrieve-entity-using-web-api.md)<br />
294
+
[Update and delete tables (entities) using the Web API](update-delete-entities-using-web-api.md)<br />
295
+
[Associate and disassociate tables (entities) using the Web API](associate-disassociate-entities-using-web-api.md)<br />
296
296
[Use Web API functions](use-web-api-functions.md)<br />
297
297
[Use Web API actions](use-web-api-actions.md)<br />
298
298
[Execute batch operations using the Web API](execute-batch-operations-using-web-api.md)<br />
299
299
[Impersonate another user using the Web API](impersonate-another-user-web-api.md)<br />
300
300
[Perform conditional operations using the Web API](perform-conditional-operations-using-web-api.md)
title: "Create and update option sets using the Web API (Microsoft Dataverse) | Microsoft Docs"
3
-
description: "Learn about creating and updating entity Microsoft Dataverse uses a metadata driven architecture to provide the flexibility to create custom entities and additional system entity attributes."
2
+
title: "Create and update choices (option sets) using the Web API (Microsoft Dataverse) | Microsoft Docs"
3
+
description: "Learn about creating and updating choices in Microsoft Dataverse."
4
4
ms.custom: ""
5
-
ms.date: 09/17/2020
5
+
ms.date: 04/29/2021
6
6
ms.service: powerapps
7
7
ms.suite: ""
8
8
ms.tgt_pltfrm: ""
@@ -21,21 +21,21 @@ search.app:
21
21
- D365CE
22
22
---
23
23
24
-
# Create and update option sets using the Web API
24
+
# Create and update choices (option sets) using the Web API
Typically, you use *global* option sets to set fields so that different fields can share the same set of options, which are maintained in one ___location. Unlike *local*options sets which are defined only for a specific attribute, you can reuse global option sets. You will also see them used in request parameters in a manner similar to an enumeration.
28
+
Typically, you use *global* option sets to set table columns so that different columns can share the same set of options, which are maintained in one ___location. Unlike *local*option sets which are defined only for a specific column, you can reuse global option sets. You will also see them used in request parameters in a manner similar to an enumeration.
29
29
30
30
When you define a global option set using a POST request to *[Organization URI]*`/api/data/v9.0/GlobalOptionSetDefinitions`,
31
31
we recommend that you let the system assign a value. You do this by passing a **null** value when you create the
32
32
new `OptionMetadata` instance. When you define an option, it will contain an option value prefix specific to the
33
33
context of the publisher set for the solution that the option set is created in.
34
34
This prefix helps reduce the chance of creating duplicate option sets for a managed solution,
35
-
and in any option sets that are defined in organizations where your managed solution is installed. For more information,
36
-
see [Merge option set options](/power-platform/alm/how-managed-solutions-merged#merge-option-set-options).
35
+
and in any option sets that are defined in environments where your managed solution is installed. For more information, see [Merge option set options](/power-platform/alm/how-managed-solutions-merged#merge-option-set-options).
36
+
37
+
## Messages
37
38
38
-
## Messages
39
39
The following table lists the messages that you can use with global option sets.
40
40
41
41
|Message|Web API Operation|
@@ -45,22 +45,20 @@ see [Merge option set options](/power-platform/alm/how-managed-solutions-merged#
45
45
|RetrieveAllOptionSets|Use `GET` request to *[Organization URI]*`/api/data/v9.0/GlobalOptionSetDefinitions`.|
46
46
|RetrieveOptionSet|Use `GET` request to *[Organization URI]*`/api/data/v9.0/GlobalOptionSetDefinitions(`*metadataid*`)`.|
47
47
48
-
49
48
The following table lists the messages you can use with local and global option sets
50
49
51
50
|Message|Web API Operation|
52
51
|--|--|
53
-
|DeleteOptionValue</br>Deletes one of the values in a global option set.|<xrefhref="Microsoft.Dynamics.CRM.DeleteOptionValue?text=DeleteOptionValue Action" />
54
-
|InsertOptionValue</br>Inserts a new option into a global option set.|<xrefhref="Microsoft.Dynamics.CRM.InsertOptionValue?text=InsertOptionValue Action" />|
55
-
|InsertStatusValue</br>Inserts a new option into the global option set used in the `Status`attribute.|<xrefhref="Microsoft.Dynamics.CRM.InsertStatusValue?text=InsertStatusValue Action" />|
56
-
|OrderOption</br>Changes the relative order of the options in an option set.|<xrefhref="Microsoft.Dynamics.CRM.OrderOption?text=OrderOption Action" />|
57
-
|UpdateOptionSet|Use `PUT` request with a <xrefhref="Microsoft.Dynamics.CRM.OptionSetMetadataBase?text=OptionSetMetadataBase EntityType" /> to *[Organization URI]*`/api/data/v9.0/GlobalOptionSetDefinitions(`*metadataid*`)`<br />Only those properties defined by the `OptionSetMetadataBase` can be updated. This does not include the options. Use other actions to make changes to options.|
58
-
|UpdateOptionValue</br>Updates an option in a global option set.|<xrefhref="Microsoft.Dynamics.CRM.UpdateOptionValue?text=UpdateOptionValue Action" />|
59
-
|UpdateStateValue</br>Inserts a new option into the option set used in the `Status`attribute.|<xrefhref="Microsoft.Dynamics.CRM.UpdateStateValue?text=UpdateStateValue Action" />|
52
+
|DeleteOptionValue<p/>Deletes one of the values in a global option set.|<xref:Microsoft.Dynamics.CRM.DeleteOptionValue?text=DeleteOptionValue Action />
53
+
|InsertOptionValue<p/>Inserts a new option into a global option set.|<xref:Microsoft.Dynamics.CRM.InsertOptionValue?text=InsertOptionValue Action />|
54
+
|InsertStatusValue<p/>Inserts a new option into the global option set used in the `Status`column.|<xref:Microsoft.Dynamics.CRM.InsertStatusValue?text=InsertStatusValue Action />|
55
+
|OrderOption<p/>Changes the relative order of the options in an option set.|<xref:Microsoft.Dynamics.CRM.OrderOption?text=OrderOption Action />|
56
+
|UpdateOptionSet|Use `PUT` request with a <xref:Microsoft.Dynamics.CRM.OptionSetMetadataBase?text=OptionSetMetadataBase EntityType /> to *[Organization URI]*`/api/data/v9.0/GlobalOptionSetDefinitions(`*metadataid*`)`<br />Only those properties defined by the `OptionSetMetadataBase` can be updated. This does not include the options. Use other actions to make changes to options.|
57
+
|UpdateOptionValue<p/>Updates an option in a global option set.|<xref:Microsoft.Dynamics.CRM.UpdateOptionValue?text=UpdateOptionValue Action />|
58
+
|UpdateStateValue<p/>Inserts a new option into the option set used in the `Status`column.|<xref:Microsoft.Dynamics.CRM.UpdateStateValue?text=UpdateStateValue Action />|
0 commit comments