Skip to main content
POST
/
loadbalancer
/
{loadBalancerId}
/
origingroup
/
{originGroupId}
/
origin
/
{originId}
Update an existing origin
curl --request POST \
  --url https://api.bunny.net/loadbalancer/{loadBalancerId}/origingroup/{originGroupId}/origin/{originId} \
  --header 'AccessKey: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Weight": 123,
  "Enabled": true,
  "EdgeScriptId": 123,
  "StorageZoneId": 123,
  "StandardOrigin": {
    "OriginUrl": "<string>",
    "HostHeader": "<string>",
    "VerifySsl": true
  },
  "MagicContainersOrigin": {
    "AppId": "<string>",
    "EndPointId": "<string>"
  }
}
'
{
  "Id": 123,
  "Weight": 123,
  "Enabled": true,
  "EdgeScriptId": 123,
  "StorageZoneId": 123,
  "StandardOrigin": {
    "OriginUrl": "<string>",
    "HostHeader": "<string>",
    "VerifySsl": true
  },
  "MagicContainersOrigin": {
    "AppId": "<string>",
    "EndPointId": "<string>"
  }
}

Authorizations

AccessKey
string
header
required

API Access Key authorization header

Path Parameters

loadBalancerId
integer<int64>
required
originGroupId
integer<int64>
required
originId
integer<int64>
required

Body

application/json

The model for the origin update

Weight
integer<byte> | null

The weight of the origin used for weighted load balancing

Enabled
boolean | null

Whether traffic should route to this origin

OriginType
enum<integer>

The type of origin to connect to

Available options:
0,
1,
2,
3
EdgeScriptId
integer<int64> | null

The ID of the Edge Script to use as the origin - required when using the EdgeScript origin type

StorageZoneId
integer<int64> | null

The ID of the Storage Zone to use as the origin - required when using the Storage origin type

StandardOrigin
object

Standard origin settings - required when using the Standard origin type

MagicContainersOrigin
object

Magic Containers origin settings - required when using the Magic Containers origin type

Response

The updated origin

Id
integer<int64>

The unique ID of the origin

Weight
integer<int32>

The weight of the origin used for weighted load balancing

Enabled
boolean

Whether traffic should route to this origin

HealthStatus
enum<integer>

Current health status of the origin

Available options:
0,
1
OriginType
enum<integer>

The type of origin to connect to

Available options:
0,
1,
2,
3
EdgeScriptId
integer<int64> | null

The ID of the Edge Script when using this origin type

StorageZoneId
integer<int64> | null

The ID of the Storage Zone when using this origin type

StandardOrigin
object

Standard Origin settings - Required with Standard origin type

MagicContainersOrigin
object

Magic Containers Origin settings - Required with Magic Containers origin type