---
title: "Get usage statistics"
method: GET
path: "/stats"
tags: ["stats"]
---

# Get usage statistics

`GET /stats`

Retrieves usage statistics of the Formae agent.

## Response `200`

: OK: The usage statistics.

- ModelStats
  - `AgentId` string
  - `Clients` integer
  - `Commands` object
  - `Plugins` ModelPluginInfo[]
    - `DiscoveryFilters` ModelMatchFilter[]
      - `conditions` ModelFilterCondition[] — All conditions must match (AND logic) to exclude
        - `propertyPath` string — PropertyPath is a JSONPath expression to query resource properties. Examples: - "$.Tags[?(@.Key=='Name')].Value" - get value of tag with key "Name" - "$.Tags[?(@.Key=~'eks:automode:.*')]" - check if any tag key matches regex - "$.SkipDiscovery" - get top-level property value
        - `propertyValue` string — PropertyValue is the expected value to match. Empty string means existence check (path returns any value = match). Non-empty means exact string match against the query result.
      - `resourceTypes` string[] — Resource types this filter applies to
    - `LabelConfig` ModelLabelConfig
      - `defaultQuery` string — DefaultQuery is a JSONPath expression applied to all resources in this namespace. Example for AWS: `$.Tags[?(@.Key=='Name')].Value` If empty, falls back to NativeID.
      - `resourceOverrides` object — ResourceOverrides provides JSONPath expressions for specific resource types, overriding the DefaultQuery. Use for resources without tags or with non-standard label sources. Key: resource type (e.g., "AWS::IAM::Policy") Value: JSONPath expression (e.g., "$.PolicyName")
    - `MaxRequestsPerSecond` integer
    - `Namespace` string
    - `NodeName` string
    - `ResourceCount` integer
    - `ResourceTypesToDiscover` string[]
    - `RetryConfig` ModelRetryConfig
      - `maxRetries` integer
      - `retryDelay` -9223372036854776000 | 9223372036854776000 | 1 | 1000 | 1000000 | 1000000000 | 60000000000 | 3600000000000
      - `statusCheckInterval` -9223372036854776000 | 9223372036854776000 | 1 | 1000 | 1000000 | 1000000000 | 60000000000 | 3600000000000
    - `Version` string
  - `ResourceTypes` object — key: resource type (e.g., "AWS::S3::Bucket")
  - `Resources` object — key: namespace (e.g., "AWS", "Azure")
  - `Stacks` integer
  - `States` object
  - `Targets` object — key: namespace
  - `UnmanagedResources` object — key: namespace
  - `Version` string

## Other responses

- `500` — Internal Server Error.

---

[API](https://skmtc.net/platform-engineering-labs/apis/formae-rest-api.md) · [All operations](https://skmtc.net/platform-engineering-labs/apis/formae-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/platform-engineering-labs/formae-rest-api/versions/e4ee5fb76a4f/schema)
