Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.err.NoSiteContext error #14

Closed
nekromoff opened this issue Nov 2, 2016 · 1 comment
Closed

api.err.NoSiteContext error #14

nekromoff opened this issue Nov 2, 2016 · 1 comment

Comments

@nekromoff
Copy link

code:

require('config.php');
require('phpapi/class.unifi.php');
$unifidata=new unifiapi($controlleruser, $controllerpassword, $controllerurl, $controllerversion);
$unifidata->debug=TRUE;
$loginresults=$unifidata->login();

$clients=$unifidata->list_clients(3600);
var_dump($clients);

debug output:

-------URL & PAYLOAD---------
https://localhost:8443/api/s/5.2.9/stat/sta

---------RESPONSE------------
{ "data" : [ ] , "meta" : { "msg" : "api.err.NoSiteContext" , "rc" : "error"}}
-----------------------------

array(0) { }

---------cURL INFO-----------
Array
(
    [url] => https://localhost:8443/logout
    [content_type] => 
    [http_code] => 302
    [header_size] => 308
    [request_size] => 154
    [filetime] => -1
    [ssl_verify_result] => 18
    [redirect_count] => 0
    [total_time] => 0.028923
    [namelookup_time] => 3.2E-5
    [connect_time] => 0.000126
    [pretransfer_time] => 0.028362
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => 0
    [upload_content_length] => -1
    [starttransfer_time] => 0.028904
    [redirect_time] => 0
    [redirect_url] => https://localhost:8443/manage
    [primary_ip] => 127.0.0.1
    [certinfo] => Array
        (
        )

    [primary_port] => 8443
    [local_ip] => 127.0.0.1
    [local_port] => 58202
)
@nekromoff
Copy link
Author

actually, i found out a parameter missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant