| # | |
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| get: | |
| tags: | |
| - Standalone | |
| operationId: getStandaloneConfig | |
| summary: Get the standalone configuration | |
| description: Available in API-driven standalone mode, with the YAML configuration provider and Admin API enabled. Returns the accepted configuration snapshot and its version and digest metadata, not a worker synchronization report. See [API-Driven Standalone Mode Usage](/apisix/reference/api-standalone-usage). | |
| responses: | |
| "200": | |
| description: Current standalone configuration. | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| application/yaml: | |
| schema: | |
| type: string | |
| "401": | |
| $ref: ../components/responses/Unauthorized.yaml | |
| "500": | |
| $ref: ../components/responses/BadRequest.yaml | |
| description: Failed to retrieve or encode stored configuration. | |
| parameters: [] | |
| put: | |
| tags: | |
| - Standalone | |
| operationId: putStandaloneConfig | |
| summary: Replace the standalone configuration | |
| description: Replace the complete API-driven standalone configuration. X-Digest is a required client-supplied identifier. A matching digest returns 204 without applying the body. Otherwise the snapshot is stored and broadcast asynchronously; 202 does not confirm synchronization of all workers. Omitted resource sections may remove existing resources unless the corresponding configuration version is retained. | |
| requestBody: | |
| required: true | |
| content: | |
| application/json: | |
| schema: | |
| type: object | |
| application/yaml: | |
| schema: | |
| type: string | |
| responses: | |
| "202": | |
| description: Configuration accepted; asynchronous worker update scheduled. | |
| "204": | |
| description: Digest unchanged; no update. | |
| "400": | |
| $ref: ../components/responses/BadRequest.yaml | |
| "401": | |
| $ref: ../components/responses/Unauthorized.yaml | |
| "500": | |
| description: Failed to store or broadcast the configuration. | |
| content: | |
| application/json: | |
| schema: | |
| anyOf: | |
| - $ref: ../components/schemas/ErrorResponse.yaml | |
| - type: string | |
| parameters: | |
| - name: X-Digest | |
| in: header | |
| required: true | |
| description: Client-chosen identifier for this snapshot. Use a new value for changed content. | |
| schema: | |
| type: string | |
| head: | |
| tags: | |
| - Standalone | |
| operationId: headStandaloneConfig | |
| summary: Probe standalone configuration availability | |
| description: Returns `200 OK` when the API-driven standalone configuration endpoint is reachable, including before any snapshot is loaded. When available, digest and last-modified metadata are returned in headers. This endpoint does not confirm worker synchronization. | |
| responses: | |
| "200": | |
| description: Standalone configuration is reachable. | |
| "401": | |
| $ref: ../components/responses/Unauthorized.yaml | |
| "500": | |
| $ref: ../components/responses/BadRequest.yaml | |
| description: Failed to retrieve or encode stored configuration. | |
| parameters: [] |