Step-by-step process to create a custom API
- Use Custom APIs to create our own APIs in Dataverse. We can consolidate one or more operations into a Custom API that developers can call in their code or from Power Automate.
- We can use Custom API as business events to enable creating new integration capabilities such as exposing a new type of trigger event in the Microsoft Dataverse connector.
- Custom APIs are an alternative to Custom process actions. Custom process actions provide a no-code way to include custom messages but have some limitations for developers. Custom APIs provide capabilities specifically for developers to define their logic in code with more options.
Let's begin:
Note:
1. When creating a Custom API, we must use a solution.
2. Many fields related to creating Custom API cannot be changed once created. We should carefully plan the design of the Custom API before we start. If later decide that we need to change things once created the Custom API, we may need to delete the existing record and re-create the Custom API. Refer to Custom API Tables to review the column which can not be changed.
Step 1: Create a Custom API Record:
1. Open the solution, click New > More > Other > Custom API from the drop-down.
2. Edit the fields to set the properties of your Custom API. We cannot set values for Plug-in Type unless you have already created the plug-in. You can change this later.
3. Click Save. See the below screen for reference
In the solution, click New > More > Other > Custom API Request Parameter from the drop-down.
Edit the fields to set the properties of your Custom API Request Parameter.
Click Save. The form should look something like this:
In the solution, click New > More > Other > Custom API Response Property from the drop-down.
Edit the fields to set the properties of the Custom API Response Property.
Click Save. The form should look something like this:
Step 4: Update the Custom API Plugin Type