From: Dietmar Maurer Date: Tue, 26 Sep 2017 11:18:46 +0000 (+0200) Subject: update generated docs X-Git-Url: https://git.proxmox.com/?p=pmg-docs.git;a=commitdiff_plain;h=9fda36b0a59d19252050476be98163ec4927a632 update generated docs --- diff --git a/api-viewer/apidata.js b/api-viewer/apidata.js index 2e1e7b7..1990b16 100644 --- a/api-viewer/apidata.js +++ b/api-viewer/apidata.js @@ -1089,180 +1089,93 @@ var pmgapi = [ "leaf" : 0, "path" : "/config/ruledb/what/{ogroup}/objects", "text" : "objects" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete a 'what' group.", - "method" : "DELETE", - "name" : "delete_{$oclass}_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" - } }, - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Read 'ContentType Filter' object settings.", + "method" : "GET", + "name" : "read_contenttype", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update 'ContentType Filter' object.", + "method" : "PUT", + "name" : "update_contenttype", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "contenttype" : { + "description" : "Content Type", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } } }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/config/ruledb/what/{ogroup}", - "text" : "{ogroup}" - } - ], - "info" : { - "GET" : { - "description" : "Get list of 'what' groups.", - "method" : "GET", - "name" : "list_what_groups", - "parameters" : { - "additionalProperties" : 0 - }, - "proxyto" : "master", - "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "integer" + "leaf" : 1, + "path" : "/config/ruledb/what/{ogroup}/contenttype/{id}", + "text" : "{id}" } - }, - "type" : "object" - }, - "type" : "array" - } - }, - "POST" : { - "description" : "Create a new 'what' group.", - "method" : "POST", - "name" : "create_what_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "info" : { - "description" : "Informational comment.", - "maxLength" : 255, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "Group name.", - "maxLength" : 255, - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "integer" - } - } - }, - "leaf" : 0, - "path" : "/config/ruledb/what", - "text" : "what" - }, - { - "children" : [ - { - "children" : [ - { + ], "info" : { - "GET" : { - "description" : "Get 'when' group properties", - "method" : "GET", - "name" : "get_config", + "POST" : { + "description" : "Add 'ContentType Filter' object.", + "method" : "POST", + "name" : "contenttype", "parameters" : { "additionalProperties" : 0, "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "proxyto" : "master", - "returns" : { - "properties" : { - "id" : { - "type" : "integer" - }, - "info" : { - "type" : "string" - }, - "name" : { + "contenttype" : { + "description" : "Content Type", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", "type" : "string" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Modify 'when' group properties", - "method" : "PUT", - "name" : "set_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "info" : { - "description" : "Informational comment.", - "maxLength" : 255, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "Group name.", - "maxLength" : 255, - "optional" : 1, - "type" : "string", - "typetext" : "" }, "ogroup" : { - "description" : "Object Group ID.", + "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" } @@ -1271,22 +1184,23 @@ var pmgapi = [ "protected" : 1, "proxyto" : "master", "returns" : { - "type" : "null" + "description" : "The object ID.", + "type" : "integer" } } }, - "leaf" : 1, - "path" : "/config/ruledb/when/{ogroup}/config", - "text" : "config" + "leaf" : 0, + "path" : "/config/ruledb/what/{ogroup}/contenttype", + "text" : "contenttype" }, { "children" : [ { "info" : { - "DELETE" : { - "description" : "Remove an object from the 'when' group.", - "method" : "DELETE", - "name" : "delete_object", + "GET" : { + "description" : "Read 'Match Field' object settings.", + "method" : "GET", + "name" : "read_matchfield", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -1296,71 +1210,112 @@ var pmgapi = [ "typetext" : "" }, "ogroup" : { - "description" : "Object Group ID.", + "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" } } }, - "protected" : 1, "proxyto" : "master", "returns" : { - "type" : "null" + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" } - } - }, - "leaf" : 1, - "path" : "/config/ruledb/when/{ogroup}/objects/{id}", - "text" : "{id}" - } - ], + }, + "PUT" : { + "description" : "Update 'Match Field' object.", + "method" : "PUT", + "name" : "update_matchfield", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "field" : { + "description" : "The Field", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + }, + "value" : { + "description" : "The Value", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/config/ruledb/what/{ogroup}/matchfield/{id}", + "text" : "{id}" + } + ], "info" : { - "GET" : { - "description" : "List 'when' group objects.", - "method" : "GET", - "name" : "objects", + "POST" : { + "description" : "Add 'Match Field' object.", + "method" : "POST", + "name" : "matchfield", "parameters" : { "additionalProperties" : 0, "properties" : { + "field" : { + "description" : "The Field", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" + }, "ogroup" : { - "description" : "Object Group ID.", + "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" + }, + "value" : { + "description" : "The Value", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" } } }, + "protected" : 1, "proxyto" : "master", "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" - } - ], - "type" : "array" + "description" : "The object ID.", + "type" : "integer" } } }, "leaf" : 0, - "path" : "/config/ruledb/when/{ogroup}/objects", - "text" : "objects" + "path" : "/config/ruledb/what/{ogroup}/matchfield", + "text" : "matchfield" }, { "children" : [ { "info" : { "GET" : { - "description" : "Read 'TimeFrame' object settings.", + "description" : "Read 'Spam Filter' object settings.", "method" : "GET", - "name" : "read_timeframe", + "name" : "read_spamfilter", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -1387,17 +1342,12 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Update 'TimeFrame' object.", + "description" : "Update 'Spam Filter' object.", "method" : "PUT", - "name" : "update_timeframe", + "name" : "update_spamfilter", "parameters" : { "additionalProperties" : 0, "properties" : { - "end" : { - "description" : "End time in `H:i` format (00:00).", - "pattern" : "\\d?\\d:\\d?\\d", - "type" : "string" - }, "id" : { "description" : "Object ID.", "type" : "integer", @@ -1408,10 +1358,11 @@ var pmgapi = [ "type" : "integer", "typetext" : "" }, - "start" : { - "description" : "Start time in `H:i` format (00:00).", - "pattern" : "\\d?\\d:\\d?\\d", - "type" : "string" + "spamlevel" : { + "description" : "Spam Level", + "minimum" : 0, + "type" : "integer", + "typetext" : " (0 - N)" } } }, @@ -1423,32 +1374,28 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/when/{ogroup}/timeframe/{id}", + "path" : "/config/ruledb/what/{ogroup}/spamfilter/{id}", "text" : "{id}" } ], "info" : { "POST" : { - "description" : "Add 'TimeFrame' object.", + "description" : "Add 'Spam Filter' object.", "method" : "POST", - "name" : "timeframe", + "name" : "spamfilter", "parameters" : { "additionalProperties" : 0, "properties" : { - "end" : { - "description" : "End time in `H:i` format (00:00).", - "pattern" : "\\d?\\d:\\d?\\d", - "type" : "string" - }, "ogroup" : { "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" }, - "start" : { - "description" : "Start time in `H:i` format (00:00).", - "pattern" : "\\d?\\d:\\d?\\d", - "type" : "string" + "spamlevel" : { + "description" : "Spam Level", + "minimum" : 0, + "type" : "integer", + "typetext" : " (0 - N)" } } }, @@ -1461,94 +1408,300 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/when/{ogroup}/timeframe", - "text" : "timeframe" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete a 'when' group.", - "method" : "DELETE", - "name" : "delete_{$oclass}_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" - } + "path" : "/config/ruledb/what/{ogroup}/spamfilter", + "text" : "spamfilter" }, - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Read 'Archive Filter' object settings.", + "method" : "GET", + "name" : "read_archivefilter", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update 'Archive Filter' object.", + "method" : "PUT", + "name" : "update_archivefilter", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "contenttype" : { + "description" : "Content Type", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/config/ruledb/what/{ogroup}/archivefilter/{id}", + "text" : "{id}" } - }, - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" + ], + "info" : { + "POST" : { + "description" : "Add 'Archive Filter' object.", + "method" : "POST", + "name" : "archivefilter", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "contenttype" : { + "description" : "Content Type", + "maxLength" : 1024, + "pattern" : "[0-9a-zA-Z\\/\\\\[\\]\\+\\-\\.\\*\\_]+", + "type" : "string" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } } }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" + "protected" : 1, + "proxyto" : "master", + "returns" : { + "description" : "The object ID.", + "type" : "integer" } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/config/ruledb/when/{ogroup}", - "text" : "{ogroup}" - } - ], - "info" : { - "GET" : { - "description" : "Get list of 'when' groups.", - "method" : "GET", - "name" : "list_when_groups", - "parameters" : { - "additionalProperties" : 0 - }, - "proxyto" : "master", - "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "integer" } }, - "type" : "object" + "leaf" : 0, + "path" : "/config/ruledb/what/{ogroup}/archivefilter", + "text" : "archivefilter" }, - "type" : "array" - } - }, - "POST" : { - "description" : "Create a new 'when' group.", + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Read 'Match Filename' object settings.", + "method" : "GET", + "name" : "read_filenamefilter", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update 'Match Filename' object.", + "method" : "PUT", + "name" : "update_filenamefilter", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "filename" : { + "description" : "Filename filter", + "maxLength" : 1024, + "type" : "string", + "typetext" : "" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/config/ruledb/what/{ogroup}/filenamefilter/{id}", + "text" : "{id}" + } + ], + "info" : { + "POST" : { + "description" : "Add 'Match Filename' object.", + "method" : "POST", + "name" : "filenamefilter", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "filename" : { + "description" : "Filename filter", + "maxLength" : 1024, + "type" : "string", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "description" : "The object ID.", + "type" : "integer" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/what/{ogroup}/filenamefilter", + "text" : "filenamefilter" + } + ], + "info" : { + "DELETE" : { + "description" : "Delete a 'what' group.", + "method" : "DELETE", + "name" : "delete_{$oclass}_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/what/{ogroup}", + "text" : "{ogroup}" + } + ], + "info" : { + "GET" : { + "description" : "Get list of 'what' groups.", + "method" : "GET", + "name" : "list_what_groups", + "parameters" : { + "additionalProperties" : 0 + }, + "proxyto" : "master", + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "Create a new 'what' group.", "method" : "POST", - "name" : "create_when_group", + "name" : "create_what_group", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -1575,8 +1728,8 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/when", - "text" : "when" + "path" : "/config/ruledb/what", + "text" : "what" }, { "children" : [ @@ -1585,7 +1738,7 @@ var pmgapi = [ { "info" : { "GET" : { - "description" : "Get 'who' group properties", + "description" : "Get 'when' group properties", "method" : "GET", "name" : "get_config", "parameters" : { @@ -1615,7 +1768,7 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Modify 'who' group properties", + "description" : "Modify 'when' group properties", "method" : "PUT", "name" : "set_config", "parameters" : { @@ -1650,7 +1803,7 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/config", + "path" : "/config/ruledb/when/{ogroup}/config", "text" : "config" }, { @@ -1658,7 +1811,7 @@ var pmgapi = [ { "info" : { "DELETE" : { - "description" : "Remove an object from the 'who' group.", + "description" : "Remove an object from the 'when' group.", "method" : "DELETE", "name" : "delete_object", "parameters" : { @@ -1684,13 +1837,13 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/objects/{id}", + "path" : "/config/ruledb/when/{ogroup}/objects/{id}", "text" : "{id}" } ], "info" : { "GET" : { - "description" : "List 'who' group objects.", + "description" : "List 'when' group objects.", "method" : "GET", "name" : "objects", "parameters" : { @@ -1724,7 +1877,7 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/objects", + "path" : "/config/ruledb/when/{ogroup}/objects", "text" : "objects" }, { @@ -1732,9 +1885,9 @@ var pmgapi = [ { "info" : { "GET" : { - "description" : "Read 'Mail address' object settings.", + "description" : "Read 'TimeFrame' object settings.", "method" : "GET", - "name" : "read_email", + "name" : "read_timeframe", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -1761,17 +1914,16 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Update 'Mail address' object.", + "description" : "Update 'TimeFrame' object.", "method" : "PUT", - "name" : "update_email", + "name" : "update_timeframe", "parameters" : { "additionalProperties" : 0, "properties" : { - "email" : { - "description" : "Email address.", - "format" : "email", - "type" : "string", - "typetext" : "" + "end" : { + "description" : "End time in `H:i` format (00:00).", + "pattern" : "\\d?\\d:\\d?\\d", + "type" : "string" }, "id" : { "description" : "Object ID.", @@ -1782,6 +1934,11 @@ var pmgapi = [ "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" + }, + "start" : { + "description" : "Start time in `H:i` format (00:00).", + "pattern" : "\\d?\\d:\\d?\\d", + "type" : "string" } } }, @@ -1793,28 +1950,32 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/email/{id}", + "path" : "/config/ruledb/when/{ogroup}/timeframe/{id}", "text" : "{id}" } ], "info" : { "POST" : { - "description" : "Add 'Mail address' object.", + "description" : "Add 'TimeFrame' object.", "method" : "POST", - "name" : "email", + "name" : "timeframe", "parameters" : { "additionalProperties" : 0, "properties" : { - "email" : { - "description" : "Email address.", - "format" : "email", - "type" : "string", - "typetext" : "" + "end" : { + "description" : "End time in `H:i` format (00:00).", + "pattern" : "\\d?\\d:\\d?\\d", + "type" : "string" }, "ogroup" : { "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" + }, + "start" : { + "description" : "Start time in `H:i` format (00:00).", + "pattern" : "\\d?\\d:\\d?\\d", + "type" : "string" } } }, @@ -1827,95 +1988,182 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/email", - "text" : "email" - }, - { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Read 'Domain' object settings.", - "method" : "GET", - "name" : "read_domain", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "Object ID.", - "type" : "integer", - "typetext" : "" - }, - "ogroup" : { - "description" : "Object Groups ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "proxyto" : "master", - "returns" : { - "properties" : { - "id" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Update 'Domain' object.", - "method" : "PUT", - "name" : "update_domain", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "domain" : { - "description" : "DNS domain name (Sender).", - "format" : "dns-name", - "type" : "string", - "typetext" : "" - }, - "id" : { - "description" : "Object ID.", - "type" : "integer", - "typetext" : "" - }, - "ogroup" : { - "description" : "Object Groups ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" - } + "path" : "/config/ruledb/when/{ogroup}/timeframe", + "text" : "timeframe" + } + ], + "info" : { + "DELETE" : { + "description" : "Delete a 'when' group.", + "method" : "DELETE", + "name" : "delete_{$oclass}_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" } }, - "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/domain/{id}", - "text" : "{id}" + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/when/{ogroup}", + "text" : "{ogroup}" + } + ], + "info" : { + "GET" : { + "description" : "Get list of 'when' groups.", + "method" : "GET", + "name" : "list_when_groups", + "parameters" : { + "additionalProperties" : 0 + }, + "proxyto" : "master", + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "integer" } - ], + }, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "Create a new 'when' group.", + "method" : "POST", + "name" : "create_when_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "info" : { - "POST" : { - "description" : "Add 'Domain' object.", - "method" : "POST", - "name" : "domain", + "description" : "Informational comment.", + "maxLength" : 255, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "Group name.", + "maxLength" : 255, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "integer" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/when", + "text" : "when" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Get 'who' group properties", + "method" : "GET", + "name" : "get_config", "parameters" : { "additionalProperties" : 0, "properties" : { - "domain" : { - "description" : "DNS domain name (Sender).", - "format" : "dns-name", + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + }, + "info" : { + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Modify 'who' group properties", + "method" : "PUT", + "name" : "set_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "info" : { + "description" : "Informational comment.", + "maxLength" : 255, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "Group name.", + "maxLength" : 255, + "optional" : 1, "type" : "string", "typetext" : "" }, "ogroup" : { - "description" : "Object Groups ID.", + "description" : "Object Group ID.", "type" : "integer", "typetext" : "" } @@ -1924,23 +2172,22 @@ var pmgapi = [ "protected" : 1, "proxyto" : "master", "returns" : { - "description" : "The object ID.", - "type" : "integer" + "type" : "null" } } }, - "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/domain", - "text" : "domain" + "leaf" : 1, + "path" : "/config/ruledb/who/{ogroup}/config", + "text" : "config" }, { "children" : [ { "info" : { - "GET" : { - "description" : "Read 'Regular Expression' object settings.", - "method" : "GET", - "name" : "read_regex", + "DELETE" : { + "description" : "Remove an object from the 'who' group.", + "method" : "DELETE", + "name" : "delete_object", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -1950,100 +2197,71 @@ var pmgapi = [ "typetext" : "" }, "ogroup" : { - "description" : "Object Groups ID.", + "description" : "Object Group ID.", "type" : "integer", "typetext" : "" } } }, + "protected" : 1, "proxyto" : "master", "returns" : { - "properties" : { - "id" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Update 'Regular Expression' object.", - "method" : "PUT", - "name" : "update_regex", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "Object ID.", - "type" : "integer", - "typetext" : "" - }, - "ogroup" : { - "description" : "Object Groups ID.", - "type" : "integer", - "typetext" : "" - }, - "regex" : { - "description" : "Email address regular expression.", - "maxLength" : 1024, - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" + "type" : "null" } } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/regex/{id}", + "path" : "/config/ruledb/who/{ogroup}/objects/{id}", "text" : "{id}" } ], "info" : { - "POST" : { - "description" : "Add 'Regular Expression' object.", - "method" : "POST", - "name" : "regex", + "GET" : { + "description" : "List 'who' group objects.", + "method" : "GET", + "name" : "objects", "parameters" : { "additionalProperties" : 0, "properties" : { "ogroup" : { - "description" : "Object Groups ID.", + "description" : "Object Group ID.", "type" : "integer", "typetext" : "" - }, - "regex" : { - "description" : "Email address regular expression.", - "maxLength" : 1024, - "type" : "string", - "typetext" : "" } } }, - "protected" : 1, "proxyto" : "master", "returns" : { - "description" : "The object ID.", - "type" : "integer" + "items" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" } } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/regex", - "text" : "regex" + "path" : "/config/ruledb/who/{ogroup}/objects", + "text" : "objects" }, { "children" : [ { "info" : { "GET" : { - "description" : "Read 'IP Address' object settings.", + "description" : "Read 'Mail address' object settings.", "method" : "GET", - "name" : "read_ip", + "name" : "read_email", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -2070,23 +2288,23 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Update 'IP Address' object.", + "description" : "Update 'Mail address' object.", "method" : "PUT", - "name" : "update_ip", + "name" : "update_email", "parameters" : { "additionalProperties" : 0, "properties" : { + "email" : { + "description" : "Email address.", + "format" : "email", + "type" : "string", + "typetext" : "" + }, "id" : { "description" : "Object ID.", "type" : "integer", "typetext" : "" }, - "ip" : { - "description" : "IP address", - "format" : "ip", - "type" : "string", - "typetext" : "" - }, "ogroup" : { "description" : "Object Groups ID.", "type" : "integer", @@ -2102,21 +2320,21 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/ip/{id}", + "path" : "/config/ruledb/who/{ogroup}/email/{id}", "text" : "{id}" } ], "info" : { "POST" : { - "description" : "Add 'IP Address' object.", + "description" : "Add 'Mail address' object.", "method" : "POST", - "name" : "ip", + "name" : "email", "parameters" : { "additionalProperties" : 0, "properties" : { - "ip" : { - "description" : "IP address", - "format" : "ip", + "email" : { + "description" : "Email address.", + "format" : "email", "type" : "string", "typetext" : "" }, @@ -2136,17 +2354,17 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/ip", - "text" : "ip" + "path" : "/config/ruledb/who/{ogroup}/email", + "text" : "email" }, { "children" : [ { "info" : { "GET" : { - "description" : "Read 'IP Network' object settings.", + "description" : "Read 'Domain' object settings.", "method" : "GET", - "name" : "read_network", + "name" : "read_domain", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -2173,15 +2391,15 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Update 'IP Network' object.", + "description" : "Update 'Domain' object.", "method" : "PUT", - "name" : "update_network", + "name" : "update_domain", "parameters" : { "additionalProperties" : 0, "properties" : { - "cidr" : { - "description" : "Network address in CIDR notation.", - "format" : "CIDR", + "domain" : { + "description" : "DNS domain name (Sender).", + "format" : "dns-name", "type" : "string", "typetext" : "" }, @@ -2205,21 +2423,21 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/network/{id}", + "path" : "/config/ruledb/who/{ogroup}/domain/{id}", "text" : "{id}" } ], "info" : { "POST" : { - "description" : "Add 'IP Network' object.", + "description" : "Add 'Domain' object.", "method" : "POST", - "name" : "network", + "name" : "domain", "parameters" : { "additionalProperties" : 0, "properties" : { - "cidr" : { - "description" : "Network address in CIDR notation.", - "format" : "CIDR", + "domain" : { + "description" : "DNS domain name (Sender).", + "format" : "dns-name", "type" : "string", "typetext" : "" }, @@ -2239,17 +2457,17 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/network", - "text" : "network" + "path" : "/config/ruledb/who/{ogroup}/domain", + "text" : "domain" }, { "children" : [ { "info" : { "GET" : { - "description" : "Read 'LDAP Group' object settings.", + "description" : "Read 'Regular Expression' object settings.", "method" : "GET", - "name" : "read_ldap", + "name" : "read_regex", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -2276,43 +2494,25 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Update 'LDAP Group' object.", + "description" : "Update 'Regular Expression' object.", "method" : "PUT", - "name" : "update_ldap", + "name" : "update_regex", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "LDAP Group DN", - "maxLength" : 1024, - "minLength" : 1, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, "id" : { "description" : "Object ID.", "type" : "integer", "typetext" : "" }, - "mode" : { - "description" : "Operational mode. You can either match 'any' user, match when no such user exists with 'none', or match when the user is member of a specific group.", - "enum" : [ - "any", - "none", - "group" - ], - "type" : "string" - }, "ogroup" : { "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" }, - "profile" : { - "description" : "Profile ID.", - "format" : "pve-configid", - "optional" : 1, + "regex" : { + "description" : "Email address regular expression.", + "maxLength" : 1024, "type" : "string", "typetext" : "" } @@ -2326,44 +2526,26 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/ldap/{id}", + "path" : "/config/ruledb/who/{ogroup}/regex/{id}", "text" : "{id}" } ], "info" : { "POST" : { - "description" : "Add 'LDAP Group' object.", + "description" : "Add 'Regular Expression' object.", "method" : "POST", - "name" : "ldap", + "name" : "regex", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "LDAP Group DN", - "maxLength" : 1024, - "minLength" : 1, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "mode" : { - "description" : "Operational mode. You can either match 'any' user, match when no such user exists with 'none', or match when the user is member of a specific group.", - "enum" : [ - "any", - "none", - "group" - ], - "type" : "string" - }, "ogroup" : { "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" }, - "profile" : { - "description" : "Profile ID.", - "format" : "pve-configid", - "optional" : 1, + "regex" : { + "description" : "Email address regular expression.", + "maxLength" : 1024, "type" : "string", "typetext" : "" } @@ -2378,17 +2560,17 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/ldap", - "text" : "ldap" + "path" : "/config/ruledb/who/{ogroup}/regex", + "text" : "regex" }, { "children" : [ { "info" : { "GET" : { - "description" : "Read 'LDAP User' object settings.", + "description" : "Read 'IP Address' object settings.", "method" : "GET", - "name" : "read_ldapuser", + "name" : "read_ip", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -2415,34 +2597,27 @@ var pmgapi = [ } }, "PUT" : { - "description" : "Update 'LDAP User' object.", + "description" : "Update 'IP Address' object.", "method" : "PUT", - "name" : "update_ldapuser", + "name" : "update_ip", "parameters" : { "additionalProperties" : 0, "properties" : { - "account" : { - "description" : "LDAP user account name.", - "maxLength" : 1024, - "minLength" : 1, - "type" : "string", - "typetext" : "" - }, "id" : { "description" : "Object ID.", "type" : "integer", "typetext" : "" }, + "ip" : { + "description" : "IP address", + "format" : "ip", + "type" : "string", + "typetext" : "" + }, "ogroup" : { "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" - }, - "profile" : { - "description" : "Profile ID.", - "format" : "pve-configid", - "type" : "string", - "typetext" : "" } } }, @@ -2454,22 +2629,21 @@ var pmgapi = [ } }, "leaf" : 1, - "path" : "/config/ruledb/who/{ogroup}/ldapuser/{id}", + "path" : "/config/ruledb/who/{ogroup}/ip/{id}", "text" : "{id}" } ], "info" : { "POST" : { - "description" : "Add 'LDAP User' object.", + "description" : "Add 'IP Address' object.", "method" : "POST", - "name" : "ldapuser", + "name" : "ip", "parameters" : { "additionalProperties" : 0, "properties" : { - "account" : { - "description" : "LDAP user account name.", - "maxLength" : 1024, - "minLength" : 1, + "ip" : { + "description" : "IP address", + "format" : "ip", "type" : "string", "typetext" : "" }, @@ -2477,12 +2651,6 @@ var pmgapi = [ "description" : "Object Groups ID.", "type" : "integer", "typetext" : "" - }, - "profile" : { - "description" : "Profile ID.", - "format" : "pve-configid", - "type" : "string", - "typetext" : "" } } }, @@ -2495,97 +2663,456 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}/ldapuser", - "text" : "ldapuser" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete a 'who' group.", - "method" : "DELETE", - "name" : "delete_{$oclass}_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" - } + "path" : "/config/ruledb/who/{ogroup}/ip", + "text" : "ip" }, - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ogroup" : { - "description" : "Object Group ID.", - "type" : "integer", - "typetext" : "" - } + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Read 'IP Network' object settings.", + "method" : "GET", + "name" : "read_network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update 'IP Network' object.", + "method" : "PUT", + "name" : "update_network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network address in CIDR notation.", + "format" : "CIDR", + "type" : "string", + "typetext" : "" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/config/ruledb/who/{ogroup}/network/{id}", + "text" : "{id}" } - }, - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" + ], + "info" : { + "POST" : { + "description" : "Add 'IP Network' object.", + "method" : "POST", + "name" : "network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network address in CIDR notation.", + "format" : "CIDR", + "type" : "string", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } } }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" + "protected" : 1, + "proxyto" : "master", + "returns" : { + "description" : "The object ID.", + "type" : "integer" } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/config/ruledb/who/{ogroup}", - "text" : "{ogroup}" - } - ], - "info" : { - "GET" : { - "description" : "Get list of 'who' groups.", - "method" : "GET", - "name" : "list_who_groups", - "parameters" : { - "additionalProperties" : 0 - }, - "proxyto" : "master", - "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "integer" } }, - "type" : "object" + "leaf" : 0, + "path" : "/config/ruledb/who/{ogroup}/network", + "text" : "network" }, - "type" : "array" - } - }, - "POST" : { - "description" : "Create a new 'who' group.", - "method" : "POST", - "name" : "create_who_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Read 'LDAP Group' object settings.", + "method" : "GET", + "name" : "read_ldap", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update 'LDAP Group' object.", + "method" : "PUT", + "name" : "update_ldap", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "group" : { + "description" : "LDAP Group DN", + "maxLength" : 1024, + "minLength" : 1, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "mode" : { + "description" : "Operational mode. You can either match 'any' user, match when no such user exists with 'none', or match when the user is member of a specific group.", + "enum" : [ + "any", + "none", + "group" + ], + "type" : "string" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + }, + "profile" : { + "description" : "Profile ID.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/config/ruledb/who/{ogroup}/ldap/{id}", + "text" : "{id}" + } + ], + "info" : { + "POST" : { + "description" : "Add 'LDAP Group' object.", + "method" : "POST", + "name" : "ldap", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "group" : { + "description" : "LDAP Group DN", + "maxLength" : 1024, + "minLength" : 1, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mode" : { + "description" : "Operational mode. You can either match 'any' user, match when no such user exists with 'none', or match when the user is member of a specific group.", + "enum" : [ + "any", + "none", + "group" + ], + "type" : "string" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + }, + "profile" : { + "description" : "Profile ID.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "description" : "The object ID.", + "type" : "integer" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/who/{ogroup}/ldap", + "text" : "ldap" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Read 'LDAP User' object settings.", + "method" : "GET", + "name" : "read_ldapuser", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "proxyto" : "master", + "returns" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update 'LDAP User' object.", + "method" : "PUT", + "name" : "update_ldapuser", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "account" : { + "description" : "LDAP user account name.", + "maxLength" : 1024, + "minLength" : 1, + "type" : "string", + "typetext" : "" + }, + "id" : { + "description" : "Object ID.", + "type" : "integer", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + }, + "profile" : { + "description" : "Profile ID.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/config/ruledb/who/{ogroup}/ldapuser/{id}", + "text" : "{id}" + } + ], + "info" : { + "POST" : { + "description" : "Add 'LDAP User' object.", + "method" : "POST", + "name" : "ldapuser", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "account" : { + "description" : "LDAP user account name.", + "maxLength" : 1024, + "minLength" : 1, + "type" : "string", + "typetext" : "" + }, + "ogroup" : { + "description" : "Object Groups ID.", + "type" : "integer", + "typetext" : "" + }, + "profile" : { + "description" : "Profile ID.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "description" : "The object ID.", + "type" : "integer" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/who/{ogroup}/ldapuser", + "text" : "ldapuser" + } + ], + "info" : { + "DELETE" : { + "description" : "Delete a 'who' group.", + "method" : "DELETE", + "name" : "delete_{$oclass}_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ogroup" : { + "description" : "Object Group ID.", + "type" : "integer", + "typetext" : "" + } + } + }, + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/config/ruledb/who/{ogroup}", + "text" : "{ogroup}" + } + ], + "info" : { + "GET" : { + "description" : "Get list of 'who' groups.", + "method" : "GET", + "name" : "list_who_groups", + "parameters" : { + "additionalProperties" : 0 + }, + "proxyto" : "master", + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "Create a new 'who' group.", + "method" : "POST", + "name" : "create_who_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "info" : { "description" : "Informational comment.", "maxLength" : 255, @@ -4810,6 +5337,35 @@ var pmgapi = [ "path" : "/config/cluster", "text" : "cluster" }, + { + "info" : { + "GET" : { + "description" : "Get Mime Types List", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "returns" : { + "items" : { + "properties" : { + "mimetype" : { + "type" : "string" + }, + "text" : { + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/config/mimetypes", + "text" : "mimetypes" + }, { "info" : { "GET" : { @@ -4831,6 +5387,13 @@ var pmgapi = [ "parameters" : { "additionalProperties" : 0, "properties" : { + "advfilter" : { + "default" : 1, + "description" : "Use advanced filters for statistic.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, "dailyreport" : { "default" : 1, "description" : "Send daily reports.", @@ -4868,31 +5431,11 @@ var pmgapi = [ "type" : "string", "typetext" : "" }, - "proxypassword" : { - "description" : "HTTP proxy password.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "proxyport" : { - "default" : 8080, - "description" : "HTTP proxy port.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "proxyserver" : { - "description" : "HTTP proxy server address.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "proxyuser" : { - "description" : "HTTP proxy user name.", + "http_proxy" : { + "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')", "optional" : 1, - "type" : "string", - "typetext" : "" + "pattern" : "http://.*", + "type" : "string" }, "statlifetime" : { "default" : 7, @@ -5581,6 +6124,46 @@ var pmgapi = [ "leaf" : 1, "path" : "/config/virusquar", "text" : "virusquar" + }, + { + "info" : { + "POST" : { + "description" : "Test Regex", + "method" : "POST", + "name" : "regextest", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "regex" : { + "description" : "The Regex to test", + "maxLength" : 1024, + "type" : "string", + "typetext" : "" + }, + "text" : { + "description" : "The String to test", + "maxLength" : 1024, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "protected" : 0, + "returns" : { + "type" : "number" + } + } + }, + "leaf" : 1, + "path" : "/config/regextest", + "text" : "regextest" } ], "info" : { @@ -5933,6 +6516,32 @@ var pmgapi = [ } ], "info" : { + "DELETE" : { + "description" : "Delete all mails in all posfix queues.", + "method" : "DELETE", + "name" : "delete_all_queues", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "admin" + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, "GET" : { "description" : "Directory index.", "method" : "GET", @@ -6991,6 +7600,7 @@ var pmgapi = [ "systemd-timesyncd", "pmg-hourly", "pmg-daily", + "pmgreport", "pmgspamreport" ], "type" : "string" @@ -7042,6 +7652,7 @@ var pmgapi = [ "systemd-timesyncd", "pmg-hourly", "pmg-daily", + "pmgreport", "pmgspamreport" ], "type" : "string" @@ -7092,6 +7703,7 @@ var pmgapi = [ "systemd-timesyncd", "pmg-hourly", "pmg-daily", + "pmgreport", "pmgspamreport" ], "type" : "string" @@ -7142,6 +7754,7 @@ var pmgapi = [ "systemd-timesyncd", "pmg-hourly", "pmg-daily", + "pmgreport", "pmgspamreport" ], "type" : "string" @@ -7192,6 +7805,7 @@ var pmgapi = [ "systemd-timesyncd", "pmg-hourly", "pmg-daily", + "pmgreport", "pmgspamreport" ], "type" : "string" @@ -7242,6 +7856,7 @@ var pmgapi = [ "systemd-timesyncd", "pmg-hourly", "pmg-daily", + "pmgreport", "pmgspamreport" ], "type" : "string" @@ -7267,519 +7882,2223 @@ var pmgapi = [ } } }, - "leaf" : 0, - "path" : "/nodes/{node}/services/{service}", - "text" : "{service}" - } - ], - "info" : { - "GET" : { - "description" : "Service list.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } + "leaf" : 0, + "path" : "/nodes/{node}/services/{service}", + "text" : "{service}" + } + ], + "info" : { + "GET" : { + "description" : "Service list.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{service}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/services", + "text" : "services" + }, + { + "info" : { + "GET" : { + "description" : "Read subscription info.", + "method" : "GET", + "name" : "get", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/subscription", + "text" : "subscription" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "List available updates.", + "method" : "GET", + "name" : "list_updates", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "This is used to resynchronize the package index files from their sources (apt-get update).", + "method" : "POST", + "name" : "update_database", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "notify" : { + "default" : 0, + "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "quiet" : { + "default" : 0, + "description" : "Only produces output suitable for logging, omitting progress indicators.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/update", + "text" : "update" + }, + { + "info" : { + "GET" : { + "description" : "Get package changelogs.", + "method" : "GET", + "name" : "changelog", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "Package name.", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "version" : { + "description" : "Package version.", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/changelog", + "text" : "changelog" + }, + { + "info" : { + "GET" : { + "description" : "Get package information for important Proxmox packages.", + "method" : "GET", + "name" : "versions", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/versions", + "text" : "versions" + } + ], + "info" : { + "GET" : { + "description" : "Directory index for apt (Advanced Package Tool).", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/apt", + "text" : "apt" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Get the detailed syslog entries for a specific mail ID.", + "method" : "GET", + "name" : "maillog", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "id" : { + "description" : "Mail ID (as returend by the list API).", + "maxLength" : 64, + "minLength" : 3, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "client" : { + "description" : "Client address", + "optional" : 1, + "type" : "string" + }, + "dstatus" : { + "description" : "Delivery status.", + "maxLength" : 1, + "minLength" : 1, + "type" : "string" + }, + "from" : { + "description" : "Sender email address.", + "type" : "string" + }, + "id" : { + "description" : "Unique ID.", + "type" : "string" + }, + "logs" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "msgid" : { + "description" : "SMTP message ID.", + "optional" : 1, + "type" : "string" + }, + "qid" : { + "description" : "Postfix qmgr ID.", + "optional" : 1, + "type" : "string" + }, + "relay" : { + "description" : "ID of relayed mail.", + "optional" : 1, + "type" : "string" + }, + "rstatus" : { + "description" : "Delivery status of relayed mail.", + "maxLength" : 1, + "minLength" : 1, + "optional" : 1, + "type" : "string" + }, + "size" : { + "description" : "The size of the raw email.", + "optional" : 1, + "type" : "number" + }, + "time" : { + "description" : "Delivery timestamp.", + "type" : "integer" + }, + "to" : { + "description" : "Receiver email address.", + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/tracker/{id}", + "text" : "{id}" + } + ], + "info" : { + "GET" : { + "description" : "Read mail list.", + "method" : "GET", + "name" : "list_mails", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "from" : { + "description" : "Sender email address filter.", + "maxLength" : 256, + "minLength" : 1, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "greylist" : { + "default" : 0, + "description" : "Include Greylisted entries.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ndr" : { + "default" : 0, + "description" : "Include NDRs (non delivery reports).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "target" : { + "description" : "Receiver email address filter.", + "maxLength" : 256, + "minLength" : 1, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "xfilter" : { + "description" : "Only include mails containing this filter string.", + "maxLength" : 256, + "minLength" : 1, + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "client" : { + "description" : "Client address", + "optional" : 1, + "type" : "string" + }, + "dstatus" : { + "description" : "Delivery status.", + "maxLength" : 1, + "minLength" : 1, + "type" : "string" + }, + "from" : { + "description" : "Sender email address.", + "type" : "string" + }, + "id" : { + "description" : "Unique ID.", + "type" : "string" + }, + "msgid" : { + "description" : "SMTP message ID.", + "optional" : 1, + "type" : "string" + }, + "qid" : { + "description" : "Postfix qmgr ID.", + "optional" : 1, + "type" : "string" + }, + "relay" : { + "description" : "ID of relayed mail.", + "optional" : 1, + "type" : "string" + }, + "rstatus" : { + "description" : "Delivery status of relayed mail.", + "maxLength" : 1, + "minLength" : 1, + "optional" : 1, + "type" : "string" + }, + "size" : { + "description" : "The size of the raw email.", + "optional" : 1, + "type" : "number" + }, + "time" : { + "description" : "Delivery timestamp.", + "type" : "integer" + }, + "to" : { + "description" : "Receiver email address.", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/tracker", + "text" : "tracker" + }, + { + "info" : { + "GET" : { + "description" : "Read node RRD statistics", + "method" : "GET", + "name" : "rrddata", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/rrddata", + "text" : "rrddata" + }, + { + "info" : { + "GET" : { + "description" : "Read system log", + "method" : "GET", + "name" : "syslog", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "service" : { + "description" : "Service ID", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "since" : { + "description" : "Display all log since this date-time string.", + "optional" : 1, + "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", + "type" : "string" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "until" : { + "description" : "Display all log until this date-time string.", + "optional" : 1, + "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", + "type" : "string" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/syslog", + "text" : "syslog" + }, + { + "info" : { + "POST" : { + "description" : "Creates a VNC Shell proxy.", + "method" : "POST", + "name" : "vncshell", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "upgrade" : { + "default" : 0, + "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "websocket" : { + "default" : 1, + "description" : "use websocket instead of standard vnc.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/vncshell", + "text" : "vncshell" + }, + { + "info" : { + "GET" : { + "description" : "Opens a weksocket for VNC traffic.", + "method" : "GET", + "name" : "vncwebsocket", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "port" : { + "description" : "Port number returned by previous vncproxy call.", + "maximum" : 5999, + "minimum" : 5900, + "type" : "integer", + "typetext" : " (5900 - 5999)" + }, + "vncticket" : { + "description" : "Ticket from previous call to vncproxy.", + "maxLength" : 512, + "type" : "string", + "typetext" : "" + } + } + }, + "returns" : { + "properties" : { + "port" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/vncwebsocket", + "text" : "vncwebsocket" + }, + { + "info" : { + "GET" : { + "description" : "Read DNS settings.", + "method" : "GET", + "name" : "dns", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "proxyto" : "node", + "returns" : { + "additionalProperties" : 0, + "properties" : { + "dns1" : { + "description" : "First name server IP address.", + "optional" : 1, + "type" : "string" + }, + "dns2" : { + "description" : "Second name server IP address.", + "optional" : 1, + "type" : "string" + }, + "dns3" : { + "description" : "Third name server IP address.", + "optional" : 1, + "type" : "string" + }, + "search" : { + "description" : "Search domain for host-name lookup.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Write DNS settings.", + "method" : "PUT", + "name" : "update_dns", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dns1" : { + "description" : "First name server IP address.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dns2" : { + "description" : "Second name server IP address.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dns3" : { + "description" : "Third name server IP address.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "search" : { + "description" : "Search domain for host-name lookup.", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/dns", + "text" : "dns" + }, + { + "info" : { + "GET" : { + "description" : "Read server time and time zone settings.", + "method" : "GET", + "name" : "time", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "proxyto" : "node", + "returns" : { + "additionalProperties" : 0, + "properties" : { + "localtime" : { + "description" : "Seconds since 1970-01-01 00:00:00 (local time)", + "minimum" : 1297163644, + "type" : "integer" + }, + "time" : { + "description" : "Seconds since 1970-01-01 00:00:00 UTC.", + "minimum" : 1297163644, + "type" : "integer" + }, + "timezone" : { + "description" : "Time zone", + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Set time zone.", + "method" : "PUT", + "name" : "set_timezone", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timezone" : { + "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/time", + "text" : "time" + }, + { + "info" : { + "GET" : { + "description" : "Read server status. This is used by the cluster manager to test the node health.", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "additionalProperties" : 1, + "properties" : { + "insync" : { + "description" : "Database is synced with other nodes.", + "type" : "boolean" + }, + "time" : { + "description" : "Seconds since 1970-01-01 00:00:00 UTC.", + "minimum" : 1297163644, + "type" : "integer" + }, + "uptime" : { + "description" : "The uptime of the system in seconds.", + "minimum" : 0, + "type" : "integer" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/status", + "text" : "status" + } + ], + "info" : { + "GET" : { + "description" : "Node index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}", + "text" : "{node}" + } + ], + "info" : { + "GET" : { + "description" : "Cluster node index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{node}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes", + "text" : "nodes" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "description" : "Delete a user.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "userid" : { + "description" : "User ID", + "format" : "pmg-userid", + "maxLength" : 64, + "minLength" : 4, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "description" : "Read User data.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "userid" : { + "description" : "User ID", + "format" : "pmg-userid", + "maxLength" : 64, + "minLength" : 4, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "properties" : {}, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update user data.", + "method" : "PUT", + "name" : "write", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "crypt_pass" : { + "description" : "Encrypted password (see `man crypt`)", + "optional" : 1, + "pattern" : "\\$\\d\\$[a-zA-Z0-9\\.\\/]+\\$[a-zA-Z0-9\\.\\/]+", + "type" : "string" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "email" : { + "description" : "Users E-Mail address.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "default" : 0, + "description" : "Flag to enable or disable the account.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "expire" : { + "default" : 0, + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "firstname" : { + "description" : "First name.", + "maxLength" : 64, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "lastname" : { + "description" : "Last name.", + "maxLength" : 64, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "Password", + "maxLength" : 32, + "minLength" : 5, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "role" : { + "description" : "User role. Role 'root' is reseved for the Unix Superuser.", + "enum" : [ + "root", + "admin", + "qmanager", + "audit" + ], + "optional" : 1, + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pmg-userid", + "maxLength" : 64, + "minLength" : 4, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/access/users/{userid}", + "text" : "{userid}" + } + ], + "info" : { + "GET" : { + "description" : "List users.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "admin" + ] + }, + "protected" : 1, + "proxyto" : "master", + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "type" : "boolean" + }, + "role" : { + "type" : "string" + }, + "userid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{userid}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "description" : "Creat new user", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "crypt_pass" : { + "description" : "Encrypted password (see `man crypt`)", + "optional" : 1, + "pattern" : "\\$\\d\\$[a-zA-Z0-9\\.\\/]+\\$[a-zA-Z0-9\\.\\/]+", + "type" : "string" + }, + "email" : { + "description" : "Users E-Mail address.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "default" : 0, + "description" : "Flag to enable or disable the account.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "expire" : { + "default" : 0, + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "firstname" : { + "description" : "First name.", + "maxLength" : 64, + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{service}", - "rel" : "child" - } + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "lastname" : { + "description" : "Last name.", + "maxLength" : 64, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "Password", + "maxLength" : 32, + "minLength" : 5, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "role" : { + "description" : "User role. Role 'root' is reseved for the Unix Superuser.", + "enum" : [ + "root", + "admin", + "qmanager", + "audit" ], - "type" : "array" + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pmg-userid", + "maxLength" : 64, + "minLength" : 4, + "type" : "string", + "typetext" : "" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/services", - "text" : "services" + "protected" : 1, + "proxyto" : "master", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/access/users", + "text" : "users" + }, + { + "info" : { + "GET" : { + "description" : "Dummy. Useful for formaters which want to priovde a login page.", + "method" : "GET", + "name" : "get_ticket", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "world" + }, + "returns" : { + "type" : "null" + } }, - { - "info" : { - "GET" : { - "description" : "Read node RRD statistics", - "method" : "GET", - "name" : "rrddata", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" - } - } + "POST" : { + "description" : "Create or verify authentication ticket.", + "method" : "POST", + "name" : "create_ticket", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "otp" : { + "description" : "One-time password for Two-factor authentication.", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" + "password" : { + "description" : "The secret password. This can also be a valid ticket.", + "type" : "string", + "typetext" : "" + }, + "realm" : { + "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username @.", + "format" : "pmg-realm", + "maxLength" : 32, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "username" : { + "description" : "User name", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "You need to pass valid credientials.", + "user" : "world" + }, + "protected" : 1, + "returns" : { + "properties" : { + "CSRFPreventionToken" : { + "optional" : 1, + "type" : "string" + }, + "role" : { + "optional" : 1, + "type" : "string" + }, + "ticket" : { + "optional" : 1, + "type" : "string" + }, + "username" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/access/ticket", + "text" : "ticket" + }, + { + "info" : { + "PUT" : { + "description" : "Change user password.", + "method" : "PUT", + "name" : "change_passsword", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "password" : { + "description" : "The new password.", + "maxLength" : 64, + "minLength" : 5, + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pmg-userid", + "maxLength" : 64, + "minLength" : 4, + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/rrddata", - "text" : "rrddata" + "permissions" : { + "description" : "Each user is allowed to change his own password. Only root can change the password of another user.", + "user" : "all" + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/access/password", + "text" : "password" + } + ], + "info" : { + "GET" : { + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/access", + "text" : "access" + }, + { + "children" : [ + { + "children" : [ { "info" : { - "GET" : { - "description" : "Read system log", - "method" : "GET", - "name" : "syslog", + "DELETE" : { + "description" : "Delete user whitelist entries.", + "method" : "DELETE", + "name" : "whitelist_delete", "parameters" : { "additionalProperties" : 0, "properties" : { - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "address" : { + "description" : "The address you want to remove.", + "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" }, - "service" : { - "description" : "Service ID", - "maxLength" : 128, + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", "optional" : 1, "type" : "string", "typetext" : "" - }, - "since" : { - "description" : "Display all log since this date-time string.", - "optional" : 1, - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "type" : "string" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "until" : { - "description" : "Display all log until this date-time string.", - "optional" : 1, - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "type" : "string" } } }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, "protected" : 1, - "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" + "type" : "null" } } }, "leaf" : 1, - "path" : "/nodes/{node}/syslog", - "text" : "syslog" - }, - { - "info" : { - "POST" : { - "description" : "Creates a VNC Shell proxy.", - "method" : "POST", - "name" : "vncshell", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "websocket" : { - "default" : 1, - "description" : "use websocket instead of standard vnc.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } + "path" : "/quarantine/whitelist/{address}", + "text" : "{address}" + } + ], + "info" : { + "GET" : { + "description" : "Show user whitelist.", + "method" : "GET", + "name" : "whitelist", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "returns" : { + "items" : { + "properties" : { + "address" : { + "type" : "string" } }, - "protected" : 1, - "returns" : { - "additionalProperties" : 0, - "properties" : { - "port" : { - "type" : "integer" - }, - "ticket" : { - "type" : "string" - }, - "upid" : { - "type" : "string" - }, - "user" : { - "type" : "string" - } - } + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "Add user whitelist entries.", + "method" : "POST", + "name" : "whitelist_add", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "address" : { + "description" : "The address you want to add.", + "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" + }, + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/vncshell", - "text" : "vncshell" - }, - { - "info" : { - "GET" : { - "description" : "Opens a weksocket for VNC traffic.", - "method" : "GET", - "name" : "vncwebsocket", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "port" : { - "description" : "Port number returned by previous vncproxy call.", - "maximum" : 5999, - "minimum" : 5900, - "type" : "integer", - "typetext" : " (5900 - 5999)" - }, - "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/quarantine/whitelist", + "text" : "whitelist" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "description" : "Delete user blacklist entries.", + "method" : "DELETE", + "name" : "blacklist_delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "address" : { + "description" : "The address you want to remove.", "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" + }, + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", + "optional" : 1, "type" : "string", "typetext" : "" } } }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "protected" : 1, "returns" : { - "properties" : { - "port" : { - "type" : "string" - } - }, - "type" : "object" + "type" : "null" } } }, "leaf" : 1, - "path" : "/nodes/{node}/vncwebsocket", - "text" : "vncwebsocket" - }, - { - "info" : { - "GET" : { - "description" : "Read DNS settings.", - "method" : "GET", - "name" : "dns", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } + "path" : "/quarantine/blacklist/{address}", + "text" : "{address}" + } + ], + "info" : { + "GET" : { + "description" : "Show user blacklist.", + "method" : "GET", + "name" : "blacklist", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "returns" : { + "items" : { + "properties" : { + "address" : { + "type" : "string" } }, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 0, - "properties" : { - "dns1" : { - "description" : "First name server IP address.", - "optional" : 1, - "type" : "string" - }, - "dns2" : { - "description" : "Second name server IP address.", - "optional" : 1, - "type" : "string" - }, - "dns3" : { - "description" : "Third name server IP address.", - "optional" : 1, - "type" : "string" - }, - "search" : { - "description" : "Search domain for host-name lookup.", - "optional" : 1, - "type" : "string" - } - }, - "type" : "object" + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "Add user blacklist entries.", + "method" : "POST", + "name" : "blacklist_add", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "address" : { + "description" : "The address you want to add.", + "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" + }, + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/quarantine/blacklist", + "text" : "blacklist" + }, + { + "info" : { + "GET" : { + "description" : "Get a list of receivers of spam in the given timespan (Default the last 24 hours).", + "method" : "GET", + "name" : "spamusers", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "items" : { + "properties" : { + "mail" : { + "description" : "the receiving email", + "type" : "string" + } + }, + "type" : "object" }, - "PUT" : { - "description" : "Write DNS settings.", - "method" : "PUT", - "name" : "update_dns", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "dns1" : { - "description" : "First name server IP address.", - "format" : "ip", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dns2" : { - "description" : "Second name server IP address.", - "format" : "ip", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dns3" : { - "description" : "Third name server IP address.", - "format" : "ip", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "search" : { - "description" : "Search domain for host-name lookup.", - "type" : "string", - "typetext" : "" - } + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/quarantine/spamusers", + "text" : "spamusers" + }, + { + "info" : { + "GET" : { + "description" : "Get Spam Quarantine Status", + "method" : "GET", + "name" : "spamstatus", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "properties" : { + "avgbytes" : { + "description" : "Average size of stored mails in bytes.", + "type" : "number" + }, + "avgspam" : { + "description" : "Average spam level.", + "type" : "number" + }, + "count" : { + "description" : "Number of stored mails.", + "type" : "integer" + }, + "mbytes" : { + "description" : "Estimated disk space usage in MByte.", + "type" : "number" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/quarantine/spamstatus", + "text" : "spamstatus" + }, + { + "info" : { + "GET" : { + "description" : "Get a list of users with whitelist/blacklist setttings.", + "method" : "GET", + "name" : "quarusers", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "items" : { + "properties" : { + "mail" : { + "description" : "the receiving email", + "type" : "string" } }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/quarantine/quarusers", + "text" : "quarusers" + }, + { + "info" : { + "GET" : { + "description" : "Get a list of quarantined spam mails in the given timeframe (default the last 24 hours) for the given user.", + "method" : "GET", + "name" : "spam", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "pmail" : { + "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", + "format" : "email", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/dns", - "text" : "dns" - }, - { - "info" : { - "GET" : { - "description" : "Read server time and time zone settings.", - "method" : "GET", - "name" : "time", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] + }, + "returns" : { + "items" : { + "properties" : { + "bytes" : { + "description" : "Size of raw email.", + "type" : "integer" + }, + "envelope_sender" : { + "description" : "SMTP envelope sender.", + "type" : "string" + }, + "from" : { + "description" : "Header 'From' field.", + "type" : "string" + }, + "id" : { + "description" : "Unique ID", + "type" : "string" + }, + "receiver" : { + "description" : "Receiver email address", + "type" : "string" + }, + "sender" : { + "description" : "Header 'Sender' field.", + "optional" : 1, + "type" : "string" + }, + "spamlevel" : { + "description" : "Spam score.", + "type" : "number" + }, + "subject" : { + "description" : "Header 'Subject' field.", + "type" : "string" + }, + "time" : { + "description" : "Receive time stamp", + "type" : "integer" } }, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 0, - "properties" : { - "localtime" : { - "description" : "Seconds since 1970-01-01 00:00:00 (local time)", - "minimum" : 1297163644, - "type" : "integer" - }, - "time" : { - "description" : "Seconds since 1970-01-01 00:00:00 UTC.", - "minimum" : 1297163644, - "type" : "integer" - }, - "timezone" : { - "description" : "Time zone", - "type" : "string" - } - }, - "type" : "object" - } + "type" : "object" }, - "PUT" : { - "description" : "Set time zone.", - "method" : "PUT", - "name" : "set_timezone", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timezone" : { - "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.", - "type" : "string", - "typetext" : "" - } - } + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/quarantine/spam", + "text" : "spam" + }, + { + "info" : { + "GET" : { + "description" : "Get a list of quarantined virus mails in the given timeframe (default the last 24 hours).", + "method" : "GET", + "name" : "virus", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/time", - "text" : "time" - }, - { - "info" : { - "GET" : { - "description" : "Read server status. This is used by the cluster manager to test the node health.", - "method" : "GET", - "name" : "status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "items" : { + "properties" : { + "bytes" : { + "description" : "Size of raw email.", + "type" : "integer" + }, + "envelope_sender" : { + "description" : "SMTP envelope sender.", + "type" : "string" + }, + "from" : { + "description" : "Header 'From' field.", + "type" : "string" + }, + "id" : { + "description" : "Unique ID", + "type" : "string" + }, + "receiver" : { + "description" : "Receiver email address", + "type" : "string" + }, + "sender" : { + "description" : "Header 'Sender' field.", + "optional" : 1, + "type" : "string" + }, + "subject" : { + "description" : "Header 'Subject' field.", + "type" : "string" + }, + "time" : { + "description" : "Receive time stamp", + "type" : "integer" + }, + "virusname" : { + "description" : "Virus name.", + "type" : "string" } }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 1, - "properties" : { - "insync" : { - "description" : "Database is synced with other nodes.", - "type" : "boolean" - }, - "time" : { - "description" : "Seconds since 1970-01-01 00:00:00 UTC.", - "minimum" : 1297163644, - "type" : "integer" - }, - "uptime" : { - "description" : "The uptime of the system in seconds.", - "minimum" : 0, - "type" : "integer" - } - }, - "type" : "object" + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/quarantine/virus", + "text" : "virus" + }, + { + "info" : { + "GET" : { + "description" : "Get Virus Quarantine Status", + "method" : "GET", + "name" : "virusstatus", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "properties" : { + "avgbytes" : { + "description" : "Average size of stored mails in bytes.", + "type" : "number" + }, + "count" : { + "description" : "Number of stored mails.", + "type" : "integer" + }, + "mbytes" : { + "description" : "Estimated disk space usage in MByte.", + "type" : "number" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/status", - "text" : "status" + }, + "type" : "object" + } } - ], + }, + "leaf" : 1, + "path" : "/quarantine/virusstatus", + "text" : "virusstatus" + }, + { "info" : { "GET" : { - "description" : "Node index.", + "description" : "Get email data. There is a special formatter called 'htmlmail' to get sanitized html view of the mail content (use the '/api2/htmlmail/quarantine/content' url).", "method" : "GET", - "name" : "index", + "name" : "content", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "id" : { + "description" : "Unique ID", + "maxLength" : 40, + "pattern" : "C\\d+R\\d+", + "type" : "string" + }, + "raw" : { + "default" : 0, + "description" : "Display 'raw' eml data. This is only used with the 'htmlmail' formatter.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, "permissions" : { - "user" : "all" + "check" : [ + "admin", + "qmanager", + "audit", + "quser" + ] }, "returns" : { - "items" : { - "properties" : {}, - "type" : "object" + "properties" : { + "bytes" : { + "description" : "Size of raw email.", + "type" : "integer" + }, + "content" : { + "description" : "Raw email data (first 4096 bytes). Useful for preview. NOTE: The 'htmlmail' formatter displays the whole email.", + "type" : "string" + }, + "envelope_sender" : { + "description" : "SMTP envelope sender.", + "type" : "string" + }, + "from" : { + "description" : "Header 'From' field.", + "type" : "string" + }, + "header" : { + "description" : "Raw email header data.", + "type" : "string" + }, + "id" : { + "description" : "Unique ID", + "type" : "string" + }, + "receiver" : { + "description" : "Receiver email address", + "type" : "string" + }, + "sender" : { + "description" : "Header 'Sender' field.", + "optional" : 1, + "type" : "string" + }, + "spaminfo" : { + "description" : "Information about matched spam tests (name, score, desc, url).", + "type" : "array" + }, + "spamlevel" : { + "description" : "Spam score.", + "type" : "number" + }, + "subject" : { + "description" : "Header 'Subject' field.", + "type" : "string" + }, + "time" : { + "description" : "Receive time stamp", + "type" : "integer" + } }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" + "type" : "object" + } + }, + "POST" : { + "description" : "Execute quarantine actions.", + "method" : "POST", + "name" : "action", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Action - specify what you want to do with the mail.", + "enum" : [ + "whitelist", + "blacklist", + "deliver", + "delete" + ], + "type" : "string" + }, + "id" : { + "description" : "Unique ID", + "maxLength" : 40, + "pattern" : "C\\d+R\\d+", + "type" : "string" } - ], - "type" : "array" + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "quser" + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" } } }, - "leaf" : 0, - "path" : "/nodes/{node}", - "text" : "{node}" + "leaf" : 1, + "path" : "/quarantine/content", + "text" : "content" } ], "info" : { "GET" : { - "description" : "Cluster node index.", + "description" : "Directory index.", "method" : "GET", "name" : "index", "parameters" : { @@ -7795,7 +10114,7 @@ var pmgapi = [ }, "links" : [ { - "href" : "{node}", + "href" : "{name}", "rel" : "child" } ], @@ -7804,8 +10123,8 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/nodes", - "text" : "nodes" + "path" : "/quarantine", + "text" : "quarantine" }, { "children" : [ @@ -7813,489 +10132,523 @@ var pmgapi = [ "children" : [ { "info" : { - "DELETE" : { - "description" : "Delete a user.", - "method" : "DELETE", - "name" : "delete", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "userid" : { - "description" : "User ID", - "format" : "pmg-userid", - "maxLength" : 64, - "minLength" : 4, - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" - } - }, "GET" : { - "description" : "Read User data.", + "description" : "Detailed Contact Statistics.", "method" : "GET", - "name" : "read", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "userid" : { - "description" : "User ID", - "format" : "pmg-userid", - "maxLength" : 64, - "minLength" : 4, - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "properties" : {}, - "type" : "object" - } - }, - "PUT" : { - "description" : "Update user data.", - "method" : "PUT", - "name" : "write", + "name" : "contactdetails", "parameters" : { "additionalProperties" : 0, - "properties" : { - "comment" : { - "description" : "Comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "crypt_pass" : { - "description" : "Encrypted password (see `man crypt`)", - "optional" : 1, - "pattern" : "\\$\\d\\$[a-zA-Z0-9\\.\\/]+\\$[a-zA-Z0-9\\.\\/]+", - "type" : "string" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "maxLength" : 4096, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "email" : { - "description" : "Users E-Mail address.", - "format" : "email", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "default" : 0, - "description" : "Flag to enable or disable the account.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "properties" : { + "contact" : { + "description" : "Contact email address.", + "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" }, - "expire" : { - "default" : 0, - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", - "minimum" : 0, + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - 31)" }, - "firstname" : { - "description" : "First name.", - "maxLength" : 64, + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" }, - "keys" : { - "description" : "Keys for two factor auth (yubico).", - "maxLength" : 128, + "filter" : { + "description" : "Sender address filter.", + "maxLength" : 512, "optional" : 1, "type" : "string", "typetext" : "" }, - "lastname" : { - "description" : "Last name.", - "maxLength" : 64, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - 12)" }, - "password" : { - "description" : "Password", - "maxLength" : 32, - "minLength" : 5, + "orderby" : { + "description" : "Remote sorting configuration(JSON, ExtJS compatible).", + "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" }, - "role" : { - "description" : "User role. Role 'root' is reseved for the Unix Superuser.", - "enum" : [ - "root", - "admin", - "qmanager", - "audit" - ], + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (0 - N)" }, - "userid" : { - "description" : "User ID", - "format" : "pmg-userid", - "maxLength" : 64, - "minLength" : 4, - "type" : "string", - "typetext" : "" + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, - "protected" : 1, - "proxyto" : "master", + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, "returns" : { - "type" : "null" + "items" : { + "properties" : { + "blocked" : { + "description" : "Mail was blocked.", + "type" : "boolean" + }, + "bytes" : { + "description" : "Mail traffic (Bytes).", + "type" : "number" + }, + "sender" : { + "description" : "Sender email.", + "type" : "string" + }, + "spamlevel" : { + "description" : "Spam score.", + "type" : "number" + }, + "time" : { + "description" : "Receive time stamp", + "type" : "integer" + }, + "virusinfo" : { + "description" : "Virus name.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } }, "leaf" : 1, - "path" : "/access/users/{userid}", - "text" : "{userid}" + "path" : "/statistics/contact/{contact}", + "text" : "{contact}" } ], "info" : { "GET" : { - "description" : "List users.", + "description" : "Contact Address Statistics.", "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "admin" - ] - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "enable" : { - "type" : "boolean" - }, - "role" : { - "type" : "string" - }, - "userid" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{userid}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Creat new user", - "method" : "POST", - "name" : "create", + "name" : "contact", "parameters" : { "additionalProperties" : 0, "properties" : { - "comment" : { - "description" : "Comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "crypt_pass" : { - "description" : "Encrypted password (see `man crypt`)", - "optional" : 1, - "pattern" : "\\$\\d\\$[a-zA-Z0-9\\.\\/]+\\$[a-zA-Z0-9\\.\\/]+", - "type" : "string" - }, - "email" : { - "description" : "Users E-Mail address.", - "format" : "email", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "default" : 0, - "description" : "Flag to enable or disable the account.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "expire" : { - "default" : 0, - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", - "minimum" : 0, + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - N)" - }, - "firstname" : { - "description" : "First name.", - "maxLength" : 64, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "keys" : { - "description" : "Keys for two factor auth (yubico).", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "lastname" : { - "description" : "Last name.", - "maxLength" : 64, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "password" : { - "description" : "Password", - "maxLength" : 32, - "minLength" : 5, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "role" : { - "description" : "User role. Role 'root' is reseved for the Unix Superuser.", - "enum" : [ - "root", - "admin", - "qmanager", - "audit" - ], - "type" : "string" + "typetext" : " (1 - 31)" }, - "userid" : { - "description" : "User ID", - "format" : "pmg-userid", - "maxLength" : 64, - "minLength" : 4, - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "master", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/access/users", - "text" : "users" - }, - { - "info" : { - "GET" : { - "description" : "Dummy. Useful for formaters which want to priovde a login page.", - "method" : "GET", - "name" : "get_ticket", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "world" - }, - "returns" : { - "type" : "null" - } - }, - "POST" : { - "description" : "Create or verify authentication ticket.", - "method" : "POST", - "name" : "create_ticket", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "otp" : { - "description" : "One-time password for Two-factor authentication.", + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" }, - "password" : { - "description" : "The secret password. This can also be a valid ticket.", + "filter" : { + "description" : "Contact address filter.", + "maxLength" : 512, + "optional" : 1, "type" : "string", "typetext" : "" }, - "realm" : { - "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username @.", - "format" : "pmg-realm", - "maxLength" : 32, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - 12)" }, - "username" : { - "description" : "User name", - "maxLength" : 64, + "orderby" : { + "description" : "Remote sorting configuration(JSON, ExtJS compatible).", + "maxLength" : 4096, + "optional" : 1, "type" : "string", "typetext" : "" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, "permissions" : { - "description" : "You need to pass valid credientials.", - "user" : "world" + "check" : [ + "admin", + "qmanager", + "audit" + ] }, - "protected" : 1, "returns" : { - "properties" : { - "CSRFPreventionToken" : { - "optional" : 1, - "type" : "string" - }, - "role" : { - "optional" : 1, - "type" : "string" - }, - "ticket" : { - "optional" : 1, - "type" : "string" + "items" : { + "properties" : { + "bytes" : { + "description" : "Mail traffic (Bytes).", + "type" : "number" + }, + "contact" : { + "description" : "Contact email.", + "type" : "string" + }, + "count" : { + "description" : "Mail count.", + "optional" : 1, + "type" : "number" + }, + "viruscount" : { + "description" : "Number of sent virus mails.", + "optional" : 1, + "type" : "number" + } }, - "username" : { - "type" : "string" - } + "type" : "object" }, - "type" : "object" + "links" : [ + { + "href" : "{contact}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "leaf" : 1, - "path" : "/access/ticket", - "text" : "ticket" + "leaf" : 0, + "path" : "/statistics/contact", + "text" : "contact" }, { + "children" : [ + { + "info" : { + "GET" : { + "description" : "Detailed Sender Statistics.", + "method" : "GET", + "name" : "senderdetails", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" + }, + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "filter" : { + "description" : "Receiver address filter.", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "orderby" : { + "description" : "Remote sorting configuration(JSON, ExtJS compatible).", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "sender" : { + "description" : "Sender email address.", + "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" + } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "items" : { + "properties" : { + "blocked" : { + "description" : "Mail was blocked.", + "type" : "boolean" + }, + "bytes" : { + "description" : "Mail traffic (Bytes).", + "type" : "number" + }, + "receiver" : { + "description" : "Receiver email.", + "type" : "string" + }, + "spamlevel" : { + "description" : "Spam score.", + "type" : "number" + }, + "time" : { + "description" : "Receive time stamp", + "type" : "integer" + }, + "virusinfo" : { + "description" : "Virus name.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/statistics/sender/{sender}", + "text" : "{sender}" + } + ], "info" : { - "PUT" : { - "description" : "Change user password.", - "method" : "PUT", - "name" : "change_passsword", + "GET" : { + "description" : "Sender Address Statistics.", + "method" : "GET", + "name" : "sender", "parameters" : { "additionalProperties" : 0, "properties" : { - "password" : { - "description" : "The new password.", - "maxLength" : 64, - "minLength" : 5, + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" + }, + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "filter" : { + "description" : "Sender address filter.", + "maxLength" : 512, + "optional" : 1, "type" : "string", "typetext" : "" }, - "userid" : { - "description" : "User ID", - "format" : "pmg-userid", - "maxLength" : 64, - "minLength" : 4, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "orderby" : { + "description" : "Remote sorting configuration(JSON, ExtJS compatible).", + "maxLength" : 4096, + "optional" : 1, "type" : "string", "typetext" : "" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, "permissions" : { - "description" : "Each user is allowed to change his own password. Only root can change the password of another user.", - "user" : "all" + "check" : [ + "admin", + "qmanager", + "audit" + ] }, - "protected" : 1, "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/access/password", - "text" : "password" - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" + "items" : { + "properties" : { + "bytes" : { + "description" : "Mail traffic (Bytes).", + "type" : "number" + }, + "count" : { + "description" : "Mail count.", + "optional" : 1, + "type" : "number" + }, + "sender" : { + "description" : "Sender email.", + "type" : "string" + }, + "viruscount" : { + "description" : "Number of sent virus mails.", + "optional" : 1, + "type" : "number" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{sender}", + "rel" : "child" + } + ], + "type" : "array" } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/access", - "text" : "access" - }, - { - "children" : [ + } + }, + "leaf" : 0, + "path" : "/statistics/sender", + "text" : "sender" + }, { "children" : [ { "info" : { - "DELETE" : { - "description" : "Delete user whitelist entries.", - "method" : "DELETE", - "name" : "whitelist_delete", + "GET" : { + "description" : "Detailed Receiver Statistics.", + "method" : "GET", + "name" : "receiverdetails", "parameters" : { "additionalProperties" : 0, "properties" : { - "address" : { - "description" : "The address you want to remove.", + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" + }, + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "filter" : { + "description" : "Sender address filter.", "maxLength" : 512, - "pattern" : "[a-zA-Z0-9\\+\\-\\_\\*\\.\\@]+", - "type" : "string" + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "orderby" : { + "description" : "Remote sorting configuration(JSON, ExtJS compatible).", + "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" + }, + "receiver" : { + "description" : "Receiver email address.", + "maxLength" : 512, + "minLength" : 3, + "pattern" : "(?:|[^\\s\\/\\@]+\\@[^\\s\\/\\@]+)", + "type" : "string" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8303,35 +10656,108 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "audit", - "quser" + "audit" ] }, - "protected" : 1, "returns" : { - "type" : "null" + "items" : { + "properties" : { + "blocked" : { + "description" : "Mail was blocked.", + "type" : "boolean" + }, + "bytes" : { + "description" : "Mail traffic (Bytes).", + "type" : "number" + }, + "sender" : { + "description" : "Sender email.", + "type" : "string" + }, + "spamlevel" : { + "description" : "Spam score.", + "type" : "number" + }, + "time" : { + "description" : "Receive time stamp", + "type" : "integer" + }, + "virusinfo" : { + "description" : "Virus name.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } }, "leaf" : 1, - "path" : "/quarantine/whitelist/{address}", - "text" : "{address}" + "path" : "/statistics/receiver/{receiver}", + "text" : "{receiver}" } ], "info" : { "GET" : { - "description" : "Show user whitelist.", + "description" : "Receiver Address Statistics.", "method" : "GET", - "name" : "whitelist", + "name" : "receiver", "parameters" : { "additionalProperties" : 0, "properties" : { - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" + }, + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "filter" : { + "description" : "Receiver address filter.", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "orderby" : { + "description" : "Remote sorting configuration(JSON, ExtJS compatible).", + "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8339,121 +10765,98 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "audit", - "quser" + "audit" ] }, "returns" : { "items" : { "properties" : { - "address" : { + "bytes" : { + "description" : "Mail traffic (Bytes).", + "type" : "number" + }, + "count" : { + "description" : "Mail count.", + "optional" : 1, + "type" : "number" + }, + "receiver" : { + "description" : "Sender email.", "type" : "string" + }, + "spamcount" : { + "description" : "Number of sent spam mails.", + "optional" : 1, + "type" : "number" + }, + "viruscount" : { + "description" : "Number of sent virus mails.", + "optional" : 1, + "type" : "number" } }, "type" : "object" }, - "type" : "array" - } - }, - "POST" : { - "description" : "Add user whitelist entries.", - "method" : "POST", - "name" : "whitelist_add", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "address" : { - "description" : "The address you want to add.", - "maxLength" : 512, - "pattern" : "[a-zA-Z0-9\\+\\-\\_\\*\\.\\@]+", - "type" : "string" - }, - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", - "optional" : 1, - "type" : "string", - "typetext" : "" + "links" : [ + { + "href" : "{receiver}", + "rel" : "child" } - } - }, - "permissions" : { - "check" : [ - "admin", - "qmanager", - "audit", - "quser" - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" + ], + "type" : "array" } } }, "leaf" : 0, - "path" : "/quarantine/whitelist", - "text" : "whitelist" + "path" : "/statistics/receiver", + "text" : "receiver" }, { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete user blacklist entries.", - "method" : "DELETE", - "name" : "blacklist_delete", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "address" : { - "description" : "The address you want to remove.", - "maxLength" : 512, - "pattern" : "[a-zA-Z0-9\\+\\-\\_\\*\\.\\@]+", - "type" : "string" - }, - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", - "optional" : 1, - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "admin", - "qmanager", - "audit", - "quser" - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/quarantine/blacklist/{address}", - "text" : "{address}" - } - ], "info" : { "GET" : { - "description" : "Show user blacklist.", + "description" : "Mail Domains Statistics.", "method" : "GET", - "name" : "blacklist", + "name" : "domains", "parameters" : { "additionalProperties" : 0, "properties" : { - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" + }, + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8461,41 +10864,105 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "audit", - "quser" + "audit" ] }, "returns" : { "items" : { "properties" : { - "address" : { + "count_in" : { + "description" : "Incoming mail count.", + "type" : "number" + }, + "count_out" : { + "description" : "Outgoing mail count.", + "type" : "number" + }, + "domain" : { + "description" : "Domain name.", "type" : "string" + }, + "mbytes_in" : { + "description" : "Incoming mail traffic (Mebibytes).", + "type" : "number" + }, + "mbytes_out" : { + "description" : "Outgoing mail traffic (Mebibytes).", + "type" : "number" + }, + "spamcount_in" : { + "description" : "Incoming spam mails.", + "type" : "number" + }, + "spamcount_out" : { + "description" : "Outgoing spam mails.", + "type" : "number" + }, + "viruscount_in" : { + "description" : "Number of incoming virus mails.", + "type" : "number" + }, + "viruscount_out" : { + "description" : "Number of outgoing virus mails.", + "type" : "number" } }, "type" : "object" }, "type" : "array" } - }, - "POST" : { - "description" : "Add user blacklist entries.", - "method" : "POST", - "name" : "blacklist_add", + } + }, + "leaf" : 1, + "path" : "/statistics/domains", + "text" : "domains" + }, + { + "info" : { + "GET" : { + "description" : "General Mail Statistics.", + "method" : "GET", + "name" : "mail", "parameters" : { "additionalProperties" : 0, "properties" : { - "address" : { - "description" : "The address you want to add.", - "maxLength" : 512, - "pattern" : "[a-zA-Z0-9\\+\\-\\_\\*\\.\\@]+", - "type" : "string" + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" }, - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" + }, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8503,141 +10970,253 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "audit", - "quser" + "audit" ] }, - "protected" : 1, "returns" : { - "type" : "null" + "properties" : { + "avptime" : { + "description" : "Average mail processing time in seconds.", + "type" : "number" + }, + "bounces_in" : { + "description" : "Incoming bounce mail count (sender = <>).", + "type" : "number" + }, + "bounces_out" : { + "description" : "Outgoing bounce mail count (sender = <>).", + "type" : "number" + }, + "bytes_in" : { + "description" : "Incoming mail traffic (bytes).", + "type" : "number" + }, + "bytes_out" : { + "description" : "Outgoing mail traffic (bytes).", + "type" : "number" + }, + "count" : { + "description" : "Overall mail count (in and out).", + "type" : "number" + }, + "count_in" : { + "description" : "Incoming mail count.", + "type" : "number" + }, + "count_out" : { + "description" : "Outgoing mail count.", + "type" : "number" + }, + "glcount" : { + "description" : "Number of greylisted mails.", + "type" : "number" + }, + "junk_in" : { + "description" : "Incoming junk mail count (viruscount_in + spamcount_in + glcount + spfcount).", + "type" : "number" + }, + "junk_out" : { + "description" : "Outgoing junk mail count (viruscount_out + spamcount_out).", + "type" : "number" + }, + "spamcount_in" : { + "description" : "Incoming spam mails.", + "type" : "number" + }, + "spamcount_out" : { + "description" : "Outgoing spam mails.", + "type" : "number" + }, + "spfcount" : { + "description" : "Mails rejected by SPF.", + "type" : "number" + }, + "viruscount_in" : { + "description" : "Number of incoming virus mails.", + "type" : "number" + }, + "viruscount_out" : { + "description" : "Number of outgoing virus mails.", + "type" : "number" + } + }, + "type" : "object" } } }, - "leaf" : 0, - "path" : "/quarantine/blacklist", - "text" : "blacklist" + "leaf" : 1, + "path" : "/statistics/mail", + "text" : "mail" }, { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Show spam mails distribution (per day).", - "method" : "GET", - "name" : "spamlist", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "endtime" : { - "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "starttime" : { - "description" : "Only consider entries newer than 'starttime' (unix epoch).", - "minimum" : 0, - "type" : "integer", - "typetext" : " (0 - N)" - } - } + "info" : { + "GET" : { + "description" : "Mail Count Statistics.", + "method" : "GET", + "name" : "mailcount", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" }, - "permissions" : { - "check" : [ - "admin", - "qmanager", - "audit", - "quser" - ] + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "returns" : { - "items" : { - "properties" : { - "bytes" : { - "description" : "Size of raw email.", - "type" : "integer" - }, - "envelope_sender" : { - "description" : "SMTP envelope sender.", - "type" : "string" - }, - "from" : { - "description" : "Header 'From' field.", - "type" : "string" - }, - "id" : { - "description" : "Unique ID", - "type" : "string" - }, - "receiver" : { - "description" : "Receiver email address", - "type" : "string" - }, - "sender" : { - "description" : "Header 'Sender' field.", - "optional" : 1, - "type" : "string" - }, - "spamlevel" : { - "description" : "Spam score.", - "type" : "number" - }, - "subject" : { - "description" : "Header 'Subject' field.", - "type" : "string" - }, - "time" : { - "description" : "Receive time stamp", - "type" : "integer" - } - }, - "type" : "object" - }, - "type" : "array" + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "timespan" : { + "default" : 3600, + "description" : "Return Mails/, where is specified in seconds.", + "maximum" : 31622400, + "minimum" : 3600, + "optional" : 1, + "type" : "integer", + "typetext" : " (3600 - 31622400)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, - "leaf" : 1, - "path" : "/quarantine/spam/{starttime}", - "text" : "{starttime}" + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "items" : { + "properties" : { + "bounces_in" : { + "description" : "Incoming bounce mail count (sender = <>).", + "type" : "number" + }, + "bounces_out" : { + "description" : "Outgoing bounce mail count (sender = <>).", + "type" : "number" + }, + "count" : { + "description" : "Overall mail count (in and out).", + "type" : "number" + }, + "count_in" : { + "description" : "Incoming mail count.", + "type" : "number" + }, + "count_out" : { + "description" : "Outgoing mail count.", + "type" : "number" + }, + "index" : { + "description" : "Time index.", + "type" : "integer" + }, + "spamcount_in" : { + "description" : "Incoming spam mails (spamcount_in + glcount + spfcount).", + "type" : "number" + }, + "spamcount_out" : { + "description" : "Outgoing spam mails.", + "type" : "number" + }, + "time" : { + "description" : "Time (Unix epoch).", + "type" : "integer" + }, + "viruscount_in" : { + "description" : "Number of incoming virus mails.", + "type" : "number" + }, + "viruscount_out" : { + "description" : "Number of outgoing virus mails.", + "type" : "number" + } + }, + "type" : "object" + }, + "type" : "array" + } } - ], + }, + "leaf" : 1, + "path" : "/statistics/mailcount", + "text" : "mailcount" + }, + { "info" : { "GET" : { - "description" : "Show spam mails distribution (per day).", + "description" : "Get Statistics about detected Viruses.", "method" : "GET", - "name" : "spam", + "name" : "virus", "parameters" : { "additionalProperties" : 0, "properties" : { + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" + }, "endtime" : { - "description" : "Only consider entries older than 'endtime' (unix epoch).", + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", "minimum" : 1, "optional" : 1, "type" : "integer", "typetext" : " (1 - N)" }, - "pmail" : { - "description" : "List entries for the user with this primary email address. Quarantine users cannot speficy this parameter, but it is required for all other roles.", - "format" : "email", + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - 12)" }, "starttime" : { - "description" : "Only consider entries newer than 'startime' (unix epoch).", + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", "minimum" : 0, "optional" : 1, "type" : "integer", "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8645,63 +11224,77 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "audit", - "quser" + "audit" ] }, "returns" : { "items" : { "properties" : { "count" : { - "description" : "Number of quarantine entries.", - "type" : "integer" - }, - "day" : { - "description" : "Day (as unix epoch).", + "description" : "Detection count.", "type" : "integer" }, - "spamavg" : { - "description" : "Average spam level.", - "type" : "number" + "name" : { + "description" : "Virus name.", + "type" : "string" } }, "type" : "object" }, - "links" : [ - { - "href" : "{day}", - "rel" : "child" - } - ], "type" : "array" } } }, - "leaf" : 0, - "path" : "/quarantine/spam", - "text" : "spam" + "leaf" : 1, + "path" : "/statistics/virus", + "text" : "virus" }, { "info" : { "GET" : { - "description" : "Get email data. There is a special formatter called 'htmlmail' to get sanitized html view of the mail content (use the '/api2/htmlmail/quarantine/content' url).", + "description" : "Get the count of spam mails grouped by spam score. Count for score 10 includes mails with spam score > 10.", "method" : "GET", - "name" : "content", + "name" : "spamscores", "parameters" : { "additionalProperties" : 0, "properties" : { - "id" : { - "description" : "Unique ID", - "maxLength" : 40, - "pattern" : "C\\d+R\\d+", - "type" : "string" + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" }, - "raw" : { - "default" : 0, - "description" : "Display 'raw' eml data. This is only used with the 'htmlmail' formatter.", + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" + }, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8709,87 +11302,200 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "audit", - "quser" + "audit" ] }, "returns" : { - "properties" : { - "bytes" : { - "description" : "Size of raw email.", - "type" : "integer" - }, - "content" : { - "description" : "Raw email data (first 4096 bytes). Useful for preview. NOTE: The 'htmlmail' formatter displays the whole email.", - "type" : "string" - }, - "envelope_sender" : { - "description" : "SMTP envelope sender.", - "type" : "string" - }, - "from" : { - "description" : "Header 'From' field.", - "type" : "string" - }, - "header" : { - "description" : "Raw email header data.", - "type" : "string" - }, - "id" : { - "description" : "Unique ID", - "type" : "string" - }, - "receiver" : { - "description" : "Receiver email address", - "type" : "string" + "items" : { + "properties" : { + "count" : { + "description" : "Detection count.", + "type" : "integer" + }, + "level" : { + "description" : "Spam level.", + "type" : "string" + }, + "ratio" : { + "description" : "Portion of overall mail count.", + "type" : "number" + } }, - "sender" : { - "description" : "Header 'Sender' field.", + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/statistics/spamscores", + "text" : "spamscores" + }, + { + "info" : { + "GET" : { + "description" : "Get the count of spam mails grouped by spam score. Count for score 10 includes mails with spam score > 10.", + "method" : "GET", + "name" : "maildistribution", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (1 - 31)" }, - "spaminfo" : { - "description" : "Information about matched spam tests (name, score, desc, url).", - "type" : "array" + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "spamlevel" : { - "description" : "Spam score.", - "type" : "number" + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" }, - "subject" : { - "description" : "Header 'Subject' field.", - "type" : "string" + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "time" : { - "description" : "Receive time stamp", - "type" : "integer" + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } + } + }, + "permissions" : { + "check" : [ + "admin", + "qmanager", + "audit" + ] + }, + "returns" : { + "items" : { + "properties" : { + "bounces_in" : { + "description" : "Incoming bounce mail count (sender = <>).", + "type" : "number" + }, + "bounces_out" : { + "description" : "Outgoing bounce mail count (sender = <>).", + "type" : "number" + }, + "count" : { + "description" : "Overall mail count (in and out).", + "type" : "number" + }, + "count_in" : { + "description" : "Incoming mail count.", + "type" : "number" + }, + "count_out" : { + "description" : "Outgoing mail count.", + "type" : "number" + }, + "index" : { + "description" : "Hour (0-23).", + "type" : "integer" + }, + "spamcount_in" : { + "description" : "Incoming spam mails (spamcount_in + glcount + spfcount).", + "type" : "number" + }, + "spamcount_out" : { + "description" : "Outgoing spam mails.", + "type" : "number" + }, + "viruscount_in" : { + "description" : "Number of incoming virus mails.", + "type" : "number" + }, + "viruscount_out" : { + "description" : "Number of outgoing virus mails.", + "type" : "number" + } + }, + "type" : "object" }, - "type" : "object" + "type" : "array" } - }, - "POST" : { - "description" : "Execute quarantine actions.", - "method" : "POST", - "name" : "action", + } + }, + "leaf" : 1, + "path" : "/statistics/maildistribution", + "text" : "maildistribution" + }, + { + "info" : { + "GET" : { + "description" : "Mail RBL Count Statistics.", + "method" : "GET", + "name" : "rblcount", "parameters" : { "additionalProperties" : 0, "properties" : { - "action" : { - "description" : "Action - specify what you want to do with the mail.", - "enum" : [ - "whitelist", - "blacklist", - "deliver", - "delete" - ], - "type" : "string" + "day" : { + "description" : "Day of month. Get statistics for a single day.", + "maximum" : 31, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 31)" }, - "id" : { - "description" : "Unique ID", - "maxLength" : 40, - "pattern" : "C\\d+R\\d+", - "type" : "string" + "endtime" : { + "description" : "Only consider entries older than 'endtime' (unix epoch). This is set to ' + 1day' by default.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "month" : { + "description" : "Month. You will get statistics for the whole month if you do not specify a day.", + "maximum" : 12, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 12)" + }, + "starttime" : { + "description" : "Only consider entries newer than 'starttime' (unix epoch). Default is 'now - 1day'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "timespan" : { + "default" : 3600, + "description" : "Return RBL rejects/, where is specified in seconds.", + "maximum" : 31622400, + "minimum" : 3600, + "optional" : 1, + "type" : "integer", + "typetext" : " (3600 - 31622400)" + }, + "year" : { + "description" : "Year. Defaults to current year. You will get statistics for the whole year if you do not specify a month or day.", + "maximum" : 3000, + "minimum" : 1900, + "optional" : 1, + "type" : "integer", + "typetext" : " (1900 - 3000)" } } }, @@ -8797,18 +11503,34 @@ var pmgapi = [ "check" : [ "admin", "qmanager", - "quser" + "audit" ] }, - "protected" : 1, "returns" : { - "type" : "null" + "items" : { + "properties" : { + "count" : { + "description" : "RBL recject count.", + "type" : "number" + }, + "index" : { + "description" : "Time index.", + "type" : "integer" + }, + "time" : { + "description" : "Time (Unix epoch).", + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" } } }, "leaf" : 1, - "path" : "/quarantine/content", - "text" : "content" + "path" : "/statistics/rblcount", + "text" : "rblcount" } ], "info" : { @@ -8820,7 +11542,11 @@ var pmgapi = [ "additionalProperties" : 0 }, "permissions" : { - "user" : "all" + "check" : [ + "admin", + "qmanager", + "audit" + ] }, "returns" : { "items" : { @@ -8838,8 +11564,8 @@ var pmgapi = [ } }, "leaf" : 0, - "path" : "/quarantine", - "text" : "quarantine" + "path" : "/statistics", + "text" : "statistics" }, { "info" : { diff --git a/pmg.conf.5-opts.adoc b/pmg.conf.5-opts.adoc index baa18f0..d3d52fa 100644 --- a/pmg.conf.5-opts.adoc +++ b/pmg.conf.5-opts.adoc @@ -1,5 +1,9 @@ .Section 'admin' +`advfilter`: `` ('default =' `1`):: + +Use advanced filters for statistic. + `dailyreport`: `` ('default =' `1`):: Send daily reports. @@ -20,21 +24,9 @@ Prevent changes if current configuration file has different SHA1 digest. This ca Administrator E-Mail address. -`proxypassword`: `` :: - -HTTP proxy password. - -`proxyport`: ` (1 - N)` ('default =' `8080`):: - -HTTP proxy port. - -`proxyserver`: `` :: - -HTTP proxy server address. - -`proxyuser`: `` :: +`http_proxy`: `http://.*` :: -HTTP proxy user name. +Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/') `statlifetime`: ` (1 - N)` ('default =' `7`):: diff --git a/pmgconfig.1-synopsis.adoc b/pmgconfig.1-synopsis.adoc index 06839db..085138f 100644 --- a/pmgconfig.1-synopsis.adoc +++ b/pmgconfig.1-synopsis.adoc @@ -5,7 +5,7 @@ Generate /etc/pmg/pmg-api.pem (self signed certificate for GUI and REST API). -`-force` `` ('default =' `0`):: +`--force` `` ('default =' `0`):: Overwrite existing certificate. @@ -26,7 +26,7 @@ Get help about specified command. Command name -`-verbose` `` :: +`--verbose` `` :: Verbose output format. @@ -49,7 +49,7 @@ Syncronize the LDAP database. Syncronize Proxmox Mail Gateway configurations with system configuration. -`-restart` `` ('default =' `0`):: +`--restart` `` ('default =' `0`):: Restart services if necessary. @@ -60,7 +60,7 @@ Restart services if necessary. Generate /etc/pmg/pmg-tls.pem (self signed certificate for encrypted SMTP traffic). -`-force` `` ('default =' `0`):: +`--force` `` ('default =' `0`):: Overwrite existing certificate. diff --git a/pmgdaemon.8-synopsis.adoc b/pmgdaemon.8-synopsis.adoc index 3ce6def..e8e6ea4 100644 --- a/pmgdaemon.8-synopsis.adoc +++ b/pmgdaemon.8-synopsis.adoc @@ -8,7 +8,7 @@ Get help about specified command. Command name -`-verbose` `` :: +`--verbose` `` :: Verbose output format. @@ -25,7 +25,7 @@ Restart the daemon (or start if not running). Start the daemon. -`-debug` `` ('default =' `0`):: +`--debug` `` ('default =' `0`):: Debug mode - stay in foreground diff --git a/pmgdb.1-synopsis.adoc b/pmgdb.1-synopsis.adoc index bce66a8..aba2a6c 100644 --- a/pmgdb.1-synopsis.adoc +++ b/pmgdb.1-synopsis.adoc @@ -21,7 +21,7 @@ Get help about specified command. Command name -`-verbose` `` :: +`--verbose` `` :: Verbose output format. @@ -32,11 +32,11 @@ Verbose output format. Initialize/Upgrade the PMG rule database. -`-force` `` ('default =' `0`):: +`--force` `` ('default =' `0`):: Delete existing database. -`-statistics` `` ('default =' `0`):: +`--statistics` `` ('default =' `0`):: Reset and update statistic database. diff --git a/pmgproxy.8-synopsis.adoc b/pmgproxy.8-synopsis.adoc index 5b2c393..a422ebf 100644 --- a/pmgproxy.8-synopsis.adoc +++ b/pmgproxy.8-synopsis.adoc @@ -8,7 +8,7 @@ Get help about specified command. Command name -`-verbose` `` :: +`--verbose` `` :: Verbose output format. @@ -25,7 +25,7 @@ Restart the daemon (or start if not running). Start the daemon. -`-debug` `` ('default =' `0`):: +`--debug` `` ('default =' `0`):: Debug mode - stay in foreground