Network

Networks are a multi-provider abstraction of what would otherwise be called a virtual private cloud (VPC) in most cloud providers. In a nutshell, they're an encapsulated network where a cluster may be located which has a strong boundary and which can specify its own rules around egress and ingress.

Part of the API reference collection

This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.

The Network API resource

Network contains information on a virtual network.

Content type: application/json

NameNullableTypeDescription
idstring in EID format in UUID format

Unique ID of the network.

cidr4string

A subnet block specifying the network's location and possible addresses in CIDR4 (IPv4) notation.

This property is only available after a network is fully created and will be null early in a new network's lifecycle.

namestring

Human-readable name of the network.

provider_idstring

ID of the provider on which the network is located.

region_idstring

ID of the region where the network is located.

Networks on GCP aren't affixed to a specific region and return the special value of global in this field.

team_idstring in EID format in UUID format

ID of the team which the network belongs to.

Example

{
    "cidr4": "1.2.3.4/24",
    "id": "p56biajnfvgjhftvqs7lqymspe",
    "name": "crunchy-production-network",
    "provider_id": "aws",
    "region_id": "us-west-2",
    "team_id": "eaevtjiudzeq7bsqbbpiscund4"
}

List networks

List existing networks for a team.

This endpoint's pagination may be ordered through the order_field parameter by id only.

GET /networks

Request

Query parameters

NameRequiredTypeDescription
cursorstring
limitinteger
orderenum string

Enum asc, or desc.

order_fieldstring
team_idstring

cURL example

curl -X GET https://api.crunchybridge.com/networks
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Response of a list networks request.

Content type: application/json

NameNullableTypeDescription
has_moreboolean

Indicates whether or not there are more resources to page through in the collection.

networksarray of array

Networks for a team.

next_cursorstring in EID format in UUID format

A cursor value to pass to the endpoint to get the next page.

Example

{
    "has_more": false,
    "networks": [
        {
            "cidr4": "1.2.3.4/24",
            "id": "p56biajnfvgjhftvqs7lqymspe",
            "name": "crunchy-production-network",
            "provider_id": "aws",
            "region_id": "us-west-2",
            "team_id": "eaevtjiudzeq7bsqbbpiscund4"
        }
    ],
    "next_cursor": null
}

Get network

Get details for a network.

GET /networks/{network_id}

Request

Path parameters

  • network_id: The ID of the network to retrieve.

cURL example

curl -X GET https://api.crunchybridge.com/networks/{network_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Responds with the standard Network API resource.

Update network

Update a network.

PATCH /networks/{network_id}

Request

Path parameters

  • network_id: The ID of the network to update.

Request body schema

Content type: application/json

NameRequiredTypeDescription
namestring

Name is the new human-readable name to be assigned to the network.

Example request body

{
    "name": "Crunchy Network"
}

cURL example

curl -X PATCH https://api.crunchybridge.com/networks/{network_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"
    -H "Content-Type: application/json"
    -d '{"name":"Crunchy Network"}'

Response

Status: 200

Responds with the standard Network API resource.