[Документация Yandex Cloud](../../../index.md) > [Yandex Network Load Balancer](../../index.md) > Справочник API > [REST (англ.)](../index.md) > [NetworkLoadBalancer](index.md) > GetTargetStates

# Network Load Balancer API, REST: NetworkLoadBalancer.GetTargetStates

Gets states of target resources in the attached target group.

## HTTP request

```
GET https://load-balancer.api.yandexcloud.kz/load-balancer/v1/networkLoadBalancers/{networkLoadBalancerId}:getTargetStates
```

## Path parameters

#|
||Field | Description ||
|| networkLoadBalancerId | **string**

Required field. ID of the NetworkLoadBalancer resource with an attached target group.
The length must be less than or equal to 50. ||
|#

## Query parameters {#yandex.cloud.loadbalancer.v1.GetTargetStatesRequest}

#|
||Field | Description ||
|| targetGroupId | **string**

ID of the target group to get states of resources from.
The length must be less than or equal to 50. ||
|#

## Response {#yandex.cloud.loadbalancer.v1.GetTargetStatesResponse}

**HTTP Code: 200 - OK**

```json
{
  "targetStates": [
    {
      "subnetId": "string",
      "address": "string",
      "status": "string",
      "zoneShifted": "boolean"
    }
  ]
}
```

#|
||Field | Description ||
|| targetStates[] | **[TargetState](#yandex.cloud.loadbalancer.v1.TargetState)**

List of states of targets within the target group that is specified in the [GetTargetStatesRequest](#yandex.cloud.loadbalancer.v1.GetTargetStatesRequest) message. ||
|#

## TargetState {#yandex.cloud.loadbalancer.v1.TargetState}

State of the target that was returned after the last health check.

#|
||Field | Description ||
|| subnetId | **string**

ID of the subnet that the target is connected to. ||
|| address | **string**

IP address of the target. ||
|| status | **enum** (Status)

Status of the target.

- `INITIAL`: The network load balancer is setting up health checks for this target.
- `HEALTHY`: Health check passed and the target is ready to receive traffic.
- `UNHEALTHY`: Health check failed and the target is not receiving traffic.
- `DRAINING`: Target is being deleted and the network load balancer is no longer sending traffic to this target.
- `INACTIVE`: The network load balancer is stopped and not performing health checks on this target. ||
|| zoneShifted | **boolean**

Zone shifted status. ||
|#