# Get provider spending filter options

> Returns available values for every filter dimension. Dimensions cross-constrain each other (AWS Cost Explorer behavior); each dimension excludes its own selections when computing its option list.

Source: https://docs.levelfour.ai/api-reference/providers/get-providers-by-id-costs-filter-options


## GET /api/v1/providers/{provider_id}/costs/filter-options

Returns available values for every filter dimension. Dimensions cross-constrain each other (AWS Cost Explorer behavior); each dimension excludes its own selections when computing its option list.

### Authentication

Send `Authorization: Bearer <token>`.

### Parameters

- `provider_id` (path, string, required)
- `start` (query, string, nullable): Start date in ISO 8601 format
- `end` (query, string, nullable): End date in ISO 8601 format
- `service` (query, array of string, nullable)
- `service_mode` (query, one of `include`, `exclude`, default `include`)
- `region` (query, array of string, nullable)
- `region_mode` (query, one of `include`, `exclude`, default `include`)
- `account_id` (query, array of string, nullable)
- `account_id_mode` (query, one of `include`, `exclude`, default `include`)
- `payer_account` (query, array of string, nullable)
- `payer_account_mode` (query, one of `include`, `exclude`, default `include`)
- `tag_key` (query, array of string, nullable)
- `tag_key_mode` (query, one of `include`, `exclude`, default `include`)
- `tag_value` (query, array of string, nullable)
- `tag_value_mode` (query, one of `include`, `exclude`, default `include`)
- `instance_type` (query, array of string, nullable)
- `instance_type_mode` (query, one of `include`, `exclude`, default `include`)
- `usage_type` (query, array of string, nullable)
- `usage_type_mode` (query, one of `include`, `exclude`, default `include`)
- `usage_type_group` (query, array of string, nullable)
- `usage_type_group_mode` (query, one of `include`, `exclude`, default `include`)
- `charge_type` (query, array of string, nullable)
- `charge_type_mode` (query, one of `include`, `exclude`, default `include`)
- `availability_zone` (query, array of string, nullable)
- `availability_zone_mode` (query, one of `include`, `exclude`, default `include`)
- `platform` (query, array of string, nullable)
- `platform_mode` (query, one of `include`, `exclude`, default `include`)
- `purchase_option` (query, array of string, nullable)
- `purchase_option_mode` (query, one of `include`, `exclude`, default `include`)
- `tenancy` (query, array of string, nullable)
- `tenancy_mode` (query, one of `include`, `exclude`, default `include`)
- `database_engine` (query, array of string, nullable)
- `database_engine_mode` (query, one of `include`, `exclude`, default `include`)
- `legal_entity` (query, array of string, nullable)
- `legal_entity_mode` (query, one of `include`, `exclude`, default `include`)
- `billing_entity` (query, array of string, nullable)
- `billing_entity_mode` (query, one of `include`, `exclude`, default `include`)
- `api_operation` (query, array of string, nullable)
- `api_operation_mode` (query, one of `include`, `exclude`, default `include`)
- `resource` (query, array of string, nullable)
- `resource_mode` (query, one of `include`, `exclude`, default `include`)
- `cost_category_key` (query, array of string, nullable)
- `cost_category_key_mode` (query, one of `include`, `exclude`, default `include`)
- `cost_category_value` (query, array of string, nullable)
- `cost_category_value_mode` (query, one of `include`, `exclude`, default `include`)
- `virtual_tag_key` (query, array of string, nullable): Virtual tag key(s), by id or name, whose values fill virtual_tag_values

### Responses

#### 200: Successful Response

- `success` (boolean, default `true`)
- `timestamp` (date-time string)
- `data` (object, required)
  - `provider_id` (string, required): Provider identifier
  - `services` (array of string, required): Distinct service names available for filtering
  - `regions` (array of string, required): Distinct regions available for filtering
  - `accounts` (array of string, required): Distinct account IDs available for filtering
  - `account_names` (map of string to string): Display name per account id, for connector providers that bill an account under a name
  - `projects` (array of string): Projects in the window, for a connector that collects an inventory
  - `skus` (array of string): Billed SKUs in the window, for a connector provider
  - `tag_keys` (array of string)
  - `tag_values` (array of string)
  - `instance_types` (array of string)
  - `usage_types` (array of string)
  - `usage_type_groups` (array of string)
  - `charge_types` (array of string)
  - `availability_zones` (array of string)
  - `platforms` (array of string)
  - `purchase_options` (array of string)
  - `tenancies` (array of string)
  - `database_engines` (array of string)
  - `legal_entities` (array of string)
  - `billing_entities` (array of string)
  - `api_operations` (array of string)
  - `resources` (array of string)
  - `cost_category_keys` (array of string)
  - `cost_category_values` (array of string)
  - `payer_accounts` (array of string)
  - `virtual_tag_keys` (array of object): Every virtual tag key
    - `id` (string, required): Virtual tag key id
    - `name` (string, required): Virtual tag key name
  - `virtual_tag_values` (array of string): Values of the keys passed as virtual_tag_key, followed by __unallocated__

#### Errors

- `400`: Bad Request
- `401`: Authentication Error
- `403`: Authorization Error
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Rate Limit Exceeded
- `500`: Internal Server Error

Body of `400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`:

- `success` (`false`, required)
- `error` (object, required)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (any)
- `timestamp` (date-time string, required)
