> ## Documentation Index
> Fetch the complete documentation index at: https://bunny.net/docs/llms.txt
> Use this file to discover all available pages before exploring further.
# Update an origin group in a Load Balancer profile
## OpenAPI
````yaml https://core-api-public-docs.b-cdn.net/docs/v3/public.json post /loadbalancer/{loadBalancerId}/origingroup/{id}
openapi: 3.0.0
info:
title: bunny.net API
description: >-
Learn how to use the [bunny.net](https://bunny.net "bunny.net - The content delivery platform that truly hops.") API. Everything that can be done with the control panel can also be achieved with our API documented on this page. To learn how to use the storage API, have a look at our storage API documentation
Third party API clients:
We currently do not maintain an official API library, but you can use one of the third party ones provided here:
https://github.com/codewithmark/bunnycdn (bunny.net PHP library, thanks to Code With Mark)
Note that third party clients are not maintained or developed by bunny.net so we unfortunately cannot offer support for them.
termsOfService: https://bunny.net/tos
contact:
name: bunny.net
url: https://docs.bunny.net
email: support@bunny.net
version: 1.0.0
servers:
- url: https://api.bunny.net
description: bunny.net API Server
security:
- AccessKey: []
tags:
- name: Stream Video Library
- name: User
- name: AuditLog
- name: Storage Zone
- name: Statistics
- name: Search
- name: Pull Zone
- name: Pricing
- name: Load Balancer
- name: DNS Zone
- name: DNSSEC
- name: Billing
- name: API Keys
- name: Affiliate
- name: Countries
- name: Purge
- name: Region
paths:
/loadbalancer/{loadBalancerId}/origingroup/{id}:
post:
tags:
- Load Balancer
summary: Update an origin group in a Load Balancer profile
operationId: LoadBalancerOriginGroupEndpoint_UpdateOriginGroup
parameters:
- name: loadBalancerId
in: path
required: true
schema:
type: integer
format: int64
x-position: 1
- name: id
in: path
required: true
schema:
type: integer
format: int64
x-position: 2
requestBody:
x-name: model
description: The model for updating the origin group
content:
application/json:
schema:
$ref: '#/components/schemas/OriginGroupCreateModel'
required: true
x-position: 3
responses:
'200':
description: The updated origin group
content:
application/json:
schema:
$ref: '#/components/schemas/LoadBalancerOriginGroupModel'
'400':
description: The request was invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorData'
'401':
description: The request authorization failed
'404':
description: The Load Balancer profile or origin group was not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiErrorData'
'500':
description: Internal Server Error
security:
- AccessKey:
- User
- UserApi
- SubuserAPIPullZones
- SubuserPullZones
- SubuserManage
- SubuserAPIManage
- ScopedApiKey
- bearer:
- User
- UserApi
- SubuserAPIPullZones
- SubuserPullZones
- SubuserManage
- SubuserAPIManage
- ScopedApiKey
components:
schemas:
OriginGroupCreateModel:
type: object
additionalProperties: false
properties:
Name:
type: string
description: The name of the origin group
nullable: true
Enabled:
type: boolean
description: Set to true if the origin group is enabled
nullable: true
HealthCheckSettings:
description: Health check settings for monitoring origins in the group
nullable: true
oneOf:
- $ref: '#/components/schemas/HealthCheckSettings'
OriginLoadBalancingMethod:
description: >-
The load balancing method used for selecting origins within the
group
0 = Round Robin
1 = Weighted Random
2 = Least Connections
3 = Latency
nullable: true
oneOf:
- $ref: '#/components/schemas/OriginLoadBalancingMethod'
Latitude:
type: number
description: The latitude of the origin group location
format: double
nullable: true
Longitude:
type: number
description: The longitude of the origin group location
format: double
nullable: true
Weight:
type: integer
description: The weight of the origin group used for weighted load balancing
format: byte
nullable: true
Priority:
type: integer
description: The priority of the origin group used for failover load balancing
format: byte
nullable: true
LoadBalancerOriginGroupModel:
type: object
additionalProperties: false
properties:
Id:
type: integer
description: The unique ID of the origin group
format: int64
Name:
type: string
description: The name of the origin group
nullable: true
Enabled:
type: boolean
description: Set to true if the origin group is enabled
Latitude:
type: number
description: The latitude of the origin group location
format: double
Longitude:
type: number
description: The longitude of the origin group location
format: double
Weight:
type: integer
description: The weight of the origin group used for weighted load balancing
format: byte
Priority:
type: integer
description: The priority of the origin group used for failover load balancing
format: byte
OriginLoadBalancingMethod:
description: >-
The load balancing method used for selecting origins within the
group
0 = Round Robin
1 = Weighted Random
2 = Least Connections
3 = Latency
oneOf:
- $ref: '#/components/schemas/OriginLoadBalancingMethod'
Origins:
type: array
description: The list of origins associated with the origin group
nullable: true
items:
$ref: '#/components/schemas/LoadBalancerOriginModel'
HealthCheckSettings:
description: Health settings for the origin group
nullable: true
oneOf:
- $ref: '#/components/schemas/HealthCheckSettings'
ApiErrorData:
type: object
additionalProperties: false
properties:
ErrorKey:
type: string
nullable: true
Field:
type: string
nullable: true
Message:
type: string
nullable: true
HealthCheckSettings:
type: object
additionalProperties: false
properties:
Enabled:
type: boolean
description: Whether health checking is enabled for this origin group
nullable: true
Path:
type: string
description: The path used for health check requests
nullable: true
OriginLoadBalancingMethod:
type: integer
description: |-
0 = Round Robin
1 = Weighted Random
2 = Least Connections
3 = Latency
x-enumNames:
- RoundRobin
- WeightedRandom
- LeastConnections
- Latency
enum:
- 0
- 1
- 2
- 3
LoadBalancerOriginModel:
type: object
additionalProperties: false
properties:
Id:
type: integer
description: The unique ID of the origin
format: int64
Name:
type: string
description: The name of the origin
nullable: true
Weight:
type: integer
description: The weight of the origin used for weighted load balancing
format: int32
Enabled:
type: boolean
description: Whether traffic should route to this origin
HealthStatus:
description: |-
Current health status of the origin
0 = Healthy
1 = Degraded
oneOf:
- $ref: '#/components/schemas/HealthStatus'
OriginType:
description: >-
The type of origin to connect to. Magic Container origins must be
CDN endpoints; Anycast endpoints are not supported, use a Standard
origin for those
0 = Standard
1 = Storage Zone
2 = Edge Script
3 = Magic Container
oneOf:
- $ref: '#/components/schemas/OriginType'
EdgeScriptId:
type: integer
description: The ID of the Edge Script when using this origin type
format: int64
nullable: true
StorageZoneId:
type: integer
description: The ID of the Storage Zone when using this origin type
format: int64
nullable: true
StandardOrigin:
description: Standard Origin settings - Required with Standard origin type
nullable: true
oneOf:
- $ref: '#/components/schemas/StandardOriginModel'
MagicContainersOrigin:
description: >-
Magic Containers Origin settings - Required with Magic Containers
origin type
nullable: true
oneOf:
- $ref: '#/components/schemas/MagicContainersOriginModel'
HealthStatus:
type: integer
description: |-
0 = Healthy
1 = Degraded
x-enumNames:
- Healthy
- Degraded
enum:
- 0
- 1
OriginType:
type: integer
description: |-
0 = Standard
1 = Storage Zone
2 = Edge Script
3 = Magic Container
x-enumNames:
- Standard
- Storage
- EdgeScript
- MagicContainer
enum:
- 0
- 1
- 2
- 3
StandardOriginModel:
type: object
additionalProperties: false
properties:
OriginUrl:
type: string
description: The URL of the origin server
nullable: true
HostHeader:
type: string
description: The host header to send to the origin server
nullable: true
VerifySsl:
type: boolean
description: Whether to verify the SSL certificate of the origin server
nullable: true
MagicContainersOriginModel:
type: object
additionalProperties: false
properties:
AppId:
type: string
description: The ID of the Magic Containers app
nullable: true
EndPointId:
type: string
description: >-
The ID of the Magic Containers CDN endpoint. Anycast endpoints are
not supported, add those as a Standard origin using their IP address
and port
nullable: true
securitySchemes:
AccessKey:
type: apiKey
description: API Access Key authorization header
name: AccessKey
in: header
bearer:
type: apiKey
description: Bearer token authorization header
name: Authorization
in: header
````
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.