Accessing stats on USOS API method calls
:: services/apistlog module

This is a BETA module. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this module, please let us know. Then, we will work with you and move it out of beta as soon as we can.

These methods allow you to retrieve some runtime statistics on the methods being called within this API installation. These statistics are available only for Administrative Consumers.

Please avoid using this module. There's a big chance that it will be removed in the future (get replaced by internal statsd installation).

Methods

formatted BETA Get formatted (human-readable) results for your query (administrative)
raw BETA Perform a raw apistlog query (administrative)

services/apistlog/formatted

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: not required
URLs of the methods are hidden, because this installation is the mother server.
Click here for the list of all public USOS API installations.

This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can.

Works similar to the raw method, but the results are formatted to be human-readable.

period_length optional

Default value: 14 days

As in the raw method.

period_start optional

Default value: 1 period ago

As in the raw method.

method_filter optional

Default value: (empty string)

As in the raw method.

fields optional

Default value: period|method_name|all_calls|all_runtime|all_avg_runtime

Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section of raw method.

subperiod optional

Default value: auto

As in the raw method.

order_by optional

Default value: method_name|period

As in the raw method.

limit optional

Default value: 1000

As in the raw method.

format optional

Default value: json

Format in which to return values. See supported output formats.

callback optional

Required only if you've chosen jsonp as a return format.

Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required.

Returned value:

A string with the formatted table representation.

services/apistlog/raw

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: not required
URLs of the methods are hidden, because this installation is the mother server.
Click here for the list of all public USOS API installations.

This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can.

Perform a raw apistlog query. It requires an understanding of the apistlog structure, and some basic knowledge on making queries. Contact USOS developers in case of problems.

period_length optional

Default value: 14 days

Length of the period of time for which the stats are to be collected. The length is given in a human readable format, e.g. "N units", where units can be: weeks, days, hours, or minutes.

period_start optional

Default value: 1 period ago

Point in time indicating when the period (described in the period_length parameter) starts. Allowed values include:

  • N units ago - where units can be the same as in the period_length parameter, plus one additional unit named period (which means the value given in the period_length parameter.
  • Any valid datetime prefix, e.g. "2014" or "2014-01-01 00".
method_filter optional

Default value: (empty string)

If given, the result will include only those methods which match the given regexp.

fields optional

Default value: period|method_name|all_calls|all_runtime|all_avg_runtime

Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section.

subperiod optional

Default value: auto

One of the following: auto, total, year, month, day, hour, minute. Auto means that the value will be automatically guessed based on the content of your period_length.

order_by optional

Default value: method_name|period

Pipe-separated list of fields in which to order by. See the list of fields for allowed values. Each field can be optionally prefixed with the "-" sign to indicate descending order.

limit optional

Default value: 1000

Maximum number of returned rows (only the first N will be returned).

format optional

Default value: json

Format in which to return values. See supported output formats.

callback optional

Required only if you've chosen jsonp as a return format.

Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required.

Returned value:

A dictionary of selected fields and their values.

Available fields:

  • period - Prefix of the subperiod start time;

  • module_name - the name of the module;

  • method_name - the name of the method;

  • all_calls - number of calls (per group_by);

  • all_runtime - total runtime (in seconds);

  • all_avg_runtime - average runtime (in seconds);

  • outside_calls - number of outside calls (per group_by);

  • outside_runtime - total outside runtime (in seconds);

  • outside_avg_runtime - average outside runtime (in seconds).

USOS API ver. 6.1.2.0-bc1aa53 (2016-06-07)