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

Name Nullable Type Description
id string in EID format

Unique ID of the network.

cidr4 string

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.

name string

Human-readable name of the network.

provider_id string

ID of the provider on which the network is located.

region_id string

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_id string in EID 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

Name Required Type Description
cursor string

Return only items starting after this cursor ID. When paginating, pass the value of next_cursor from the last page into this field to get the next one.

limit integer

The maximum number of items to return on the page. Defaults to 100 with a minimum of 1 and a maximum of 100.

order enum string

The order of pagination. asc for ascending or desc for descending. Defaults to asc.

Enum asc, or desc.

order_field string

The name of the field on which to paginate like id or name. Supported fields are specific to each endpoint, and it’s not possible to specify any arbitrary name. See the documentation for each specific list endpoint to see which fields it supports. Defaults to id for most resources.

team_id string

Unique ID of the team to list networks for.

cURL example

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

Response

Status: 200

Response of a list networks request.

Content type: application/json

Name Nullable Type Description
has_more boolean

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

networks array of object of type Network

Networks for a team.

next_cursor string in EID 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_ACCESS_TOKEN"

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

Name Required Type Description
name string

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_ACCESS_TOKEN"
    -H "Content-Type: application/json"
    -d '{"name":"Crunchy Network"}'

Response

Status: 200

Responds with the standard Network API resource.