Esri's Geotrigger Service is replacing Geoloqi! Learn More | FAQ

application/usage/:id

Contents

URL

https://api.geoloqi.com/1/application/api_hits/:id

Description

Retrieve a detailed report on the number of triggers and messages used by this application. This method returns the results in a human-readable format, which you should be able to easily display on a dashboard or use to programmatically rate limit your applications.

Supported Request Methods

GET

Parameters

No parameters are required for this method.

Example Request

$ curl https://api.geoloqi.com/1/application/usage/8K -H \
"Authorization: OAuth Log in to get your personal access token"

Response

The response contains trigger and message summaries and breakdowns. Here is an explanation of each key.

trigger_callback

This key counts the total triggers of the `callback` type run by your application.

  • usage.trigger_callback.total: Total callback triggers run for this application.
  • usage.trigger_callback.monthly: One record for each month, shows the total callback triggers for each month. The key is in the format YYYY-mm-dd where the day is always "01".
  • usage.trigger_callback.daily: One record for each day for the past 90 days, shows the total callback triggers for each day. The key is in the format YYYY-mm-dd.

trigger_message

This key counts the total triggers of the `message` type run by your application.

  • usage.trigger_message.total: Total message triggers run for this application.
  • usage.trigger_message.monthly: One record for each month, shows the total message triggers for each month. The key is in the format YYYY-mm-dd where the day is always "01".
  • usage.trigger_message.daily: One record for each day for the past 90 days, shows the total message triggers for each day. The key is in the format YYYY-mm-dd.

message

This key counts the total messages sent by your application. Note that this does not include messages that were sent in the trigger, this just counts messages that were not associated with a trigger, when you use the message/send method.

  • usage.messages.total: Total messages sent by this application.
  • usage.message.monthly: One record for each month, shows the total messages sent each month. The key is in the format YYYY-mm-dd where the day is always "01".
  • usage.message.daily: One record for each day for the past 90 days, shows the total messages sent for each day. The key is in the format YYYY-mm-dd.

totals

  • usage.triggers_total: This counts the total number of triggers used by your application. Both message and callback triggers are counted.
  • usage.messages_total: This counts the total messages sent by your application. Both message triggers as well as regular messages sent by message/send are counted.
  • usage. triggers_this_period: This counts the total number of triggers used by your application during the current billing period. Both message and callback triggers are counted. At the beginning of your billing period, this number will show "0" and will count up from there.
  • usage. messages_this_period: This counts the total messages sent by your application during the current billing period. . Both message triggers as well as regular messages sent by message/send are counted. At the beginning of your billing period, this number will show "0" and will count up from there.
{
   "usage":{
      "trigger_callback":{
         "name":"URL Callbacks",
         "total":66,
         "monthly":{
            "2010-12-01":1,
            "2011-02-01":20,
            "2011-03-01":11,
            "2011-10-01":16,
            "2011-12-01":13,
            "2012-03-01":3,
            "2012-05-01":2
         },
         "daily":{
            "2012-03-28":3,
            "2012-05-15":1,
            "2012-05-24":1
         }
      },
      "trigger_message":{
         "name":"Messages",
         "total":6,
         "monthly":{
            "2011-10-01":6
         },
         "daily":{
 
         }
      },
      "triggers_total":72,
      "messages_total":6,
      "triggers_this_period":2,
      "messages_this_period":0
   }
}