3scale/issues-test — Issue #440: quirks on the stats api
Author: HakubJozak
Created: 2012-02-10 17:56:52+00:00
State: open
Labels: bug

----------------

Wrong error message:

Complaining that is missing granularity when it's the period that is missing

the problem is that the query is not bounded, no the end. If you pass period, or the until
it works fine.

$ curl -g "https://viadeo-admin.3scale.net/stats/services/16/usage.json?provid9e5a369db63f00f7f4bb&metric_name=hits&granularity=hour&since=2011-09-01&access_code=viadeo672"

{"error":"Missing key(s): granularity"}solso@kiba:~/3scale/customers/api-tests $

--------------------

The funny minutes, in principle we do not return granularity by the minute.

But when you try a week it does not work either, you have to pass granularity 21600, can that be replaced by week. The week operation is slow as hell.

solso@kiba:~/3scale/customers/api-tests $ curl -g "https://viadeo-admin.3scale.net/stats/services/16/usage.xml?provider_key=viadeo-043350074c449e5a369db63f00f7f4bb&metric_name=hits&granularity=minutes&since=2011-09-01&until=2011-09-30&access_code=viadeo672"
Argument must be one of :minute, :hour, :day, :week, :month, or :year, not :minutessolso@kie5a369db63f00f7f4bb&metric_name=hits&granularity=minute&since=2011-09-01&until=2011-09-30&access_code=viadeo672"ey=viadeo-043350074c449e
Granularity minute not allowed (use [21600 seconds, :hour, :day, :month])solso@kiba:~/3scale/customers/api-tests $

--------------------

The funny months when there is not a month between since and until

solso@kiba:~/3scale/customers/api-tests $ curl -g "https://viadeo-admin.3scale.net/stats/services/16/usage.xml?provider_key=viadeo-043350074c449e5a369db63f00f7f4bb&metric_name=hits&granularity=month&since=2011-09-01&until=2011-09-30&access_code=viadeo672"
-ERR wrong number of arguments for 'mget' commandsolso@kiba:~/3scale/customers/api-tests $

this is an error from redis

-------------------

This one does not work at all

https://www.assembla.com/spaces/3scale/wiki/applications_all

curl -g "https://viadeo-admin.3scale.net/stats/services/6/applications.xml?provider_key=viadeo-043350074c449e5a369db63f00f7f4bb&access_code=viadeo672"

But this seems more like user management api (to be renamed to account api)

----------------------

To applications:

https://www.assembla.com/spaces/3scale/wiki/top_applications

curl -g "https://viadeo-admin.3scale.net/stats/services/16/top_applications.xml?provider_key=viadeo-043350074c449e5a369db63f00f7f4bb&metric_name=hits&since=2009-09-01&until=2009-2011-09-01&access_code=viadeo672"

does not return anything at all.

It seems that it requires to have period:

curl -g "https://viadeo-admin.3scale.net/stats/services/16/top_applications.xml?provider_key=viadeo-03350074c449e5a369db63f00f7f4bb&metric_name=hits&since=2009-09-01&period=week&access_code=viadeo672"

now it returns but probably incorrect. Since 2009 for one week should be empty! It has applications with value all to zero. Well, it's fine.

Returns the top 10 only, there is no pagination? Not a change to get more.

--------------------------

Methods usage:

curl -g "https://viadeo-admin.3scale.net/stats/services/16/methods_usage.xml?provider_key=viadeo-043350074c449e5a369db63f00f7f4bb&metric_name=hits&since=2011-01-01&period=month&access_code=viadeo672"

no support for until, it should.

------

Do not raise hoptoads for

http://3scale.airbrakeapp.com/errors/15438969

Tasks

https://www.pivotaltracker.com/story/show/19157601