# List AutoStopping Rules

Retrieves a list of all AutoStopping Rules configured in your account. AutoStopping Rules help optimize cloud costs by automatically stopping idle resources and starting them on-demand when accessed.

Endpoint: GET /gateway/lw/api/accounts/{account_id}/autostopping/rules
Version: 1.0
Security: x-api-key

## Path parameters:

  - `account_id` (string, required)
    Unique identifier of the Harness account. This is used to scope the API request to a specific account.
    Example: "abc12_DEFgh-ijkLMNOPqr"

## Query parameters:

  - `accountIdentifier` (string, required)
    Account Identifier for authentication and authorization.
    Example: "abc12_DEFgh-ijkLMNOPqr"

  - `dry_run` (boolean)
    When set to true, filters the results to show only rules in dry-run mode. Dry-run rules monitor resource usage and calculate potential savings without actually stopping resources, allowing you to test rule configurations safely before enabling them.

## Response 200 fields (application/json):

  - `response` (array)

  - `response.id` (integer)

  - `response.name` (string, required)

  - `response.org_id` (string, required)

  - `response.account_identifier` (string)

  - `response.project_id` (string)

  - `response.fulfilment` (string)

  - `response.kind` (string, required)

  - `response.cloud_account_id` (string, required)

  - `response.idle_time_mins` (integer)

  - `response.host_name` (string)

  - `response.health_check` (object)

  - `response.custom_domains` (array)

  - `response.match_all_subdomains` (boolean)

  - `response.disabled` (boolean)

  - `response.routing` (object)

  - `response.routing.instance` (object)

  - `response.routing.instance.filter_text` (string)

  - `response.routing.instance.scale_group` (object)

  - `response.routing.instance.scale_group.id` (string)

  - `response.routing.instance.scale_group.name` (string)

  - `response.routing.instance.scale_group.desired` (integer)

  - `response.routing.instance.scale_group.min` (integer)

  - `response.routing.instance.scale_group.max` (integer)

  - `response.routing.instance.scale_group.on_demand` (integer)

  - `response.routing.instance.scale_group.spot` (integer)

  - `response.routing.instance.scale_group.mixed_instance` (boolean)

  - `response.routing.instance.scale_group.cloud_account_id` (string)

  - `response.routing.instance.scale_group.provider_name` (string)

  - `response.routing.instance.scale_group.target_groups` (array)

  - `response.routing.instance.scale_group.target_groups.id` (string)

  - `response.routing.instance.scale_group.target_groups.name` (string)

  - `response.routing.instance.scale_group.target_groups.port` (integer)

  - `response.routing.instance.scale_group.target_groups.protocol` (string)

  - `response.routing.instance.scale_group.target_groups.vpc` (string)

  - `response.routing.instance.scale_group.region` (string)

  - `response.routing.instance.scale_group.availability_zones` (array)

  - `response.routing.instance.scale_group.status` (string)

  - `response.routing.instance.scale_group.meta` (object)

  - `response.routing.ports` (array)

  - `response.routing.ports.protocol` (string)

  - `response.routing.ports.target_protocol` (string)

  - `response.routing.ports.port` (integer)

  - `response.routing.ports.target_port` (integer)

  - `response.routing.ports.server_name` (string)

  - `response.routing.ports.action` (string)

  - `response.routing.ports.redirect_url` (string)

  - `response.routing.ports.routing_rules` (array)

  - `response.routing.ports.routing_rules.path_match` (string)

  - `response.routing.lb` (string)

  - `response.routing.k8s` (object)

  - `response.routing.k8s.RuleJson` (string)

  - `response.routing.k8s.ConnectorID` (string)

  - `response.routing.k8s.Namespace` (string)

  - `response.routing.custom_domain_providers` (object)

  - `response.routing.container_svc` (object)

  - `response.routing.container_svc.cluster` (string)

  - `response.routing.container_svc.service` (string)

  - `response.routing.container_svc.region` (string)

  - `response.routing.container_svc.task_count` (number)

  - `response.routing.database` (object)

  - `response.routing.database.id` (string)

  - `response.routing.database.region` (string)

  - `response.opts` (object)

  - `response.opts.preserve_private_ip` (boolean)

  - `response.opts.delete_cloud_resources` (boolean)

  - `response.opts.always_use_private_ip` (boolean)

  - `response.opts.access_details` (object)

  - `response.opts.hide_progress_page` (boolean)

  - `response.opts.idle_time_for_state_sync` (boolean)
    If true, idle time is used for state sync instead of the default 5 minutes

  - `response.created_at` (string)

  - `response.access_point_id` (string)

  - `response.metadata` (object)

  - `response.metadata.cloud_provider_details` (object)

  - `response.metadata.cloud_provider_details.name` (string)

  - `response.metadata.cloud_provider_details.type` (string)

  - `response.metadata.target_group_details` (object)

  - `response.metadata.service_errors` (array)

  - `response.metadata.service_errors.error` (string)

  - `response.metadata.service_errors.action` (string)

  - `response.metadata.kubernetes_connector_id` (string)

  - `response.metadata.autostopping_proxy_config` (object)

  - `response.metadata.autostopping_proxy_config.http` (object)

  - `response.metadata.autostopping_proxy_config.http.proxy` (object, required)

  - `response.metadata.autostopping_proxy_config.http.proxy.id` (string)

  - `response.metadata.autostopping_proxy_config.http.ports` (array, required)

  - `response.metadata.autostopping_proxy_config.tcp` (object)

  - `response.status` (string)


## Response 400 fields
