## API for retrieving and analyzing infrastructure resources

### /resources

get/v1/org/{org_id}/resources

Retrieves a list of infrastructure resources for the organization, including compute instances, databases, and other services with their current status and costs.

#### Path parameters

- `org_id`: string · uuid (Required)

#### Query parameters

- `provider`: string · enum (Optional)  
  Filter by provider  
  Example: `aws`  
  Possible values: `aws`, `azure`, `gcp`

- `segment_id`: string · uuid (Optional)  
  Filter by segment ID  
  Example: `550e8400-e29b-41d4-a716-446655440000`

- `search`: string (Optional)  
  Text to search across multiple columns (case-insensitive partial match)  
  Example: `us-east-1`

- `desc`: boolean · nullable (Optional)  
  Sort in descending order if true  
  Default: `null`  
  Example: `true`

- `order_by`: string|null · enum · nullable (Optional)  
  Field to order results by  
  Default: `id`  
  Example: `id`  
  Possible values: `id`, `usage_start`, `null`

- `page`: integer · min: 1 (Optional)  
  Default: `1`

- `page_size`: integer · min: 1 · max: 100 (Optional)  
  Default: `20`

#### Responses

- **200 OK**  
  application/json

**Example Response**:
  ```json
  [
    {
      "id": "text",
      "resource_id": "123e4567-e89b-12d3-a456-426614174000",
      "provider": "aws",
      "provider_resource_id": "arn:aws:ec2:us-west-2:123456789012:instance/i-1234567890abcdef0",
      "is_spot": true,
      "name": null,
      "resource_group": null,
      "usage_end": "2026-07-27",
      "usage_start": "2026-07-27",
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "created_at": "2026-07-27",
      "updated_at": "2026-07-27",
      "instance_id": "text",
      "billing_account_id": "text",
      "sub_account_id": "text",
      "sku_title": "text",
      "sku_name": null,
      "availability_zone": null,
      "cache_engine": null,
      "database_engine": null,
      "description": null,
      "family": null,
      "full_region_name": null,
      "has_ondemand_terms": null,
      "instance_type": null,
      "instance_type_family": null,
      "is_reservable": null,
      "license_model": null,
      "location_type": null,
      "normalization_size_factor": null,
      "operating_system": null,
      "pre_installed_sw": null,
      "price_currency": null,
      "provider_service": null,
      "provider_sku_id": null,
      "publication_date": null,
      "region": null,
      "service": null,
      "tenancy": null,
      "usage_type": null,
      "version": null,
      "vpc_networking_support": null,
      "ondemand_usage_unit": null
    }
  ]
  ```

### /resources/{resource_id}/daily-usage

get/v1/org/{org_id}/resources/{resource_id}/daily-usage

Retrieves daily usage data for a specific resource within the specified date range. Optionally filter by catalog_sku_id to get usage for a specific SKU. Including usage metrics, costs, and coverage information.

#### Path parameters

- `org_id`: string · uuid (Required)
- `resource_id`: string · uuid (Required)

#### Query parameters

- `start_date`: string · date (Required)  
  Start date for the date range filter (inclusive)  
  Example: `2024-01-01`

- `end_date`: string · date (Required)  
  End date for the date range filter (inclusive)  
  Example: `2024-01-31`

- `catalog_sku_id`: string · nullable (Optional)  
  Optional catalog SKU ID to filter daily usage records for a specific SKU  
  Example: `550e8400-e29b-41d4-a716-446655440000`

- `page`: integer · min: 1 (Optional)  
  Default: `1`

- `page_size`: integer · min: 1 · max: 10000 (Optional)  
  Default: `100`

#### Responses

- **200 OK**  
  application/json

**Example Response**:
  ```json
  [
    {
      "date": "2026-07-27",
      "sub_account_id": "text",
      "usage": 1,
      "reservation_usage": 1,
      "free_tier_usage": 1,
      "ondemand_cost": 1,
      "reserved_cost": 1,
      "if_all_ondemand_cost": 1,
      "spot_cost": 1,
      "free_tier_savings": 1,
      "usage_type": null,
      "common_usage_type": null,
      "covered_usage": 1,
      "uptime": 1
    }
  ]
  ```
