BGP
BGP lets a workspace announce its own IP prefixes (bring your own IP). Each workspace has at most one BGP configuration, which stores the workspace ASN, a BGP session password, and an optional instance that acts as the BGP endpoint. Prefix announcements are managed separately under /bgp/prefixes.
Fetching the BGP config and listing prefixes check workspace read permission and are available to any member with that permission. All mutation endpoints (PATCH, DELETE, POST, PUT on prefixes) are restricted to Administrator tokens.
See Workspaces and scope and Pagination for the conventions these endpoints follow.
Fetch BGP configuration
/v1/workspaces/{wid}/bgpFetch the BGP configuration for a workspaceReturns the current BGP configuration together with its live fields (including the decrypted session password). Returns 404 if no BGP configuration has been created for the workspace yet.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Returns an object with two top-level keys:
data (the stored configuration):
| Field | Type | Description |
|---|---|---|
id | string | BGP configuration ID |
asn | integer | Autonomous system number registered to this workspace |
instance | object | Instance designated as the BGP endpoint (id, name), or null if unset |
max_prefixes | integer | Maximum number of prefixes allowed on this BGP session |
live (fields resolved at request time):
| Field | Type | Description |
|---|---|---|
password | string | Decrypted BGP session password |
curl https://api.galaxygate.net/v1/workspaces/42/bgp \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-A 'curl/8.5'Update BGP configuration
/v1/workspaces/{wid}/bgpCreate or update the BGP configurationAdministrator only. Creates the BGP configuration if none exists for the workspace, then applies the supplied fields. Every field is optional; send only what you want to change.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Request body
| Field | Type | Description |
|---|---|---|
asn | integer | ASN to register to this workspace |
password | string | BGP session password (stored encrypted; returned decrypted in live.password) |
instance_id | integer or null | ID of the instance to designate as the BGP endpoint; send null to clear |
max_prefixes | integer | Maximum number of prefixes to allow |
Returns the updated BGP configuration in the same shape as the fetch endpoint.
Delete BGP configuration
/v1/workspaces/{wid}/bgpDelete the BGP configuration and all its prefixesAdministrator only. Deletes the BGP configuration for the workspace and removes all associated prefix entries.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Returns 200 OK with no body.
List BGP prefixes
/v1/workspaces/{wid}/bgp/prefixesList BGP prefix announcementsAdministrator only. Returns the prefix entries attached to the workspace BGP configuration, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
id | integer[] | Filter to specific prefix IDs |
prefix | string | Filter by prefix (CIDR notation, partial match) |
source | string | Filter by source; only MANUAL is currently defined |
enabled | boolean | Filter to enabled or disabled prefixes |
Plus the shared pagination parameters. Returns a paged list of prefix objects (see the prefix fields table in Announce a prefix below).
Announce a BGP prefix
/v1/workspaces/{wid}/bgp/prefixesAdd a BGP prefix announcementAdministrator only. Adds a prefix to the BGP configuration. All four fields are required.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
prefix | string | yes | Network prefix in CIDR notation, for example 203.0.113.0/24 |
source | string | yes | Origin of the prefix. Currently only MANUAL is valid. |
enabled | boolean | yes | Whether announcements for this prefix are active |
community | string | yes | BGP community to attach. One of DEFAULT or PROTECTED. |
curl -X POST https://api.galaxygate.net/v1/workspaces/42/bgp/prefixes \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-H "Content-Type: application/json" \
-A 'curl/8.5' \
-d '{
"prefix": "203.0.113.0/24",
"source": "MANUAL",
"enabled": true,
"community": "DEFAULT"
}'Returns the created prefix entry:
| Field | Type | Description |
|---|---|---|
id | integer | Prefix entry ID |
prefix | string | Network prefix in CIDR notation |
source | string | Origin of the prefix |
enabled | boolean | Whether announcements are active |
community | string | BGP community attached to this prefix |
Update a BGP prefix
/v1/workspaces/{wid}/bgp/prefixes/{id}Replace a BGP prefix entryAdministrator only. Replaces all fields on an existing prefix entry. All four body fields are required; to change a single field, repeat the existing values for the rest.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
id | integer | Prefix entry ID |
Request body
Same four fields as Announce a BGP prefix: prefix, source, enabled, community.
Returns the updated prefix entry in the same shape as the create response.
Delete a BGP prefix
/v1/workspaces/{wid}/bgp/prefixes/{id}Remove a BGP prefix announcementAdministrator only. Removes the prefix entry. The withdrawal takes effect asynchronously on the BGP session.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
id | integer | Prefix entry ID |
Returns 200 OK with no body.