Search Results :

×

Create Custom REST API endpoints in Dotnetnuke (DNN)

The DNN REST API plugin allows to create custom API endpoints within the DNN platform, enabling external systems to interact with DNN functionalities. You can easily configure your custom API endpoints to meet specific requirements, Using all HTTP methods. This user guide offers comprehensive documentation to help you set up and test custom APIs.

Step by Step guide for DNN Custom API Authentication.

  • Open any of the page on your DNN site (Edit mode) and click on Add Module.
DNN Custom API- Click on Add Module

  • Search for DNN REST API and click on the DNN REST API. Drag and drop the module on the page where you want.
DNN Custom API- Click on Add Module

  • You have finished with the Installation of the DNN REST API module on your DNN site.
  • Navigate to the DNN REST API Settings Tab. Here, you will see the DNN REST API Authentication plugin dashboard.
DNN Custom API- Plugin Dashboard

  • Click on Create API, to initiate custom API generation.
DNN Custom API- Create API

  • Select type of API as Custom API.
DNN Custom API- Select Custom API

  • Enter the following details:
  1. API Name: Provide a unique name for your API.
  2. API Method: Select HTTP request method from the dropdown.
  3. Table Name: Specify the table you want to access.
  4. Response Column: Select columns on which you want to perform operations.
  5. Configure Authentication (optional): In Advanced Settings tab, you can find an option to select the authentication methods for the API which includes API Key, Basic authentication, JWT etc, map the authentication app created for the respective method.
  6. Apply Filters (Optional): You can apply conditions on the columns which allows you to access particular records based on the filters applied.
    To configure it, you can select the column from the Condition column dropdown, and then choose the Condition and Url Parameter on which you want to apply the condition.

DNN Custom API- Enter API Details

  • Click on Generate API.
  • Now under the Custom APIs section, you can locate your created API.
DNN Custom API- Custom API List

  • To test the API, click on the Test option under the Action dropdown.
DNN Custom API- Test Custom API

  • A Test Pop-up will appear containing your API endpoint with the configured HTTP method. You can find the option to pass the parameters in the headers, or to pass the data in the body if required. Then click on Execute.
DNN Custom API- Click on execute

  • If everything is configured correctly, you’ll see a successful response, confirming that your API is working as expected.
DNN REST API- Test successful response

  • You can refer the sample request and response formats for your API request from the test pop-up window.
DNN REST API- Sample response

This guide will enable you to set up and create custom REST APIs for your DNN site. By utilizing DNN REST API plugin you can securely configure, test and manage DNN REST APIs.



ADFS_sso ×
Hello there!

Need Help? We are right here!

support