Study FAQ
How do I design and implement the contract for a Dataverse custom API?
Also asked as 2
- How do I choose action or function, binding and plug-in settings for a Dataverse custom API?
- What defines the request, response and implementation of a Dataverse custom API?
Answer
Use a Dataverse custom API Action (HTTP POST) to change state and a Function (HTTP GET) to return data without changing it. Functions need a response property, and the Dataverse connector's custom API invocation uses an Action. Entity binding supplies an implicit Target of type EntityReference. EntityCollection binding scopes the Web API invocation to the entity set and supplies no collection parameter. Global binding applies when the operation is independent of a table. For a bound Web API operation, use the fully qualified name documented for the message. Create and use custom APIs
Define request parameters and result properties with clear types and meanings. Register the assembly, set the custom API's plug-in type, read InputParameters and set OutputParameters in the main implementation. The plug-in assigned to the API runs without a separately registered main processing step. Set Allowed Custom Processing Step Type according to the public extension contract. None permits only the main implementation, Async Only permits follow-up after the operation, and Sync and Async also lets other synchronous extensions change or cancel the operation. Custom API plug-in implementation and extension settings
Include the custom API definition, parameters, results and implementation in the solution. Package any additional steps explicitly. For a managed release, review the Is Customizable setting for the API and each parameter and result. Verify the expected Target, allowed inputs, returned result and extension configuration in a development environment before relying on the contract. Custom API solution guidance · Plug-in solution assets
Full explanation
AB-400: Custom APIs, Business Events and Plug-in Identity
Study guide · AB-400
Read the full explanation