---
title: "Get subnetwork by ID"
method: GET
path: "/v1/subnetworks/{subnetworkId}"
tags: ["Subnetworks"]
---

# Get subnetwork by ID

`GET /v1/subnetworks/{subnetworkId}`

## Request

- Base URL: `https://api.emma.ms/external`
- URL: `https://api.emma.ms/external/v1/subnetworks/{subnetworkId}`
- Auth: HTTP bearer

Returns a subnetwork by its ID.

## Path parameters

- `subnetworkId` string, required

## Query parameters

- `projectId` integer

## Response `200`

Successful operation

- Subnetwork
  - `id` string: Subnetwork id
  - `name` string: Subnetwork name
  - `dataCenterId` string: ID of the cloud provider's data center
  - `subnetworkPrefix` string: The prefix for the subnetwork IP address range
  - `subnetworkSize` integer: The net mask size for the subnetwork
  - `resources` object[]: List of entities in the subnetwork
    - `id` integer: ID of the entity
    - `resourceType` string: Type of the entity
  - `status` string: Subnetwork status

## Other responses

- `401`: Unauthorized
- `403`: Forbidden - Access is denied
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/emma/apis/public-emma-api.md) - [All operations](https://skmtc.dev/emma/apis/public-emma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/emma/apis/public-emma-api/revisions/9e55f0920078?raw)
