> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aieev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 레플리카 스케일링



## OpenAPI

````yaml openapi-ko.json POST /endpoints/{endpoint_id}/scale
openapi: 3.1.0
info:
  title: AirCloud External API
  description: AirCloud 엔드포인트를 프로그래밍 방식으로 관리하는 REST API입니다.
  version: 1.0.0
  contact:
    name: support
    url: https://aieev.com
    email: support@aieev.cloud
servers:
  - url: https://external.aieev.cloud:5007/external/api/v1
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: API Key 인증 정보 확인
  - name: Endpoints
    description: '엔드포인트 관리: 조회, 시작, 중지, 스케일링, 설정 변경'
  - name: Replicas
    description: 레플리카 상태 조회
  - name: Logs
    description: 엔드포인트 로그 조회
paths:
  /endpoints/{endpoint_id}/scale:
    post:
      tags:
        - Endpoints
      summary: 레플리카 스케일링
      description: 활성 엔드포인트의 레플리카 수를 조정합니다. 오토스케일링이 비활성화된 상태에서만 사용 가능합니다.
      operationId: scaleEndpoint
      parameters:
        - name: endpoint_id
          in: path
          required: true
          description: 엔드포인트 고유 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScaleReplicasInput'
      responses:
        '200':
          description: 스케일링 결과
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScaleReplicasResponse'
        '400':
          description: 엔드포인트가 비활성 상태이거나 오토스케일링이 활성화된 상태
components:
  schemas:
    ScaleReplicasInput:
      type: object
      required:
        - num_replicas
      properties:
        num_replicas:
          type: integer
          minimum: 1
          maximum: 100
          description: 변경할 레플리카 수 (1-100)
          example: 3
    ScaleReplicasResponse:
      type: object
      properties:
        endpoint_id:
          type: string
          description: 엔드포인트 고유 ID
          example: 51c910f7-ecde-4c6c-88f8-d8e37ca9d598
        previous_replicas:
          type: integer
          description: 변경 전 레플리카 수
          example: 1
        current_replicas:
          type: integer
          description: 변경 후 레플리카 수
          example: 3
        message:
          type: string
          description: 결과 메시지
          example: Successfully scaled from 1 to 3 replicas
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API Key를 Bearer 토큰으로 전달합니다. 프로젝트 개요의 API 키 메뉴에서 생성할 수 있습니다.

````