---
title: "Register a single switch"
method: POST
path: "/api/admin/switches"
tags: ["Admin: Switches"]
---

# Register a single switch

`POST /api/admin/switches`

## Request

- Base URL: `https://api.fiber.ac` (the document declares no server; this is the origin it was published from)
- URL: `https://api.fiber.ac/api/admin/switches`
- Auth: none declared

## Request body

- SwitchCreate: 관리자 단일 등록 입력.
  - `name` string, required
  - `vendor` 'arista' | 'cisco' | 'nvidia' | 'juniper' | 'unknown'
  - `model` string, nullable
  - `role` string
  - `rack_id` string, nullable
  - `pod_id` string, nullable
  - `mgmt_ip` string, nullable: management IP (IPv4 또는 hostname)
  - `gnmi_port` integer
  - `tenant_id` string
  - `username` string, nullable
  - `password` string, nullable: 평문 — 저장 시 Fernet 으로 즉시 암호화
  - `ssh_key` string, nullable: 평문 PEM/OpenSSH key — 저장 시 암호화
  - `auth_method` 'password' | 'ssh_key' | 'mtls'
  - `poll_interval_s` integer
  - `tls_insecure` boolean
  - `source` 'manual' | 'csv' | 'netbox' | 'cloudvision' | 'netq' | 'dcnm'
  - `source_ref` string, nullable

## Response `200`

Successful Response

- SwitchOut: 관리자 응답 — 비밀 필드 없음.
  - `id` integer, required
  - `name` string, required
  - `vendor` string, required
  - `model` string, nullable
  - `role` string, required
  - `rack_id` string, nullable
  - `pod_id` string, nullable
  - `mgmt_ip` string, nullable
  - `gnmi_port` integer, required
  - `tenant_id` string, required
  - `enabled` boolean, required
  - `onboarded_at` string, date-time, nullable
  - `last_seen_at` string, date-time, nullable
  - `last_probe_ok` boolean, nullable
  - `last_probe_err` string, nullable
  - `vendor_os` string, nullable
  - `vendor_os_ver` string, nullable
  - `source` string, required
  - `source_ref` string, nullable
  - `poll_interval_s` integer, required
  - `tls_insecure` boolean, required
  - `config_version` integer, required
  - `has_password` boolean
  - `has_ssh_key` boolean
  - `auth_method` string, nullable
  - `username` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fiber-ac/apis/fiber-api.md) · [All operations](https://skmtc.dev/fiber-ac/apis/fiber-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fiber-ac/apis/fiber-api/revisions/58267250d793?raw)
