Icon Web Server Administration API - Privileges


Add Privilege Request
The add privilege request adds the privilege 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.

HTTP Method: POST

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

Example Request:

https://localhost/administration?method=addprivilege

Example Request Content:

{
   "Name": "ViewCustomerInvoices",
   "Description": "View customer invoices"
}

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


Update Privilege Request
The update privilege request updates the privilege 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.

HTTP Method: POST

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

Example Request:

https://localhost/administration?method=updateprivilege

Example Request Content:

{
   "Name": "ViewCustomerInvoices",
   "Description": "View customer invoices"
}

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


Remove Privilege Request
The remove privilege request removes the privilege 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.

HTTP Method: POST

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

Example Request:

https://localhost/administration?method=removeprivilege

Example Request Content:

{
   "Name": "ViewCustomerInvoices"
}

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


Get Privileges Request
The get privileges request enumerates all of the privileges defined 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

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

Example Request:

https://localhost/administration?method=getprivileges

Example Response Content:

{
   "Privileges": [
      { "Name": "AddDatabase",
        "Description": "Add a new database" },
      { "Name": "AddDataSet",
        "Description": "Add a new dataset" },
      { "Name": "AddDataSetCommand",
        "Description": "Add a new dataset command" },
      { "Name": "AddPrivilege",
        "Description": "Add a new privilege" }]
}

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