Payload estimation for each customer

We would like to understand how to utilize Instance Manager API for calculating payloads for each site/customer.
I have these questions to seek clarifications from Losant:

  1. Is it possible to track monthly payload consumption for every gateway?
  2. Is it possible to track the payload consumption for every module we are building as a SaaS Product?

When requesting a usage report for resources that fall under your instance, you have the option of breaking the data down by organization, or by individual applications.

Is it possible to track monthly payload consumption for every gateway?

Assuming by “gateway” you mean a single “device” in Losant parlance, no, we cannot provide that breakdown per device. However, if you are a member of the application that contains the device, you could get a ballpark number by looking at:

What this will not expose to you, however, is payloads from workflows that fired based on state reports, connection events, etc. generated by this device, and any additional payloads that may have fired as a result of those first triggers.


Is it possible to track the payload consumption for every module we are building as a SaaS Product?

The answer here depends on what you mean by “module”. Is a “module” an individual application? If so then yes, using what is described above. If not, can you clarify what constitutes a module?

Thanks @Dylan_Schuster for your quick response.

Module I was referring to a “group of IoT devices” categorized based on nature of their intended use.

The expectation of our payload tracking is required

  1. Every application tenant / customer
  2. Sites under each customer
  3. Module (group of Iot devices) under each site

This is our custom hierarchy defined for the product. We are planning to charge the customer based on the usage reports or payload consumption. Hope it clarifies your questions to provide us more details. thanks

Are “sites” and “modules” represented in a Losant application as Experience Groups, or are you delineating these using some other mechanism (i.e. device tags)?

Regardless, I’m not sure there are any additional details I can provide, as the highest level of granularity we can provide for usage statistics using the instance APIs is per application. We made that decision with the original rollout as a way of balancing end user privacy with the billing needs of the solution provider (i.e. the instance).

Like I stated originally, if a member of your instance also has access to the application(s) in question - as in, they are also members of the organizations holding the applications - then you can get a higher level of granularity using some of the endpoints I previously mentioned. That can get a little messy given that a device can be in multiple experience groups but is not necessarily so.

We have a feature request in the works for returning the number of devices associated with a given experience group - directly or as members of child groups - but not payload counts. I will add a feature request to also return payload counts broken down per group, but I can’t provide a timeline on when that will be delivered. We’ll have to do some thinking on our end as to where to log a payload in the cases where a device appears in multiple groups, as well as what counts as a payload to charge to a given gruop (experience endpoint requests to fetch data associated with a device? Workflows that run as a consequence of state / connection events? And so on.)