Statistics

Get Component usage statistics

GET /stats/component-usage

Get statistics of component usage. Restricted to admin users only.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Query parameters

Name
Type
Description

componentType

string

Component/module identifier. The value can be appmixer.utils returning stats for all modules in utils. Or appmixer.utils.controls returning stats only for the controls.

stage

string

running|stopped. Return statistics only for running or stopped flows.

group

string

$flowId|$userId

count

any

If specified, it will return the number of records.

limit

number

Number of records returned.

offset

number

For paging.

userId

string

Filter statistics per specific user.

Response

[
    {
        "_id": "630743429943ceeab3652244",
        "flowId": "01beae9d-fd61-4782-aa2c-678455908d1b",
        "type": "componentUsage",
        "value1": "appmixer.utils.controls.OnStart",
        "userId": "5df0edcb36a005003a8538fd",
        "value2": "stopped"
    },
    {
        "_id": "634e76729943ceeab3e534e0",
        "flowId": "01c5a412-d0f3-463c-8eb0-d013a63b57b4",
        "type": "componentUsage",
        "value1": "appmixer.utils.controls.OnStart",
        "userId": "583c06311afb7b0016ef120b",
        "value2": "running"
    },
    {
        "_id": "634e76729943ceeab3e534ec",
        "flowId": "01c5a422-d0f3-463c-8eb0-d013a63b57b4",
        "type": "componentUsage",
        "value1": "appmixer.utils.controls.JoinEach",
        "userId": "583c06311afb7b0016ef120b",
        "value2": "stopped"
    },
    {
        "_id": "634e76729943ceeab3e534e6",
        "flowId": "01c5a452-d0f3-463c-8eb0-d013a63b57b4",
        "type": "componentUsage",
        "value1": "appmixer.utils.controls.Each",
        "userId": "583c06311afb7b0016ef120b",
        "value2": "stopped"
    }
]

Examples

GET /stats/component-usage?componentType=appmixer.utils.controls&group=$userId&count=true

Will return the number of users using the appmixer.utils.controls module (in at least one flow, stopped or running).

[{"count":19}]

Last updated

Was this helpful?