This article guides how to configure MachPanel REST API
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
- Select the pool,
- In Action pane, click on Advance Settings
- Locate Identity (under Process Model)
- Select Custom account
- 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
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.
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