Search

MachPanel Knowledgebase

HOW TO:MachPanel REST API Configuration

MachPanel

Summary

This article guides how to configure MachPanel REST API

Prerequisites

.Net 4.7.2 or later is required

Configuration

 Download NewInstall-REST-API.zip (Updated 22 Novemeber, 2023), unzip, and place it on a path that can be accessed via IIS Web Site Creation Wizard.

Launch IIS Manager, Select Application Pools, Click to Add Application Pool in Action pane.

Specify a Name and select .NET CLR version (v4.0), Click OK

  1. Select the pool,
  2. In Action pane, click on Advance Settings
  3. Locate Identity (under Process Model)
  4. Select Custom account
  5. Specify credentials, click OK
    • Note: This account shall have read/write access to physical path and MachPanel registry, it is recommended to use same identity account which is used for MachPanel App pool.

Click to add website, follow these steps

  • Specify Site name
  • Specify Physical path (steps 2-4)

Now test Settings (Steps 3-5), Click Close and OK respectively.

Now browse new website and as you will see as shown below (i.e. Control Panel REST API).

Click on the relevant accordion to see endpoint details and available operations


Authentication

MachPanel REST API uses basic authentication for operations requests and each request shall pass the credentials set in MachPanel API settings interface in panel.
See below screenshot for setting credentials for API.

 

Known Issue

If following error is seen:

405 - HTTP verb used to access this page is not allowed

Have to update web.config of REST API project on that client as:

 

Replace section: <system.webServer> with:

<system.webServer>

    <modules>

      <remove name="WebDAVModule" />

    </modules>

    <handlers>

      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

      <remove name="OPTIONSVerbHandler" />

      <remove name="TRACEVerbHandler" />

      <remove name="WebDAV" />

      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

    </handlers>

  </system.webServer>

 

Differences is shown below (right side is final file)

 
Getting Started with MachPanel REST API

https://kb.machsol.com/Knowledgebase/55675/Getting-Started-with-MachPanel-REST-API

 

Details
Type: HOW TO
Level: Aadvanced
Last Modified: Last Year
Last Modified By: rehan_waseem
Rated 5 stars based on 2 votes.
Article has been viewed 6.6K times.
Options
Also In This Category
Tags