We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dear developers,
i have recently got an issue with handling the response of "/?module=API&method=SitesManager.getAllSites&format=JSON" i dont get a proper json reply.
[ { "idsite": "1", "name": "Test", "main_url": "http://abc.me", "ts_created": "2019-02-01 17:06:20", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "anonymous", "timezone_name": "UTC", "currency_name": "US Dollar" }, { "idsite": "2", "name": "xzy.de", "main_url": "http://www.xzy.de", "ts_created": "2019-03-07 00:00:00", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC-1", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "XYZ", "timezone_name": "UTC-1", "currency_name": "US Dollar" }, { "idsite": "3", "name": "xyz.de", "main_url": "http://www.xyz.de", "ts_created": "2007-07-24 00:00:00", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC-1", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "XYZ", "timezone_name": "UTC-1", "currency_name": "US Dollar" }, { "idsite": "4", "name": "blabla", "main_url": "http://www.google.de", "ts_created": "2018-07-24 00:00:00", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC-2", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "XYZ", "timezone_name": "UTC-2", "currency_name": "US Dollar" } ]
should it not look more like this
["sites":{"idsite": "4"....
Matomo-Version: 3.8.1 MySQL-Version: 5.5.60-MariaDB PHP-Version: 7.2.15
Thanks so far for your assistance and great work!
The text was updated successfully, but these errors were encountered:
I'm pretty sure the response is correct as it returns a list of objects.
This is valid JSON:
[ { "key": 1, "anotherkey": 2 }, { "morekey": 3, "lastkey": 4 } ]
Of course this is also valid JSON, but I don't see the advantage, it only seems to be more verbose:
{ "sites": [ { "key": 1, "anotherkey": 2 }, { "morekey": 3, "lastkey": 4 } ] }
Keep in mind that JSON doesn't even need to include objects/dicts, as this is also valid JSON:
"hello"
as is this:
1
Sorry, something went wrong.
No branches or pull requests
Dear developers,
i have recently got an issue with handling the response of "/?module=API&method=SitesManager.getAllSites&format=JSON" i dont get a proper json reply.
[ { "idsite": "1", "name": "Test", "main_url": "http://abc.me", "ts_created": "2019-02-01 17:06:20", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "anonymous", "timezone_name": "UTC", "currency_name": "US Dollar" }, { "idsite": "2", "name": "xzy.de", "main_url": "http://www.xzy.de", "ts_created": "2019-03-07 00:00:00", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC-1", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "XYZ", "timezone_name": "UTC-1", "currency_name": "US Dollar" }, { "idsite": "3", "name": "xyz.de", "main_url": "http://www.xyz.de", "ts_created": "2007-07-24 00:00:00", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC-1", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "XYZ", "timezone_name": "UTC-1", "currency_name": "US Dollar" }, { "idsite": "4", "name": "blabla", "main_url": "http://www.google.de", "ts_created": "2018-07-24 00:00:00", "ecommerce": "0", "sitesearch": "1", "sitesearch_keyword_parameters": "", "sitesearch_category_parameters": "", "timezone": "UTC-2", "currency": "USD", "exclude_unknown_urls": "0", "excluded_ips": "", "excluded_parameters": "", "excluded_user_agents": "", "group": "", "type": "website", "keep_url_fragment": "0", "creator_login": "XYZ", "timezone_name": "UTC-2", "currency_name": "US Dollar" } ]
should it not look more like this
["sites":{"idsite": "4"....
Matomo-Version: 3.8.1
MySQL-Version: 5.5.60-MariaDB
PHP-Version: 7.2.15
Thanks so far for your assistance and great work!
The text was updated successfully, but these errors were encountered: