openapi: 3.2.0 info: title: Pica8 AmpCon Network Controller Switch API version: 1.12.1 summary: JSON REST API of the customer-deployed Pica8 AmpCon network controller. description: 'Machine-readable transcription of the REST API that Pica8 publishes for its AmpCon Network Controller. PROVENANCE — read before using. Pica8 does **not** publish an OpenAPI description. This document was transcribed by API Evangelist, operation by operation, from Pica8''s own published API reference: the `AmpCon 1.12.0 API document 20230625.docx` attachment on the public AmpCon documentation wiki page listed in `externalDocs` (page 753668, space `ampcon`, AmpCon version 1.12.1, update time 2023/06/25). Every path, method, header, request field, example value and error message below is copied from that document. Nothing has been invented, extrapolated or inferred: where the source document is incomplete or self-inconsistent that is recorded in `x-documentation-gaps` and in the affected operation''s description rather than being filled in. This is a derived artifact, not a first-party Pica8 contract. DEPLOYMENT — AmpCon is customer-installed software. There is no Pica8-hosted API endpoint; the server variable in `servers[]` is the operator''s own AmpCon appliance address, exactly as the source document writes it (`https:///`). AUTHENTICATION — `POST /token` exchanges AmpCon web login credentials for a JWT, which is then sent as `Authorization: Bearer `. Only `superadmin` users may mint a token or call the API. ERROR SIGNALLING — AmpCon reports outcome in the response BODY, in a `status` or `status_code` field (200 / 400 / 500), together with a human-readable `msg`, `message` or `info` string. The document does not guarantee that the HTTP status line mirrors the body, so clients must read the body.' contact: name: Pica8 Support url: https://www.pica8.com/support/ x-provenance: method: derived derived-by: API Evangelist enrichment pipeline derived-on: '2026-08-26' derived-from: 'https://pica8-fs.atlassian.net/wiki/spaces/ampcon/pages/753668/AmpCon+API+document (attachment: AmpCon 1.12.0 API document 20230625.docx, AmpCon version 1.12.1, update time 2023/06/25)' first-party: false verbatim: false note: Transcribed from the provider's published prose/Word API reference. Not published by Pica8 as OpenAPI. x-documentation-gaps: - operation: Upgrade switch (section 4.11) gap: The URL in the published document is truncated to `https:///api/` and the HTTP method field is blank. Content-Type is multipart/form-data and the input is `[sn, files]`. The path was NOT guessed and the operation is therefore absent from paths[]. - operation: Group schedule upgrade (section 4.18) gap: The URL in the published document is truncated to `https:///api/`. Method POST, Content-Type multipart/form-data, input `[name, start_date, end_date, files]`. Path not guessed; operation absent from paths[]. - operation: Run playbook (section 6.4) gap: The URL in the published document is truncated to `https:///api/`. Method POST, Content-Type application/json, input includes playbook_name, playbook_dir, switches[], switch_checkall, group_list[], vars and a scheduled object with type DIRECT|ONCE|SCHEDULED. Path not guessed; operation absent from paths[]. - operation: Get configuration file by name (section 3.4.2) gap: The published document gives the same URL (`/api/config_files`) for both the list and the filter-by-name variant, with no name parameter. Only the list form is described here. - operation: Delete group (section 4.17) gap: The published document assigns `POST /api/switch/groups/update` to BOTH group update and group delete. Modelled as a single overloaded operation. - operation: Update AmpCon login user (section 5.3) gap: The published document records the method as GET while also specifying a JSON request body. Transcribed as documented. servers: - url: https://{ampcon-server-ip} description: Customer-deployed AmpCon Network Controller. Written `https:///` in the source document. variables: ampcon-server-ip: default: ampcon.example.internal description: Address of the operator's own AmpCon server. security: - bearerAuth: [] tags: - name: Switch description: 'Switch inventory and lifecycle: stage, import, DECOM, RMA, logs.' paths: /api/switch/all_switch_list: get: operationId: getAllSwitches summary: Get all switch list description: Returns every switch known to the AmpCon server with its serial number, hardware id, management and temporary IPs, provisioning status, step and PICOS version. tags: - Switch responses: '200': description: Switch list. content: application/json: schema: type: array items: type: object properties: sn: type: string host_name: type: string hwid: type: string mgt_ip: type: string tmp_ip: type: string link_ip_addr: type: string address: type: string domain: type: string current_user: type: string current_password: type: string remark: type: string status: type: string topology: type: string version: type: string step: type: integer example: - sn: EC1815000436 host_name: '1234' hwid: BD46-BDF7-DF7B-7435 mgt_ip: 10.8.0.6 tmp_ip: 10.8.0.6 status: Provisioning Success step: 6 topology: '1' version: 3.8.0.1 /api/switch/deployed_switch_list: get: operationId: getDeployedSwitches summary: Get deployed switch list description: Returns only the switches that have completed deployment. tags: - Switch responses: '200': description: Deployed switch list. content: application/json: schema: type: array items: type: object properties: sn: type: string host_name: type: string hwid: type: string mgt_ip: type: string tmp_ip: type: string link_ip_addr: type: string address: type: string domain: type: string current_user: type: string current_password: type: string remark: type: string status: type: string topology: type: string version: type: string step: type: integer /api/switch/parkinglot: get: operationId: getParkingLotSwitches summary: Get switches in the parking lot description: Returns switches that have powered up and registered with AmpCon but for which no generated configuration could be found, with registration counts and history. tags: - Switch responses: '200': description: Parking-lot switch list. content: application/json: schema: type: array items: type: object properties: sn: type: string ip: type: string model: type: string address: type: string remark: type: string history_time: type: string last_register: type: string register_count: type: integer investigate: type: boolean /api/switch/switch_list/{switch_sn}: get: operationId: getSwitchBySn summary: Get switch information by serial number description: Returns one switch record filtered by serial number. tags: - Switch responses: '200': description: Switch. content: application/json: schema: type: array items: type: object properties: sn: type: string host_name: type: string hwid: type: string mgt_ip: type: string tmp_ip: type: string link_ip_addr: type: string address: type: string domain: type: string current_user: type: string current_password: type: string remark: type: string status: type: string topology: type: string version: type: string step: type: integer parameters: - name: switch_sn in: path required: true schema: type: string description: Switch serial number. /api/switch/stage: post: operationId: stageSwitch summary: Stage a switch description: Stages a switch so that AmpCon starts the deployment process the next time that switch registers with the server. tags: - Switch responses: '200': description: Success. AmpCon returns a message plus a status/status_code field in the body; the HTTP status line is not the primary error signal. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: The EC1815000436 staged status: 200 '500': description: Documented error response. AmpCon reports the failure in the body (`status` / `status_code` of 400 or 500) alongside a human-readable message. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: The EC18150004361 switch does not exist status: 500 requestBody: required: true content: application/json: schema: type: object properties: sn: type: string required: - sn example: sn: EC1815000436 /api/switch/decom: post: operationId: decommissionSwitch summary: Decommission (DECOM) a switch description: REVERSAL OPERATION. Removes the switch from AmpCon management and restores its default settings — the documented way to undo a deployment. No time window is stated. tags: - Switch responses: '200': description: Success. AmpCon returns a message plus a status/status_code field in the body; the HTTP status line is not the primary error signal. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: DECOM success status: 200 '400': description: Documented error response. AmpCon reports the failure in the body (`status` / `status_code` of 400 or 500) alongside a human-readable message. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: 'The sn:EC18150004361 switch decom failed, error: cannot find switch EC18150004361' status: 400 '500': description: Documented error response. AmpCon reports the failure in the body (`status` / `status_code` of 400 or 500) alongside a human-readable message. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: info: cannot connect to switch, please check status: '500' requestBody: required: true content: application/json: schema: type: object properties: sn: type: string required: - sn example: sn: EC1815000436 /api/switch/rma: post: operationId: rmaSwitch summary: RMA a switch description: Transfers a broken switch's saved deployment configuration onto a replacement unit. `staged` controls whether the new serial number is staged immediately. tags: - Switch responses: '200': description: Success. AmpCon returns a message plus a status/status_code field in the body; the HTTP status line is not the primary error signal. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: status: '200' msg: RMA Success '400': description: Documented error response. AmpCon reports the failure in the body (`status` / `status_code` of 400 or 500) alongside a human-readable message. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: new sn number is same as original status: 400 requestBody: required: true content: application/json: schema: type: object properties: old_sn: type: string new_sn: type: string staged: type: string required: - old_sn - new_sn example: old_sn: EC1703000856 new_sn: EC1750001004 staged: 'true' /api/switch/log: get: operationId: getSwitchLogs summary: Get AmpCon switch logs description: Returns the AmpCon operation log, one entry per event with serial number, timestamp, message, severity type and read status. tags: - Switch responses: '200': description: Operation log. content: application/json: schema: type: array items: type: object properties: sn: type: string msg: type: string history_time: type: string status: type: string type: type: string count: type: integer /api/switch/import: get: operationId: getImportedSwitches summary: Get import switch list description: Returns the switches that were imported into AmpCon rather than provisioned by zero-touch provisioning. tags: - Switch responses: '200': description: Imported switch list. content: application/json: schema: type: array items: type: object properties: sn: type: string host_name: type: string hwid: type: string mgt_ip: type: string tmp_ip: type: string link_ip_addr: type: string address: type: string domain: type: string current_user: type: string current_password: type: string remark: type: string status: type: string topology: type: string version: type: string step: type: integer post: operationId: importSwitch summary: Import an already-configured switch description: Brings an existing, already-configured switch under AmpCon management by IP address. tags: - Switch responses: '200': description: Success. AmpCon returns a message plus a status/status_code field in the body; the HTTP status line is not the primary error signal. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: Import success! status: 200 '400': description: Documented error response. AmpCon reports the failure in the body (`status` / `status_code` of 400 or 500) alongside a human-readable message. content: application/json: schema: type: object properties: msg: type: string status_code: type: integer status: type: integer info: type: string message: type: string example: msg: sn EC1815000436 already exists in AmpCon status: 400 requestBody: required: true content: application/json: schema: type: object properties: ip: type: string required: - ip example: ip: 10.1.0.22 components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'JWT minted by POST /token from AmpCon web login credentials. Only `superadmin` level users may mint a token. Sent as `Authorization: Bearer `. An expired or invalid token returns the message `Invalid Token`.' externalDocs: description: Pica8 AmpCon API document (source of this transcription) url: https://pica8-fs.atlassian.net/wiki/spaces/ampcon/pages/753668/AmpCon+API+document