Icon Web Server Administration API - Modules


Install Module Request
The install module request installs the native server module provided in the included JSON content. The module file name is a URL path that should begin with the virtual resource name Modules and may contain sub-folders, but must refer to an existing valid native server module file already present on the web server. Please see the Web Server Administration API - Files topic for more information on the virtual resource names used when managing files on the web server. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=installmodule

Example Request Content:

{
   "Name": "ContactForm",
   "FileName": "Modules\/contactform.dll"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Rename Module Request
The remame module request renames the native server module provided in the included JSON content to a new name. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=renamemodule

Example Request Content:

{
   "Name": "ContactForm",
   "NewName": "ContactFormModule"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Uninstall Module Request
The uninstall module request uninstalls the native server module provided in the included JSON content. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

Information This request only uninstalls the module so that it no longer is a reachable endpoint for incoming web server requests. It does not remove the underlying native server module file from the web server. Please see the Web Server Administration API - Files topic for more information on deleting files present on the web server.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=uninstallmodule

Example Request Content:

{
   "Name": "ContactForm"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Get Module Privileges Request
The get module privileges request retrieves the execute privilege assigned to the native server module provided in the included JSON content. If the execute privilege has not been specified, then the native server module is accessible to all users. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: GET

HTTP Request Content Type: application/json; charset=utf-8
HTTP Response Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=getmoduleprivileges

Example Request Content:

{
   "Name": "ContactForm"
}

Example Response Content:

{
   "Privilege": "ExecuteContactForm"]
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Set Module Privileges Request
The set module privileges request assigns the execute privilege for the native server module provided in the included JSON content. If the execute privilege is not specified, then the native server module will be accessible to all users. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: POST

HTTP Request Content Type: application/json; charset=utf-8

Example Request:

https://localhost/administration?method=setmoduleprivileges

Example Request Content:

{
   "Name": "ContactForm"
   "Privilege": "ExecuteContactForm"
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error


Get Modules Request
The get modules request enumerates all of the native server modules installed on the web server. If there is no active session or the session is not authenticated, the request will result in a 403 Forbidden HTTP response.

HTTP Method: GET

Example Request:

https://localhost/administration?method=getmodules

Example Response Content:

{
   "Modules": [{ "Name": "ContactForm",
                 "FileName": "Modules\/contactform.dll",
                 "Privilege": "" }]
}

HTTP Response: 200 on success, 403 if not authenticated, and 500 on error
Image