---
title: "Returns current inventory."
method: GET
path: "/inventory"
tags: ["inventory"]
---

# Returns current inventory.

`GET /inventory`

Region is mandatory. Filter_tags (if any) should be written as string containing tag_name=tag_value

Example query: http://localhost:8000/inventory?aws_region=eu-west-3&filter_tag=Name=boatest&filter_tag=OtherTag=other-value

## Query parameters

- `aws_region` string, required
- `filter_tags` string[], nullable
- `include_block_storage` boolean, nullable

## Response `200`

- Inventory — A list of cloud resources and metadata that describes the inventory itself
  - `metadata` InventoryMetadata, required — Details about the inventory
    - `inventory_date` string, date-time, nullable — The date when the inventory was generated
    - `description` string, nullable — A free text description of the inventory
    - `cloud_scanner_version` string, nullable — The version of the cloud scanner that generated the inventory
    - `execution_statistics` ExecutionStatistics — Statistics about program execution
      - `inventory_duration` Duration, required
        - `secs` integer, required
        - `nanos` integer, required
      - `impact_estimation_duration` Duration, required
        - `secs` integer, required
        - `nanos` integer, required
      - `total_duration` Duration, required
        - `secs` integer, required
        - `nanos` integer, required
  - `resources` CloudResource[], required
    - `provider` 'AWS' | 'OVH', required
    - `id` string, required
    - `location` UsageLocation, required — The location where cloud resources are running. TODO! the usage location should be abstracted and vendor specific implementation should be part of the cloud_provider model (region names are tied to a specific cloud provider)
      - `aws_region` string, required — The AWS region (like eu-west-1)
      - `iso_country_code` string, required — The 3-letters ISO country code corresponding to the country of the aws_region
    - `resource_details` union, required
      - 'object_storage'
      - object
        - `instance` object, required
          - `instance_type` string, required
          - `usage` InstanceUsage
            - `average_cpu_load` number, double, required
            - `state` 'running' | 'stopped', required
      - object
        - `block_storage` object, required
          - `storage_type` string, required
          - `usage` StorageUsage
            - `size_gb` integer, required
          - `attached_instances` StorageAttachment[], nullable
            - `instance_id` string, required
    - `tags` CloudResourceTag[], required
      - `key` string, required
      - `value` string, nullable

---

[API](https://skmtc.dev/boavizta/apis/cloud-scanner-cli.md) · [All operations](https://skmtc.dev/boavizta/apis/cloud-scanner-cli/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/boavizta/cloud-scanner-cli/revisions/ae306cb8898d/schema)
