You need to query Dataverse metadata for the email address attribute in the Accounts table.
Please select the correct REST API statement for your org API endpoint https://yourorg.api.crm.dynamics.com/api/data/v9.2/.
Click on the arrows to vote for the correct answer
A. B. C. D. E. F.Correct Answer: C
Microsoft Dataverse provides the capability of querying the metadata during the run-time by using REST API.
Here is the typical statement for querying the Dataverse's tables, like account, and select name and email:
GET {endpoint}/accounts?$select=name,emailaddress1&$top=3
There are two ways to query the metadata by Name or MetadataID.
To query the Dataverse metadata, you need to add the EntityDefinitions to your path.
To query the Dataverse metadata by name, you need to use the “LogicalName” alternate key for the entities and attributes.
Here is the statement with the EntityDefinitions:
GET /EntityDefinitions(LogicalName='account')/Attributes(LogicalName='emailaddress1')
Here is a snapshot of a JSON response.
It contains complete metadata information about the “emailaddress1' attribute, including the MetadataID (Number 1)
You can retrieve an entity MetadataID by dropping the /Attributes… part from the above statement and query only on the entity.
And here is a query with the MetadataID for the same entity and attribute:
GET /EntityDefinitions(70816501-edb9-4740-a16c-6a5efbc05d84)/Attributes(b254ab69-de5a-4edb-8059-bdeb6863c544)
All other options are incorrect.
For more information about querying the Dataverse metadata by the Web API, please visit the below URLs:
The correct REST API statement for querying Dataverse metadata for the email address attribute in the Accounts table is:
C. GET /EntityDefinitions(LogicalName=account
)/Attributes(LogicalName=emailaddress1
)
Here's a detailed explanation for why this is the correct answer:
The Dataverse metadata represents the structure and properties of the tables, columns (attributes), relationships, and other elements that make up the data model. You can use the Dataverse Web API to retrieve this metadata information programmatically.
The API endpoint provided in the question is:
https://yourorg.api.crm.dynamics.com/api/data/v9.2/
This is the base URL for the Web API version 9.2 of Dataverse. To query metadata for a specific table and attribute, you need to construct a URL that specifies the entity and attribute logical names.
The entity logical name for the Accounts table is "account". The email address attribute logical name for the Accounts table is "emailaddress1".
To retrieve metadata for this attribute, you can use the GET request method with the following URL:
/EntityDefinitions(LogicalName=account
)/Attributes(LogicalName=emailaddress1
)
Let's break down this URL:
account
): This is a filter parameter that specifies the logical name of the entity you want to retrieve metadata for. In this case, the entity logical name is "account".emailaddress1
): This is a filter parameter that specifies the logical name of the attribute you want to retrieve metadata for. In this case, the attribute logical name is "emailaddress1".Therefore, the correct REST API statement for querying Dataverse metadata for the email address attribute in the Accounts table is:
C. GET /EntityDefinitions(LogicalName=account
)/Attributes(LogicalName=emailaddress1
)