# Overall payload count

**URL:** <https://forums.losant.com/t/overall-payload-count/2656>\
**Category:** Help\
**Tags:** workflow\
**Created:** [February 18, 2020, 11:24pm UTC](https://forums.losant.com/t/overall-payload-count/2656 "2020-02-18T23:24:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [February 18, 2020, 11:24pm UTC](https://forums.losant.com/t/overall-payload-count/2656/1 "2020-02-18T23:24:25Z")

</div>

If an incoming mqtt payload contains “raw values” from a sensor (4-20mA or 0-10V) and a workflow needs to be added to scale that value in to a new attribute, will that add to the overall payload count?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [February 19, 2020, 2:44am UTC](https://forums.losant.com/t/overall-payload-count/2656/3 "2020-02-19T02:44:33Z")

</div>

You will generate a payload from the raw MQTT message. If that workflow then records device state, that will result in a second payload.

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [February 19, 2020, 4:03am UTC](https://forums.losant.com/t/overall-payload-count/2656/5 "2020-02-19T04:03:35Z")

</div>

I can see payload usage under organization, but would be nice to be able to drill down to application, workflow and device to see where the load is.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [February 19, 2020, 4:34am UTC](https://forums.losant.com/t/overall-payload-count/2656/6 "2020-02-19T04:34:56Z")

</div>

You can see payloads per application on the application overview page. Similar to the organization view, it does breakdown all sources of payloads, which can be helpful when determining where and how payloads are being consumed.

Determining which specific device is generating payloads is likely a factor of which device is reporting the most state. This isn’t the easiest data to retrieve, so potentially something to think about on our end.

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [February 19, 2020, 11:58am UTC](https://forums.losant.com/t/overall-payload-count/2656/7 "2020-02-19T11:58:47Z")

</div>

I’m guessing you are referring to the “usage(this period)” section at the bottom of each application overview.  
Is this usage data available over an api?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [February 19, 2020, 1:11pm UTC](https://forums.losant.com/t/overall-payload-count/2656/8 "2020-02-19T13:11:35Z")

</div>

Yep, everything you see on the screen is accessible via the API.

> **[Application Actions](https://docs.losant.com/rest-api/application/#payload-counts)**
>
> A detailed look at the various REST actions supported by the Application resource of the Losant API. Learn more.

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [February 19, 2020, 1:18pm UTC](https://forums.losant.com/t/overall-payload-count/2656/9 "2020-02-19T13:18:27Z")

</div>

ok, great.  
maybe a stupid question, but is it possible to enable/disable a workflow with another workflow?

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [February 19, 2020, 8:27pm UTC](https://forums.losant.com/t/overall-payload-count/2656/10 "2020-02-19T20:27:36Z")

</div>

Hi @Lars_Andersson,

Yes, this can be done; please visit the Workflow REST API documentation for [Patch](https://docs.losant.com/rest-api/flow/#patch).

Let me know if you have any further questions.

Thanks!  
Julia

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [February 20, 2020, 12:08am UTC](https://forums.losant.com/t/overall-payload-count/2656/11 "2020-02-20T00:08:27Z")

</div>

ok, I successfully tested getting the usage counter values using the API for one application.  
From what I understand I can only do this from one application at the time since the API token is generated per application.  
Or is there a way to issue a token for all my applications?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [February 20, 2020, 1:09am UTC](https://forums.losant.com/t/overall-payload-count/2656/13 "2020-02-20T01:09:38Z")

</div>

You could generate a token for your _user_; that would have access to all of your applications. That’s effectively how the platform interface works.

> **[Auth Actions](https://docs.losant.com/rest-api/auth/#authenticate-user)**
>
> A detailed look at the various REST actions supported by the Auth resource of the Losant API. Learn more.

Take care with the token you get in this response, as it would have FULL permissions to read and edit all of your applications and their resources.
