Streamlining Development with Dataverse API Playground: A Game-Changer for CRM Developers

By | August 21, 2024

Streamlining Development with Dataverse API Playground

While developing any request from a client, I relied on browser-based queries or third-party tools like Postman for OData queries to get data on a particular record. Also, there was a lengthy process to set up for testing an Instant plugin or a Custom API. There was no direct way we could test these features.

But guess what, there’s a more efficient way. Now we can do all these without much effort using the API Playground in the Dataverse Accelerator application.

I have been using OData the typical way until now, and honestly, I was getting quite used to it. However, as soon as I tried the API Playground, I realized how much easier and more convenient it was for daily tasks. We can input the required details with conditions in each key-value pair and get a result in pretty-print format.

On using it for a while, I realized that I could do this within my environment, i.e., inside CRM itself, which made it even more appealing to me.

As the topic suggests, exploring the Web API Playground was a must because OData was just the first surprise. There are also features like Instant Plugins, etc.

Streamlining Development with Dataverse API Playground

Here’s how a basic OData query in the browser would look to get only the last names of the top 3 contacts whose state code equals 0 and either of the mobile phone or email address contains values.

This might seem quite complex as it is gathered in one place and might even face issues separating the conditions.

Also, this is how you get the result:

Streamlining Development with Dataverse API Playground

This above output is just for reference, but suppose we want to get all the records and multiple values together. In that case, the query would be much more complex, and the result would again need a third-party application or website to pretty print.

Let’s try the same scenario in Dataverse Application and we’ll see how much more efficient and easier it is to use.

Streamlining Development with Dataverse API Playground

The first thing we can observe is that every condition is executed in a different column, which helps separate the conditions and makes it easier to read.

Now, let’s check the results.

Streamlining Development with Dataverse API Playground

The result is also in a pretty print format, which makes it easier to read and understand. For a bigger scenario, the results would make quite a significant difference. Another major thing is that we execute this in a CRM environment, which is more secure and reliable.

These scenarios are quite impressive. As a developer, I am more comfortable and relieved using the API Dataverse playground.

Now let’s move ahead with the other feature of API playground i.e. Create and Test Instant Plugin.

Creating an Instant plugin is also simplified, in this, we have to click on the option as shown below.

Streamlining Development with Dataverse API Playground
Here we need to enter the appropriate name for the instant plug-in with the necessary parameters.

In this scenario, we are taking one string input as an email address and returning a Boolean value to check if the mail address is valid or not

Now using the Power FX formula, we assign value to the isValid parameter and return a Boolean value based on the output of the IsMatch function.

Streamlining Development with Dataverse API Playground

To test this instant plug-in, we can navigate to API Playground, select our preferred plug-in to test on and enter the necessary parameters. In this case, we are entering the email address (this is a sample email address), The above Power FX formula is used to match the pattern and check if it contains all the necessary characters in an email.

Streamlining Development with Dataverse API Playground
Now we have to click on the Send button and the output will be displayed. This is how easy it has become to test an instant plug-in inside our own CRM environment.

Similarly, we can easily test a Custom API from the API Playground by selecting the API passing the necessary parameters, and getting the desired output as we did for O-Data queries.

Conclusion

The API Playground simplifies and offers a more stable, secure, fast, and reliable platform for testing out various features like O-Data queries, Instant Plugins & Custom API’s. Overall it is a great time saver for developers due to its simple and easy-to-use functionality.

DeDupeD