|
|
@@ -1,6 +1,72 @@
|
|
|
<?php
|
|
|
+/**
|
|
|
+ * @apiDefine UserNotAuthorizedError
|
|
|
+ *
|
|
|
+ * @apiError UserNotAuthorized The user is not authorized or Token not valid
|
|
|
+ *
|
|
|
+ * @apiErrorExample Error-Response:
|
|
|
+ * HTTP/1.1 401 Not Authorized
|
|
|
+ * {
|
|
|
+ * "status": "error",
|
|
|
+ * "statusText": "API/Token invalid or not set",
|
|
|
+ * "data": null
|
|
|
+ * }
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * @apiDefine DataBooleanSuccess
|
|
|
+ * @apiSuccess {Boolean} data Output Boolean.
|
|
|
+ * @apiSuccessExample Success-Response:
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
+ * {
|
|
|
+ * "status": "success",
|
|
|
+ * "statusText": "success",
|
|
|
+ * "data": true
|
|
|
+ * }
|
|
|
+ *
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * @apiDefine DataJSONSuccess
|
|
|
+ * @apiSuccess {JSON} data Output JSON.
|
|
|
+ * @apiSuccessExample Success-Response:
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
+ * {
|
|
|
+ * "status": "success",
|
|
|
+ * "statusText": "success",
|
|
|
+ * "data": { **JSON** }
|
|
|
+ * }
|
|
|
+ *
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * @apiDefine DataHTMLSuccess
|
|
|
+ * @apiSuccess {String} data Output of Page.
|
|
|
+ *
|
|
|
+ * @apiSuccessExample Success-Response:
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
+ * {
|
|
|
+ * "status": "success",
|
|
|
+ * "statusText": "success",
|
|
|
+ * "data": "<html>html encoded elements</html>"
|
|
|
+ * }
|
|
|
+ *
|
|
|
+ */
|
|
|
+/**
|
|
|
+ * @apiDefine admin Admin or API Key Access Only
|
|
|
+ * Only the Admin/Co-Admin and API Key have access to this endpoint
|
|
|
+ */
|
|
|
//include functions
|
|
|
require_once 'functions.php';
|
|
|
+// Include all pages files
|
|
|
+foreach (glob(__DIR__ . DIRECTORY_SEPARATOR . 'pages' . DIRECTORY_SEPARATOR . "*.php") as $filename) {
|
|
|
+ require_once $filename;
|
|
|
+}
|
|
|
+// Include all custom pages files
|
|
|
+foreach (glob(__DIR__ . DIRECTORY_SEPARATOR . 'pages' . DIRECTORY_SEPARATOR . 'custom' . DIRECTORY_SEPARATOR . "*.php") as $filename) {
|
|
|
+ require_once $filename;
|
|
|
+}
|
|
|
+// Include all plugin files
|
|
|
+foreach (glob(__DIR__ . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . "*.php") as $filename) {
|
|
|
+ require_once $filename;
|
|
|
+}
|
|
|
//Set result array
|
|
|
$result = array();
|
|
|
//Get request method
|
|
|
@@ -43,6 +109,14 @@ if (strpos($function, 'v1_custom_page_') !== false) {
|
|
|
switch ($function) {
|
|
|
case 'v1_settings_page':
|
|
|
switch ($method) {
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/page Get Admin Settings
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetSettingsPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
$result['status'] = 'success';
|
|
|
@@ -64,6 +138,14 @@ switch ($function) {
|
|
|
break;
|
|
|
case 'v1_homepage_page':
|
|
|
switch ($method) {
|
|
|
+ /**
|
|
|
+ * @api {get} v1/homepage/page Get Homepage
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetHomepagePage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
case 'GET':
|
|
|
$result['status'] = 'success';
|
|
|
$result['statusText'] = 'success';
|
|
|
@@ -77,6 +159,14 @@ switch ($function) {
|
|
|
break;
|
|
|
case 'v1_settings_plugins':
|
|
|
switch ($method) {
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/plugins Get Plugins
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetPluginsPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
$result['status'] = 'success';
|
|
|
@@ -96,6 +186,14 @@ switch ($function) {
|
|
|
break;
|
|
|
case 'v1_settings_tab_editor_homepage':
|
|
|
switch ($method) {
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/tab/editor/homepage Get Homepage Settings
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetSettingsTabEditorHomepagePage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
$result['status'] = 'success';
|
|
|
@@ -115,6 +213,14 @@ switch ($function) {
|
|
|
break;
|
|
|
case 'v1_settings_tab_editor_homepage_order':
|
|
|
switch ($method) {
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/tab/editor/homepage Get Homepage Order
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetSettingsTabEditorHomepageOrderPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
$result['status'] = 'success';
|
|
|
@@ -134,6 +240,127 @@ switch ($function) {
|
|
|
break;
|
|
|
case 'v1_settings_homepage_list':
|
|
|
switch ($method) {
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/homepage/list Get Homepage Settings
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetHomepageSettigns
|
|
|
+ * @apiGroup Homepage
|
|
|
+ * @apiSuccess {String} data Output of all Homepage Settings.
|
|
|
+ * @apiSuccessExample Success-Response:
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
+ * {
|
|
|
+ * "status": "success",
|
|
|
+ * "statusText": "success",
|
|
|
+ * "data": [{
|
|
|
+ * "name": "HealthChecks",
|
|
|
+ * "enabled": true,
|
|
|
+ * "image": "plugins\/images\/tabs\/healthchecks.png",
|
|
|
+ * "category": "Monitor",
|
|
|
+ * "settings": {
|
|
|
+ * "Enable": [
|
|
|
+ * {
|
|
|
+ * "type": "switch",
|
|
|
+ * "name": "homepageHealthChecksEnabled",
|
|
|
+ * "label": "Enable",
|
|
|
+ * "value": true
|
|
|
+ * }, {
|
|
|
+ * "type": "select",
|
|
|
+ * "name": "homepageHealthChecksAuth",
|
|
|
+ * "label": "Minimum Authentication",
|
|
|
+ * "value": "1",
|
|
|
+ * "options": [
|
|
|
+ * {
|
|
|
+ * "name": "Admin",
|
|
|
+ * "value": 0
|
|
|
+ * }, {
|
|
|
+ * "name": "Co-Admin",
|
|
|
+ * "value": 1
|
|
|
+ * }, {
|
|
|
+ * "name": "Super User",
|
|
|
+ * "value": 2
|
|
|
+ * }, {
|
|
|
+ * "name": "Power User",
|
|
|
+ * "value": 3
|
|
|
+ * }, {
|
|
|
+ * "name": "User",
|
|
|
+ * "value": 4
|
|
|
+ * }, {
|
|
|
+ * "name": "temp again",
|
|
|
+ * "value": 5
|
|
|
+ * }, {
|
|
|
+ * "name": "GuestAccts",
|
|
|
+ * "value": 999
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ * }
|
|
|
+ * ],
|
|
|
+ * "Connection": [
|
|
|
+ * {
|
|
|
+ * "type": "input",
|
|
|
+ * "name": "healthChecksURL",
|
|
|
+ * "label": "URL",
|
|
|
+ * "value": "https://healthchecks.io/api/v1/checks/",
|
|
|
+ * "help": "URL for HealthChecks API",
|
|
|
+ * "placeholder": "HealthChecks API URL"
|
|
|
+ * }, {
|
|
|
+ * "type": "password-alt",
|
|
|
+ * "name": "healthChecksToken",
|
|
|
+ * "label": "Token",
|
|
|
+ * "value": "TOKENHERE"
|
|
|
+ * }
|
|
|
+ * ],
|
|
|
+ * "Misc Options": [
|
|
|
+ * {
|
|
|
+ * "type": "input",
|
|
|
+ * "name": "healthChecksTags",
|
|
|
+ * "label": "Tags",
|
|
|
+ * "value": "",
|
|
|
+ * "help": "Pull only checks with this tag - Blank for all",
|
|
|
+ * "placeholder": "Multiple tags using CSV - tag1,tag2"
|
|
|
+ * }, {
|
|
|
+ * "type": "select",
|
|
|
+ * "name": "homepageHealthChecksRefresh",
|
|
|
+ * "label": "Refresh Seconds",
|
|
|
+ * "value": "3600000",
|
|
|
+ * "options": [
|
|
|
+ * {
|
|
|
+ * "name": "5",
|
|
|
+ * "value": "5000"
|
|
|
+ * }, {
|
|
|
+ * "name": "10",
|
|
|
+ * "value": "10000"
|
|
|
+ * }, {
|
|
|
+ * "name": "15",
|
|
|
+ * "value": "15000"
|
|
|
+ * }, {
|
|
|
+ * "name": "30",
|
|
|
+ * "value": "30000"
|
|
|
+ * }, {
|
|
|
+ * "name": "60 [1 Minute]",
|
|
|
+ * "value": "60000"
|
|
|
+ * }, {
|
|
|
+ * "name": "300 [5 Minutes]",
|
|
|
+ * "value": "300000"
|
|
|
+ * }, {
|
|
|
+ * "name": "600 [10 Minutes]",
|
|
|
+ * "value": "600000"
|
|
|
+ * }, {
|
|
|
+ * "name": "900 [15 Minutes]",
|
|
|
+ * "value": "900000"
|
|
|
+ * }, {
|
|
|
+ * "name": "1800 [30 Minutes]",
|
|
|
+ * "value": "1800000"
|
|
|
+ * }, {
|
|
|
+ * "name": "3600 [1 Hour]",
|
|
|
+ * "value": "3600000"
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ * }
|
|
|
+ * ]
|
|
|
+ * }]
|
|
|
+ * }
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
$result['status'] = 'success';
|
|
|
@@ -145,17 +372,6 @@ switch ($function) {
|
|
|
$result['data'] = null;
|
|
|
}
|
|
|
break;
|
|
|
- case 'POST':
|
|
|
- if (qualifyRequest(1)) {
|
|
|
- $result['status'] = 'success';
|
|
|
- $result['statusText'] = 'success';
|
|
|
- $result['data'] = editPlugins($_POST);
|
|
|
- } else {
|
|
|
- $result['status'] = 'error';
|
|
|
- $result['statusText'] = 'API/Token invalid or not set';
|
|
|
- $result['data'] = null;
|
|
|
- }
|
|
|
- break;
|
|
|
default:
|
|
|
$result['status'] = 'error';
|
|
|
$result['statusText'] = 'The function requested is not defined for method: ' . $method;
|
|
|
@@ -163,6 +379,48 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_plugins_list':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/plugins/list Get List of Plugins
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetPlugins
|
|
|
+ * @apiGroup Plugins
|
|
|
+ * @apiSuccess {String} data Output plugins list.
|
|
|
+ * @apiSuccessExample Success-Response:
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
+ * {
|
|
|
+ * "status": "success",
|
|
|
+ * "statusText": "success",
|
|
|
+ * "data": {
|
|
|
+ * "chat": {
|
|
|
+ * "name": "Chat",
|
|
|
+ * "author": "CauseFX",
|
|
|
+ * "category": "Utilities",
|
|
|
+ * "link": "",
|
|
|
+ * "license": "personal,business",
|
|
|
+ * "idPrefix": "CHAT",
|
|
|
+ * "configPrefix": "CHAT",
|
|
|
+ * "version": "1.0.0",
|
|
|
+ * "image": "plugins/images/chat.png",
|
|
|
+ * "settings": true,
|
|
|
+ * "homepage": false,
|
|
|
+ * "enabled": true
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
+ /**
|
|
|
+ * @api {post} v1/settings/plugins/list Toggle Plugin
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName TogglePlugin
|
|
|
+ * @apiGroup Plugins
|
|
|
+ * @apiParam {Object} data nested data object.
|
|
|
+ * @apiParam {String} data[action] enable/disable.
|
|
|
+ * @apiParam {String} data[name] Name of Plugin.
|
|
|
+ * @apiParam {String} data[configName] configName i.e. CHAT-enabled.
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -193,6 +451,14 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_settings_logs':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/settings/logs Get Logs
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetLogsPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -212,6 +478,14 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_settings_sso':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/settings/sso Get SSO
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetSSOPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -231,6 +505,14 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_settings_main':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/settings/main Get Settings Main
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetSettingsMainPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -250,6 +532,26 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_customize_appearance':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/customize/appearance Get Customize Appearance
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetCustomizePage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
+ /**
|
|
|
+ * @api {post} v1/settings/customize/appearance Edit Customize Appearance
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostCustomizePage
|
|
|
+ * @apiGroup Appearance
|
|
|
+ * @apiParam {Object} data nested data object.
|
|
|
+ * @apiParam {String} data[action] editCustomizeAppearance.
|
|
|
+ * @apiParam {String} data[name] Name.
|
|
|
+ * @apiParam {String} data[value] Value.
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -280,6 +582,17 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_remove_file':
|
|
|
+ /**
|
|
|
+ * @api {post} v1/remove/file Remove File
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostRemoveFile
|
|
|
+ * @apiGroup Files
|
|
|
+ * @apiParam {Object} data nested data object.
|
|
|
+ * @apiParam {String} data[path] File Path.
|
|
|
+ * @apiParam {String} data[name] File Name.
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'POST':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -299,6 +612,18 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_update_config':
|
|
|
+ /**
|
|
|
+ * @api {post} v1/update/config Update Config Item
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostUpdateConfig
|
|
|
+ * @apiGroup Config
|
|
|
+ * @apiParam {Object} data nested data object.
|
|
|
+ * @apiParam {String} data[type] input|select|switch|password.
|
|
|
+ * @apiParam {String} data[name] Name.
|
|
|
+ * @apiParam {String} data[value] Value.
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'POST':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -318,6 +643,26 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_update_config_multiple':
|
|
|
+ /**
|
|
|
+ * @api {post} v1/update/config/multiple Update Multiple Config Items
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostUpdateConfigMultiple
|
|
|
+ * @apiGroup Config
|
|
|
+ * @apiPermission admin
|
|
|
+ * @apiParam {Object} data[payload] nested payload object.
|
|
|
+ * @apiParam {String} data.:keyName Value of Name defined from key.
|
|
|
+ * @apiParamExample {json} Request-Example:
|
|
|
+ * {
|
|
|
+ * "data": {
|
|
|
+ * "payload": {
|
|
|
+ * "title": "Organizr V2",
|
|
|
+ * "logo": "plugins/images/organizr/logo-wide.png"
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'POST':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -337,6 +682,37 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_update_config_multiple_form':
|
|
|
+ /**
|
|
|
+ * @api {post} v1/update/config/multiple/form Update Multiple Config Items Form
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostUpdateConfigMultipleForm
|
|
|
+ * @apiGroup Config
|
|
|
+ * @apiPermission admin
|
|
|
+ * @apiParam {Object} data[payload] nested payload object.
|
|
|
+ * @apiParam {Object} data.:keyName Config ID/Key.
|
|
|
+ * @apiParam {String} data.:keyName.name Config ID/Key.
|
|
|
+ * @apiParam {String} data.:keyName.value Config Value.
|
|
|
+ * @apiParam {String} data.:keyName.type Config Type input|select|switch|password.
|
|
|
+ * @apiParamExample {json} Request-Example:
|
|
|
+ * {
|
|
|
+ * "data": {
|
|
|
+ * "payload": {
|
|
|
+ * "title": {
|
|
|
+ * "name": "title",
|
|
|
+ * "value": "Organizr V2",
|
|
|
+ * "type": "input"
|
|
|
+ * },
|
|
|
+ * "logo": {
|
|
|
+ * "name": "logo",
|
|
|
+ * "value": "plugins/images/organizr/logo-wide.png",
|
|
|
+ * "type": "input"
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiUse DataBooleanSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'POST':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -356,6 +732,23 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_homepage_connect':
|
|
|
+ /**
|
|
|
+ * @api {post} v1/homepage/connect Homepage Item Connect
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostHomepageItemConnect
|
|
|
+ * @apiGroup Homepage
|
|
|
+ * @apiPermission admin
|
|
|
+ * @apiParam {Object} data payload object.
|
|
|
+ * @apiParam {Object} data[action] Homepage Item i.e. getPlexStreams|getPlexRecent.
|
|
|
+ * @apiParamExample {json} Request-Example:
|
|
|
+ * {
|
|
|
+ * "data": {
|
|
|
+ * "action": "getPlexStreams"
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiUse DataJSONSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'POST':
|
|
|
$result['status'] = 'success';
|
|
|
@@ -369,6 +762,38 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_ping_list':
|
|
|
+ /**
|
|
|
+ * @api {post} v1/ping/list Homepage Item Connect
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName PostPingList
|
|
|
+ * @apiGroup Ping
|
|
|
+ * @apiParam {Object} data payload object.
|
|
|
+ * @apiParam {Object[]} data[pingList] List of ip/hostname and ports [Optional String of hostname:port]
|
|
|
+ * @apiParamExample {json} Object
|
|
|
+ * {
|
|
|
+ * "data": {
|
|
|
+ * "pingList": ["docker.home.lab:3579", "docker.home.lab:8181"]
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiParamExample {json} String
|
|
|
+ * {
|
|
|
+ * "data": {
|
|
|
+ * "pingList": ["docker.home.lab:3579", "docker.home.lab:8181"]
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiSuccess {String} data Output ping results and response times.
|
|
|
+ * @apiSuccessExample Success-Response:
|
|
|
+ * HTTP/1.1 200 OK
|
|
|
+ * {
|
|
|
+ * "status": "success",
|
|
|
+ * "statusText": "success",
|
|
|
+ * "data":{
|
|
|
+ * "docker.home.lab:3579":10.77,
|
|
|
+ * "docker.home.lab:8181":0.66
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'POST':
|
|
|
$result['status'] = 'success';
|
|
|
@@ -401,6 +826,14 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_tab_editor_tabs':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/tab/editor/tabs Get Tab Editor Tabs
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetTabEditorTabsPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -431,6 +864,14 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_tab_editor_categories':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/tab/editor/categories Get Tab Editor Categories
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetTabEditorCategoriesPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|
|
|
@@ -461,6 +902,14 @@ switch ($function) {
|
|
|
}
|
|
|
break;
|
|
|
case 'v1_settings_user_manage_users':
|
|
|
+ /**
|
|
|
+ * @api {get} v1/settings/user/manage/users Get Manage Users
|
|
|
+ * @apiVersion 1.0.0
|
|
|
+ * @apiName GetManageUsersPage
|
|
|
+ * @apiGroup Pages
|
|
|
+ * @apiUse DataHTMLSuccess
|
|
|
+ * @apiUse UserNotAuthorizedError
|
|
|
+ */
|
|
|
switch ($method) {
|
|
|
case 'GET':
|
|
|
if (qualifyRequest(1)) {
|