---
title: "Configure Resource Load Balancing"
url: "https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598/operations/ResourceController_saveLoadBalancing"
---

> Full API specification: https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598.md

# Configure Resource Load Balancing

`POST` `/tenants/resources/{id}/loadBalancing`

Operation ID: `ResourceController_saveLoadBalancing`

Configures load balancing settings for a resource, determining how traffic is distributed across multiple gateways. Supports both manual gateway selection and automatic load balancing algorithms.

## Path parameters

- `id` (string, uuid, required) - The unique identifier (UUID) of the resource

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Successfully applied load balancing configuration
- `400` - Bad Request - Invalid load balancing configuration data
- `401` - Unauthorized - Invalid or missing authentication token
- `403` - Forbidden - Insufficient permissions to perform this operation.
- `404` - Resource not found with the provided ID

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Cipherscale API
  version: "1.0"
servers:
  - url: https://public-api.cipherscale.com/qa
    description: Cipherscale Public API Server
paths:
  /tenants/resources/{id}/loadBalancing:
    post:
      operationId: ResourceController_saveLoadBalancing
      summary: Configure Resource Load Balancing
      description: Configures load balancing settings for a resource, determining how
        traffic is distributed across multiple gateways. Supports both manual
        gateway selection and automatic load balancing algorithms.
      parameters:
        - name: id
          required: true
          in: path
          description: The unique identifier (UUID) of the resource
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplyLoadBalancingDto"
      responses:
        "201":
          description: Successfully applied load balancing configuration
        "400":
          description: Bad Request - Invalid load balancing configuration data
        "401":
          description: Unauthorized - Invalid or missing authentication token
        "403":
          description: Forbidden - Insufficient permissions to perform this operation.
        "404":
          description: Resource not found with the provided ID
      tags:
        - Resources
      security:
        - ApiKeyAuth: []
security:
  - ApiKeyAuth: []
components:
  schemas:
    ApplyLoadBalancingDto:
      type: object
      properties:
        loadBalancingMode:
          default: MANUAL
          enum:
            - MANUAL
            - AUTOMATIC
          type: string
        gateways:
          type: array
          items:
            type: string
      required:
        - loadBalancingMode
        - gateways
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
```
