Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
You can perform any table and column definition (metadata) operations by using the Web API that you can perform by using the SDK for .NET. This section provides guidance about how to use the Web API with the entity types included in Web API Metadata Entity Type Reference.
The Web API exposes four entity set paths to perform operations with definition entities, as described in the following table.
| Entity Set Path | Description |
|---|---|
[Organization URI]/api/data/v9.2/EntityDefinitions |
Contains a collection of EntityMetadata EntityType. |
[Organization URI]/api/data/v9.2/RelationshipDefinitions |
Contains ManyToManyRelationshipMetadata EntityType and OneToManyRelationshipMetadata EntityType as both inherit from RelationshipMetadataBase EntityType. |
[Organization URI]/api/data/v9.2/GlobalOptionSetDefinitions |
Contains a collection of globally defined BooleanOptionSetMetadata EntityType and OptionSetMetadata EntityType as both inherit from OptionSetMetadata EntityType. |
[Organization URI]/api/data/v9.2/ManagedPropertyDefinitions |
For internal use only |
Each definition entity type uses MetadataId as the unique identifier property, which it inherits from the MetadataBase EntityType. While all definition entities have a MetadataId, you can't query all of them directly. For example, you can query and perform operations on attributes (table columns) only in the context of the EntityMetadata entity that contains them.
These definition entities have some substantial differences from the tables that store business and application data, for example:
The properties for definition entities use many of the complex and enum types defined in Web API Complex Type Reference and Web API Enum Type Reference rather than the primitive data types used for properties in entities that inherit from crmbaseentity EntityType.
Definition entities follow a different naming convention and maintain the Pascal Case naming style used in the assemblies of the SDK for .NET.
Definition entities make more extensive use of inheritance, which requires that you might need to perform casts to retrieve the data that you want.
In this section
Query table definitions using the Web API
Use the Web API to query table or column definitions by using a RESTful query style.
Retrieve table definitions by name or MetadataId
Your applications can adapt to configuration changes by querying the table and column definitions. When you know one of the key properties of a definition item, you can retrieve definitions by using the Web API.
Create and update table definitions using the Web API
Use the Web API to create and update tables, so you get the same results as the SDK for .NET CreateEntityRequest and UpdateEntityRequest.
Create and update column definitions using the Web API
Use the Web API to create and update columns, so you get the same results as the SDK for .NET CreateAttributeRequest and UpdateAttributeRequest.
Create and update table relationships using the Web API
Use the Web API to check whether tables can participate in a relationship with other tables, and then create or update those relationships.
Multi-table lookups
Multi-table lookup type columns allow a user to use a specific table that has multiple one-to-many (1:N) relationships to other tables in the environment. A single lookup type column can refer to multiple other tables. A lookup value submitted to the multi-table type column matches a record in any of the related tables. You can create multitable lookups by using both local tables and virtual tables as referenced tables.
Create and update choices (option sets) using the Web API
Explains how to work with global and local choice columns. How to retrieve option values, add, update, delete, and reorder options.
See also
Browse the table definitions for your environment
Use the Microsoft Dataverse Web API
Web API HTTP table schema operations sample
Web API C# table schema operations sample
Web API PowerShell table schema operations sample