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

# Leader pushes config to peers

> Two-phase push with peer validate then commit. Only allowed when node role is `leader`.




## OpenAPI

````yaml openapi/arc-gateway-control-plane.openapi.yaml post /v1/cluster/config
openapi: 3.1.0
info:
  title: Arc Gateway Control Plane API
  version: 1.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  description: >
    OpenAPI for Arc Gateway control-plane HTTP endpoints implemented in
    `crates/arc-gateway/src/control.rs`.


    Authentication behavior:

    - If `control_plane.auth_token` is set, send `Authorization: Bearer
    <token>`.

    - If `control_plane.auth_token` is not set, only loopback clients are
    accepted.
servers:
  - url: http://127.0.0.1:22100
security:
  - bearerAuth: []
  - {}
tags:
  - name: status
    description: Node status and generation endpoints.
  - name: config
    description: Config fetch, long-poll, validation, and local apply endpoints.
  - name: cluster
    description: Cluster-level config push and circuit snapshot endpoints.
  - name: gossip
    description: Gossip membership, stats, and lifecycle endpoints.
  - name: xdp
    description: XDP status and map management endpoints.
paths:
  /v1/cluster/config:
    post:
      tags:
        - cluster
      summary: Leader pushes config to peers
      description: >
        Two-phase push with peer validate then commit. Only allowed when node
        role is `leader`.
      operationId: pushClusterConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArcConfigDocument'
      responses:
        '200':
          description: Push accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterConfigPushResponse'
        '400':
          description: Invalid config JSON for local compile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Called on non-leader node
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Restart-required config fields changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestartRequiredResponse'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: Quorum failure or partial commit failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterConfigPushResponse'
components:
  schemas:
    ArcConfigDocument:
      type: object
      description: Raw Arc config JSON document.
      additionalProperties: true
    ClusterConfigPushResponse:
      type: object
      required:
        - ok
        - generation
      properties:
        ok:
          type: boolean
        generation:
          type: integer
          format: int64
        validated:
          type: integer
          format: int32
        committed:
          type: integer
          format: int32
        quorum:
          type: integer
          format: int32
        scope:
          type: string
          enum:
            - http_push
            - gossip
        reason:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    RestartRequiredResponse:
      type: object
      required:
        - ok
        - status
        - generation
        - changed_params
        - message
      properties:
        ok:
          type: boolean
          const: false
        status:
          type: string
          const: restart_required
        generation:
          type: integer
          format: int64
        changed_params:
          type: array
          items:
            type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: unauthorized
    InternalError:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque

````