v1

latestSwagger 2.02026-07-17172265595.1 KB
analytics

List analytics metrics

Retrieving list of analytics with metrics of each type based on the given input filters.

get/inventory/api/v2/analytics/metric

Query parameters

tagstring[]

Key-Value tags in key=value format to filter by

metricType'assets' | 'spend'

Metric type, default: assets

integrationTypestring[]

Integration Type to filter by

connectionIdstring[]

Connection IDs to filter by - mutually exclusive with connectionGroup

connectionGroupstring[]

Connection group to filter by - mutually exclusive with connectionId

resourceCollectionstring[]

Resource collection IDs to filter by

metricIDsstring[]

Metric IDs

endTimeinteger

timestamp for resource count in epoch seconds

startTimeinteger

timestamp for resource count change comparison in epoch seconds

minCountinteger

Minimum number of resources with this tag value, default 0

sortBy'name' | 'count' | 'growth' | 'growth_rate'

Sort by field - default is count

pageSizeinteger

page size - default is 20

pageNumberinteger

page number - default is 1

Response

OK

total_countinteger
total_metricsinteger
total_old_countinteger

Example response

{
  "metrics": [
    {
      "count": 100,
      "finderPerConnectionQuery": "select * from platform_resources where resource_type = 'aws::ec2::instance' AND connection_id IN <CONNECTION_ID_LIST>",
      "finderQuery": "select * from platform_resources where resource_type = 'aws::ec2::instance'",
      "id": "vms",
      "integrationTypes": [
        "[Azure]"
      ],
      "last_evaluated": "2020-01-01T00:00:00Z",
      "name": "VMs",
      "old_count": 90
    }
  ]
}