You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-20Lines changed: 41 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,18 +11,24 @@ You will find examples and detailed instructions there.
11
11
Please keep the following in mind:
12
12
13
13
- the API browser tool doesn't support all available data collections/API endpoints, see the list below of those that are currently supported
14
-
- currently, versions 4.x.x and 5.x.x of the UniFi Controller software are supported (version 5.10.12 has been confirmed to work)
14
+
- currently, versions 4.x.x and 5.x.x of the UniFi Controller software are supported (version 5.11.50 has been confirmed to work)
15
15
- there is still work to be done to add/improve functionality and usability of this tool so suggestions/comments are welcome. Please use the github [issue](https://github.com/Art-of-WiFi/UniFi-API-browser/issues) list or the Ubiquiti Community forums (https://community.ubnt.com/t5/UniFi-Wireless/UniFi-API-browser-tool-released/m-p/1392651) to share your ideas/questions.
16
16
- please read the Security Notice below before installing this tool!
17
17
18
+
19
+
### Upgrading from 1.X to 2.X
20
+
21
+
Because the structure of the configuration file has changed slightly, we recommend creating a fresh install when upgrading from 1.X to 2.X.
22
+
23
+
18
24
### Features
19
25
20
26
The UniFi API browser tool offers the following features:
21
27
22
28
- browse data collections/API endpoints exposed by the UniFi Controller API in an easy manner
23
29
- switch between sites managed by the connected controller
24
-
- switch between output formats (currently `json`, `PHP array`, `PHP var_dump`, `PHP var_export`, `json highlighted`and `PHP array using Kint` have been implemented)
25
-
- copy the results to clipboard (only output formats `json`, `PHP array`, `PHP var_dump` and `PHP var_export` are supported, will fail gracefully with large collections)
30
+
- switch between output formats (currently `JSON`, `JSON highlighted`, `PHP array, interactive`and `PHP array, highlighted` have been implemented)
31
+
- copy the results to clipboard (this is only supported with the `JSON` output format, will fail gracefully with large collections)
26
32
- switch between default Bootstrap theme and the [Bootswatch](https://bootswatch.com/) themes
27
33
- an "About" modal which shows version information for PHP, cURL and the UniFi Controller
28
34
- very easy setup with minimal dependencies
@@ -52,9 +58,9 @@ The UniFi API browser tool offers the following features:
52
58
- daily site stats
53
59
- hourly access point stats
54
60
- daily access point stats
55
-
- all sites stats (supported on controller version 5.2.9 and higher)
61
+
- all sites stats
56
62
- health metrics
57
-
- dashboard metrics (supported on controller version 4.9.1.alpha and higher)
63
+
- dashboard metrics
58
64
- port forward stats
59
65
- Hotspot
60
66
- stat vouchers
@@ -84,11 +90,13 @@ The UniFi API browser tool offers the following features:
84
90
85
91
Please note that the bundled API client supports many more API endpoints, not all make sense to add to the API browser though.
86
92
93
+
87
94
### Requirements
88
95
89
-
- a web server with PHP and cURL modules installed (tested on apache2 with PHP Version 5.6.1 and cURL 7.42.1 and with PHP 7.0.7 and cURL 7.37.0)
96
+
- a web server with PHP and cURL modules installed (tested on apache2 with PHP Version 5.6.1 and cURL 7.42.1 and with PHP 7.2.5 and cURL 7.60.0)
90
97
- network connectivity between this web server and the server (and port) where the UniFi controller is running (in case you are seeing errors, please check out [this issue](https://github.com/Art-of-WiFi/UniFi-API-browser/issues/4))
91
-
- clients using this tool should have internet access because the CSS and JS files are loaded from CDNs.
98
+
- clients using this tool should have internet access because several CSS and JS files are loaded from public CDNs.
Alternatively you may choose to download the zip file and unzip it in your directory of choice, then follow the configuration steps below.
103
111
112
+
104
113
### Configuration
105
114
106
-
- credentials for access to the UniFi Controller API can be configured, in part or in whole, in the file named `config.template.php` which should be copied/renamed to `config.php`
107
-
- starting with API browser tool version 1.0.34, if all or a portion of the credentials are not specified in the `config.php` file or this file is not present, then a login form will ask for the missing credential information
108
-
-starting with version 1.0.3, you can store **multiple controller configurations**in an array inside the `config.php` file
109
-
- please refer to the comments in the `config.template.php` file for further instructions
115
+
- credentials for access to the UniFi Controller API can be configured, in part or in whole, in the file named `config/config-template.php` which should be copied/renamed to `config/config.php`
116
+
- starting with version 1.0.3, you can store **multiple controller configurations** in an array inside the `config/config.php` file
117
+
-please refer to the instructions in the `config/config-template.php` file for further configuration instructions
118
+
-starting with API browser tool version 2.0.0 you can restrict access to the tool by creating user accounts and passwords, please refer to the instructions in the `config/users-template.php` file for further details
110
119
- after following these steps, you can open the tool in your browser (assuming you installed it in the root folder of your web server as suggested above) by going to this url: `http(s)://<server IP address>/UniFi-API-browser/`
111
120
121
+
112
122
### Updates
113
123
114
124
If you have installed the tool using the `git clone` command, you can install updates by going into the directory where the tool has been installed, and running the `git pull` command from there.
115
125
116
126
Otherwise you can simply copy the contents from the latest [zip file](https://github.com/Art-of-WiFi/UniFi-API-browser/archive/master.zip) to the directory where the tool has been installed.
117
127
128
+
118
129
### Credits
119
130
120
-
The PHP API client that comes bundled with this tool is based on the work done by the following developers:
131
+
The PHP API client that comes bundled with this tool is based on the work by the following developers:
The use of this tool is **not secured in any way**! Make sure to prevent unauthorised access to it, preventing exposure of details and credentials such as user names and passwords for access to the UniFi Controller!
153
+
We highly recommend enabling user name/password authentication by creating a `config/users.php` based on the included `config/users-template.php` file. When creating passwords and their SHA512 hashes for entry in the `config/users.php` file, please make sure to use strong random passwords.
154
+
155
+
Please refer to the instructions in the `config/users-template.php` file for further details
156
+
157
+
It is your own responsibility to implement the necessary additional controls in securing this application and preventing unwanted access.
Copy file name to clipboardExpand all lines: TODO.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,17 @@
1
1
## TODO:
2
2
3
3
1. Make the output format selectable like with the siteid, so that after selection we can switch between the two lines below for different output presentation. Possible options to add are ~~PHP array/json~~/table/chart:
4
-
-~~print_r ($data);~~
5
-
-~~echo json_encode($data, JSON_PRETTY_PRINT);~~
6
4
- DataTables for table output and more
7
5
- requires "flattening" of multidimensional arrays/objects
8
6
- or else only expose a selection of attributes
9
7
- Chart output as option for certain data collections (and selected attributes)
8
+
- same requirements as for tables
10
9
11
10
2. Add the option to export data to CSV file format
12
11
- need to have the option to select which fields to export
13
12
- could be combined with the DataTables output option
14
13
- requires "flattening" of multidimensional arrays/objects
15
14
16
-
3.~~Add simple user/password login~~
17
-
-~~consider setting user name/password in the config file, though not very secure~~
18
-
-~~avoid dependencies such as MySQL etc. as much as possible~~
0 commit comments