---
title: "Get Network"
url: "https://nov18-dev.movespot.fyi/apis/konnect-cloud-gateways-2/versions/b826cacf-03b8-4340-bb4e-daa3648a655b/operations/get-network"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-cloud-gateways-2/versions/b826cacf-03b8-4340-bb4e-daa3648a655b.md

# Get Network

`GET` `/cloud-gateways/networks/{networkId}`

Operation ID: `get-network`

Retrieves a network by ID.

## Path parameters

- `networkId` (string, uuid, required) - The network to operate on.

## Responses

- `200` - Response format for retrieving a network.
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Cloud Gateways
  version: 2.0.0
servers:
  - url: https://global.api.konghq.com/v2
    description: Base URL for the global region
paths:
  /cloud-gateways/networks/{networkId}:
    get:
      operationId: get-network
      summary: Get Network
      description: Retrieves a network by ID.
      parameters:
        - $ref: "#/components/parameters/NetworkId"
      responses:
        "200":
          $ref: "#/components/responses/RetrieveNetworkResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Networks
security:
  - konnectAccessToken: []
  - personalAccessToken: []
  - systemAccountAccessToken: []
components:
  parameters:
    NetworkId:
      name: networkId
      in: path
      description: The network to operate on.
      required: true
      schema:
        $ref: "#/components/schemas/NetworkId"
  responses:
    RetrieveNetworkResponse:
      description: Response format for retrieving a network.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Network"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
  schemas:
    NetworkId:
      description: The network ID to operate on. For serverless.v1 kind of cloud
        gateways, this field should be omitted.
      type: string
      format: uuid
      example: 36ae63d3-efd1-4bec-b246-62aa5d3f5695
    Network:
      description: Object containing information about a network to be used in
        configurations.
      type: object
      properties:
        id:
          $ref: "#/components/schemas/NetworkId"
        name:
          $ref: "#/components/schemas/NetworkName"
        default:
          description: >
            Whether the network is a default network or not. Default networks
            are Networks that are created

            automatically by Konnect when an organization is linked to a
            provider account.
          type: boolean
          example: false
        cloud_gateway_provider_account_id:
          $ref: "#/components/schemas/ProviderAccountId"
        region:
          $ref: "#/components/schemas/ProviderRegionId"
        availability_zones:
          $ref: "#/components/schemas/NetworkAvailabilityZones"
        cidr_block:
          $ref: "#/components/schemas/NetworkCIDRBlock"
        state:
          $ref: "#/components/schemas/NetworkState"
        state_metadata:
          $ref: "#/components/schemas/NetworkStateMetadata"
        provider_metadata:
          $ref: "#/components/schemas/NetworkProviderMetadata"
        transit_gateway_count:
          description: The number of transit gateways attached to this network.
          type: integer
          example: 0
          readOnly: true
        configuration_reference_count:
          description: The number of configurations that reference this network.
          type: integer
          example: 0
          readOnly: true
        entity_version:
          description: >
            Monotonically-increasing version count of the network, to indicate
            the order of updates to the network.
          type: integer
          example: 1
          readOnly: true
        created_at:
          description: An RFC-3339 timestamp representation of network creation date.
          type: string
          format: date-time
          example: 2022-11-04T20:10:06.927Z
          readOnly: true
        updated_at:
          description: An RFC-3339 timestamp representation of network update date.
          type: string
          format: date-time
          example: 2022-11-04T20:10:06.927Z
          readOnly: true
      required:
        - id
        - name
        - default
        - cloud_gateway_provider_account_id
        - region
        - availability_zones
        - cidr_block
        - provider_metadata
        - state
        - transit_gateway_count
        - configuration_reference_count
        - entity_version
        - created_at
        - updated_at
      title: Network
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    NetworkName:
      description: Human-readable name of the network.
      type: string
      example: us-east-2 network
      title: Network Name
    ProviderAccountId:
      type: string
      format: uuid
      example: 929b2449-c69f-44c4-b6ad-9ecec6f811ae
    ProviderRegionId:
      description: Region ID for cloud provider region.
      type: string
      example: us-east-2
      title: Provider Region ID
    NetworkAvailabilityZones:
      description: List of availability zones that the network is attached to.
      type: array
      items:
        type: string
      example:
        - use2-az1
        - use2-az2
        - use2-az3
    NetworkCIDRBlock:
      description: CIDR block configuration for the network.
      type: string
      example: 10.0.0.0/8
      title: Network CIDR Block
    NetworkState:
      description: State of the network.
      enum:
        - created
        - initializing
        - offline
        - ready
        - terminating
        - terminated
      readOnly: true
      title: Network State
    NetworkStateMetadata:
      description: >
        Metadata describing the backing state of the network and why it may be
        in an erroneous state.
      type: object
      properties:
        reported_status:
          description: Reported status of the network from backing infrastructure.
          type: string
          example: INVALID
        reason:
          description: >
            Reason why the network may be in an erroneous state, reported from
            backing infrastructure.
          type: string
          example: >
            Network could not be deployed due to insufficient cloud provider
            compute instances.
      additionalProperties: false
      readOnly: true
      title: Network State Metadata
    NetworkProviderMetadata:
      description: Metadata describing attributes returned by cloud-provider for the
        network.
      type: object
      properties:
        vpc_id:
          type: string
          title: VPC ID
        subnet_ids:
          type: array
          items:
            type: string
          title: Subnet IDs
      additionalProperties: false
      readOnly: true
      title: Network Provider Metadata
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs.

        You can generate a Personal Access Token (PAT) from the [personal access
        token page](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
    systemAccountAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The system account access token is meant for automations and
        integrations that are not directly associated with a human identity.

        You can generate a system account Access Token by creating a system
        account and then obtaining a system account access token for that
        account.

        The access token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer spat_i2Ej...'`
```
