### Install APISIX Source: https://github.com/apache/apisix/blob/master/docs/en/latest/getting-started/README.md This command installs APISIX using a quickstart script. It starts two Docker containers: one for APISIX and one for etcd. Both containers use Docker host network mode, making APISIX accessible directly from localhost. ```shell curl -sL https://run.api7.ai/apisix/quickstart | sh ``` -------------------------------- ### Start APISIX service (DEB) Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/installation-guide.md Start the APISIX service when installed via DEB. ```shell sudo apisix start ``` -------------------------------- ### Install etcd on Linux Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/building-apisix.md Download, extract, and install etcd, then start it as a background process. ```shell ETCD_VERSION='3.4.18' wget https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \ cd etcd-v${ETCD_VERSION}-linux-amd64 && \ sudo cp -a etcd etcdctl /usr/bin/ nohup etcd >/tmp/etcd.log 2>&1 & ``` -------------------------------- ### Initialize and Start APISIX Server Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md Commands to initialize the APISIX configuration and etcd, and then start the APISIX server. ```shell sudo apisix init sudo apisix start ``` -------------------------------- ### Start Example SOAP Service Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/body-transformer.md Commands to clone the repository and start the example SOAP service. ```shell cd /tmp git clone https://github.com/spring-guides/gs-soap-service.git cd gs-soap-service/complete ./mvnw spring-boot:run ``` -------------------------------- ### Start example gRPC server Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/grpc-transcode.md Docker command to start an example gRPC server for testing. ```bash docker run -d \ --name grpc-example-server \ -p 50051:50051 \ api7/grpc-server-example:1.0.2 ``` -------------------------------- ### Start APISIX with a specific configuration file Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md Command to start the APISIX server, specifying the path to the configuration file. ```shell apisix start -c ``` -------------------------------- ### Install etcd on Linux Source: https://github.com/apache/apisix/blob/master/docs/en/latest/building-apisix.md Installs etcd on Linux by downloading the binary, copying it to the system path, and starting it as a background process. ```shell ETCD_VERSION='3.4.18' wget https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \ cd etcd-v${ETCD_VERSION}-linux-amd64 && \ sudo cp -a etcd etcdctl /usr/bin/ nohup etcd >/tmp/etcd.log 2>&1 & ``` -------------------------------- ### Verify the Installation Source: https://github.com/apache/apisix/blob/master/docs/en/latest/getting-started/README.md This command sends a request to confirm APISIX is running and displays the Server header, which includes the APISIX version. ```shell curl "http://127.0.0.1:9080" --head | grep Server ``` -------------------------------- ### Clean Up APISIX Quickstart Containers Source: https://github.com/apache/apisix/blob/master/docs/en/latest/getting-started/README.md This command stops and removes the Docker containers created by the quickstart script. ```shell docker rm -f apisix-quickstart etcd ``` -------------------------------- ### Clone apisix-docker repository and navigate to example directory Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md This command clones the apisix-docker repository and changes the directory to the example folder. ```shell git clone https://github.com/apache/apisix-docker.git cd apisix-docker/example ``` -------------------------------- ### Install etcd on macOS Source: https://github.com/apache/apisix/blob/master/docs/en/latest/building-apisix.md Installs etcd on macOS using Homebrew and starts it as a service. ```shell brew install etcd brew services start etcd ``` -------------------------------- ### Start APISIX using docker-compose for x86 architecture Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md This command starts APISIX using docker-compose for x86 architecture. ```shell docker-compose -p docker-apisix up -d ``` -------------------------------- ### SSL Configuration Change Source: https://github.com/apache/apisix/blob/master/docs/en/latest/upgrade-guide-from-2.15.x-to-3.0.0.md Example showing the replacement of `enable_http2` and `listen_port` under `apisix.ssl` with `apisix.ssl.listen`. ```yaml ssl: enable_http2: true listen_port: 9443 ``` ```yaml ssl: listen: - port: 9443 enable_http2: true ``` -------------------------------- ### Initialize APISIX service (DEB) Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/installation-guide.md Initialize NGINX configuration and etcd for APISIX when installed via DEB. ```shell sudo apisix init ``` -------------------------------- ### Start grpcbin server Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/grpc-web.md Starts a grpcbin server using Docker to serve as an example upstream. ```shell docker run -d \ --name grpcbin \ -p 9000:9000 \ moul/grpcbin ``` -------------------------------- ### Start APISIX using docker-compose for ARM/M1 architecture Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md This command starts APISIX using docker-compose with a specific file for ARM/M1 architecture. ```shell docker-compose -p docker-apisix -f docker-compose-arm64.yml up -d ``` -------------------------------- ### Admin API Port Configuration Change Source: https://github.com/apache/apisix/blob/master/docs/en/latest/upgrade-guide-from-2.15.x-to-3.0.0.md Example showing the change from `apisix.port_admin` to `deployment.admin.admin_listen`. ```yaml apisix: port_admin: 9180 ``` ```yaml deployment: apisix: admin_listen: ip: 127.0.0.1 # replace with the actual IP exposed port: 9180 ``` -------------------------------- ### Start an example rsyslog server in Docker Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/syslog.md This command starts a Docker container for an rsyslog server, which can be used to test the Syslog plugin. ```shell docker run -d -p 514:514 --name example-rsyslog-server rsyslog/syslog_appliance_alpine ``` -------------------------------- ### Modules: Yes (require) Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/CODE_STYLE.md Example of correct module usage with localized require. ```lua --Yes local timer_at = ngx.timer.at local function foo() local ok, err = timer_at(delay, handler) end ``` -------------------------------- ### Start APISIX Server Source: https://github.com/apache/apisix/blob/master/docs/en/latest/building-apisix.md Starts the APISIX server. ```shell apisix start ``` -------------------------------- ### Example GET request to homepage Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/authz-casbin.md This snippet shows an example of making a GET request to the homepage. ```shell curl -i http://127.0.0.1:9080/ -X GET ``` -------------------------------- ### Example APISIX configuration file Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md A sample YAML configuration file for APISIX, setting the default listening port. ```yaml apisix: node_listen: 8000 ``` -------------------------------- ### GET /v1/schema Response Example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/control-api.md Example JSON response for the GET /v1/schema API, which returns the JSON schema used by the APISIX instance. ```json { "main": { "route": { "properties": {...} }, "upstream": { "properties": {...} }, ... }, "plugins": { "example-plugin": { "consumer_schema": {...}, "metadata_schema": {...}, "schema": {...}, "type": ..., "priority": 0, "version": 0.1 }, ... }, "stream-plugins": { "mqtt-proxy": { ... }, ... } } ``` -------------------------------- ### Example Plugin Configuration Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugin-develop.md Configuration data for the example-plugin. ```json { "example-plugin": { "i": 1, "s": "s", "t": [1] } } ``` -------------------------------- ### Send GET Request Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/body-transformer.md Example of sending a GET request to the route. ```shell curl "http://127.0.0.1:9080/anything?name=john" ``` -------------------------------- ### Download hello.proto Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/grpc-web.md Downloads the Protocol Buffer definition file hello.proto. ```bash curl -O https://raw.githubusercontent.com/moul/pb/master/hello/hello.proto ``` -------------------------------- ### Send GET request as JohnDoe Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/consumer-restriction.md Example of sending a GET request as JohnDoe to test permissions. ```shell curl -i "http://127.0.0.1:9080/anything" -X GET -H 'apikey: john-key' ``` -------------------------------- ### Example usage Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/echo.md Make a request after configuring the Plugin. ```shell curl -i http://127.0.0.1:9080/hello ``` -------------------------------- ### Get Specific Plugin Properties Example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md Example of fetching properties for a specific plugin (key-auth) in the http subsystem. ```shell curl "http://127.0.0.1:9180/apisix/admin/plugins/key-auth?subsystem=http" -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' ``` -------------------------------- ### Send Request Example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md Example of initiating a request with `request` and setting headers with `more_headers`. ```nginx --- request PUT /hello?xx=y&xx=z&&y=&&z body part of the request --- more_headers X-Req: foo X-Req: bar X-Resp: cat ``` -------------------------------- ### Verify GraphQL matches - GET request Source: https://github.com/apache/apisix/blob/master/docs/en/latest/router-radixtree.md Example of verifying GraphQL matches using a GET request. ```shell $ curl -H 'content-type: application/graphql' -X GET \ "http://127.0.0.1:9080/graphql?query=query getRepo { owner {name } repo {created}}" -g ``` -------------------------------- ### Initialize APISIX Configuration Source: https://github.com/apache/apisix/blob/master/docs/en/latest/building-apisix.md Initializes the configuration file for APISIX. ```shell apisix init ``` -------------------------------- ### Build and install brotli shared libraries Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/brotli.md Example commands to build and install brotli shared libraries. ```shell wget https://github.com/google/brotli/archive/refs/tags/v1.1.0.zip unzip v1.1.0.zip cd brotli-1.1.0 && mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/brotli .. sudo cmake --build . --config Release --target install sudo sh -c "echo /usr/local/brotli/lib >> /etc/ld.so.conf.d/brotli.conf" sudo ldconfig ``` -------------------------------- ### Enable gzip plugin Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/gzip.md The following example shows how to enable the `gzip` plugin in a specified route. ```shell curl -i http://127.0.0.1:9180/apisix/admin/routes/1 \ -H "X-API-KEY: $admin_key" -X PUT -d ' { "uri": "/index.html", "plugins": { "gzip": { "buffers": { "number": 8 } } }, "upstream": { "type": "roundrobin", "nodes": { "127.0.0.1:1980": 1 } } }' ``` -------------------------------- ### Install dependencies and build APISIX Source: https://github.com/apache/apisix/blob/master/docs/en/latest/building-apisix.md Navigates to the APISIX directory, installs dependencies, and builds APISIX. ```shell cd apisix-${APISIX_BRANCH} make deps make install ``` -------------------------------- ### Example Limit-Conn Plugin Configuration Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugin-develop.md Example configuration for the limit-conn plugin. ```json { "rejected_code": 503, "burst": 0, "default_conn_delay": 0.1, "conn": 1, "key": "remote_addr" } ``` -------------------------------- ### Batch Requests Endpoint Example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/public-api.md This example demonstrates the structure of a response from the batch requests endpoint, showing details of GET and POST requests. ```json [ { "body": "{\n \"args\": {}, \n \"data\": \"\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Accept\": \"*/*\", \n \"Host\": \"127.0.0.1\", \n \"User-Agent\": \"curl/8.6.0\", \n \"X-Amzn-Trace-Id\": \"Root=1-67b6e33b-5a30174f5534287928c54ca9\", \n \"X-Forwarded-Host\": \"127.0.0.1\"\n }, \n \"json\": null, \n \"method\": \"GET\", \n \"origin\": \"192.168.107.1, 43.252.208.84\", \n \"url\": \"http://127.0.0.1/anything\"\n}\n", "headers": { ... }, "status": 200 }, { "reason": "OK", "body": "{\n \"args\": {}, \n \"data\": \"a post request\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Accept\": \"*/*\", \n \"Content-Length\": \"14\", \n \"Host\": \"127.0.0.1\", \n \"User-Agent\": \"curl/8.6.0\", \n \"X-Amzn-Trace-Id\": \"Root=1-67b6e33b-0eddcec07f154dac0d77876f\", \n \"X-Forwarded-Host\": \"127.0.0.1\"\n }, \n \"json\": null, \n \"method\": \"POST\", \n \"origin\": \"192.168.107.1, 43.252.208.84\", \n \"url\": \"http://127.0.0.1/anything\"\n}\n", "headers": { ... }, "status": 200 } ] ``` -------------------------------- ### Example Configuration Source: https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md An example JSON configuration for a certificate resource. ```json { "id": "1", # id "cert": "cert", # Certificate "key": "key", # Private key "snis": ["t.com"] # https SNI } ``` -------------------------------- ### GET /status Response Source: https://github.com/apache/apisix/blob/master/docs/en/latest/status-api.md Example JSON response for the GET /status endpoint, indicating the status of APISIX workers. ```json { "status": "ok" } ``` -------------------------------- ### Create a Route Source: https://github.com/apache/apisix/blob/master/docs/en/latest/tutorials/expose-api.md This command creates a Route named '1' that matches GET requests to 'example.com' with the URI '/anything/*', and forwards them to upstream_id '1'. ```shell curl "http://127.0.0.1:9180/apisix/admin/routes/1" \ -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d ' { "methods": ["GET"], "host": "example.com", "uri": "/anything/*", "upstream_id": "1" }' ``` -------------------------------- ### List Plugins Example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md Example of fetching a list of all plugins using curl. ```shell curl "http://127.0.0.1:9180/apisix/admin/plugins/list" \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' ``` -------------------------------- ### Script Configuration Example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/terminology/script.md An example of how to configure a script in JSON format, showing the 'script' field containing Lua code. ```json { "script": "local _M = {} function _M.access(api_ctx) ngx.log(ngx.INFO,\"hit access phase\") end return _M" } ``` -------------------------------- ### docker-compose.yml Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/kafka-logger.md Example docker-compose.yml to start a sample Kafka cluster. ```yaml services: zookeeper: image: confluentinc/cp-zookeeper:7.8.0 container_name: zookeeper environment: ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 kafka: image: confluentinc/cp-kafka:7.8.0 container_name: kafka depends_on: - zookeeper environment: KAFKA_BROKER_ID: 1 KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://127.0.0.1:9092 KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" ports: - "9092:9092" ``` -------------------------------- ### Example Usage Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/forward-auth.md This Lua code snippet demonstrates how to implement the forward-auth logic. ```lua if authorization == "123" then core.response.exit(200) elseif authorization == "321" then core.response.set_header("X-User-ID", "i-am-user") core.response.exit(200) else core.response.set_header("X-Forward-Auth", "Fail") core.response.exit(403) end ``` -------------------------------- ### config.yaml Source: https://github.com/apache/apisix/blob/master/docs/en/latest/terminology/plugin.md Example of customizing plugins installation in config.yaml. ```yaml plugins: - real-ip # installed - ai - client-control - proxy-control - request-id - zipkin - ext-plugin-pre-req - fault-injection # - mocking # not install - serverless-pre-function ... # other plugins ``` -------------------------------- ### Table - Yes (pre-allocation) Source: https://github.com/apache/apisix/blob/master/CODE_STYLE.md Example of correct table creation using table.new for pre-allocation. ```lua --Yes local new_tab = require "table.new" local t = new_tab(100, 0) for i = 1, 100 do t[i] = i end ``` -------------------------------- ### Install etcd on Linux Source: https://github.com/apache/apisix/blob/master/docs/en/latest/installation-guide.md Steps to download, extract, and run etcd on a Linux system. ```shell ETCD_VERSION='3.5.4' wget https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \ cd etcd-v${ETCD_VERSION}-linux-amd64 && \ sudo cp -a etcd etcdctl /usr/bin/ nohup etcd >/tmp/etcd.log 2>&1 & ``` -------------------------------- ### GET /status/ready Response (Worker Configuration Error) Source: https://github.com/apache/apisix/blob/master/docs/en/latest/status-api.md Example JSON response for the GET /status/ready endpoint when a specific worker has not loaded the configuration. ```json { "error": "worker id: 9 has not received configuration", "status": "error" } ``` -------------------------------- ### GET /status/ready Response (Worker Initialization Error) Source: https://github.com/apache/apisix/blob/master/docs/en/latest/status-api.md Example JSON response for the GET /status/ready endpoint when there's an issue with worker initialization. ```json { "status": "error", "error": "worker count: 16 but status report count: 15" } ``` -------------------------------- ### Check for Port Conflicts Source: https://github.com/apache/apisix/blob/master/docs/en/latest/getting-started/README.md This command checks if ports 9080, 9180, or 9443 are already in use by any processes, which can prevent the APISIX container from starting. ```shell lsof -i :9080 -i :9180 -i :9443 ``` -------------------------------- ### GET /v1/discovery/{service}/show_dump_file Response Source: https://github.com/apache/apisix/blob/master/docs/en/latest/control-api.md Example JSON response for the GET /v1/discovery/{service}/show_dump_file endpoint, showing configured services details. ```json { "services": { "service_a": [ { "host": "172.19.5.12", "port": 8000, "weight": 120 }, { "host": "172.19.5.13", "port": 8000, "weight": 120 } ] }, "expire": 0, "last_update": 1615877468 } ``` -------------------------------- ### Create a Plugin Config and bind it to a Route Source: https://github.com/apache/apisix/blob/master/docs/en/latest/terminology/plugin-config.md This example shows how to create a Plugin Config with 'limit-count' and then bind it to a Route. ```bash admin_key=$(yq '.deployment.admin.admin_key[0].key' conf/config.yaml | sed 's/"//g') ``` ```shell curl http://127.0.0.1:9180/apisix/admin/plugin_configs/1 \ -H "X-API-KEY: $admin_key" -X PUT -i -d ' { "desc": "blah", "plugins": { "limit-count": { "count": 2, "time_window": 60, "rejected_code": 503 } } }' ``` ```shell curl http://127.0.0.1:9180/apisix/admin/routes/1 \ -H 'X-API-KEY:edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d ' { "uris": ["/index.html"], "plugin_config_id": 1, "upstream": { "type": "roundrobin", "nodes": { "127.0.0.1:1980": 1 } } }' ``` -------------------------------- ### Rewrite HTTP Method Source: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/proxy-rewrite.md This example demonstrates how to rewrite a GET request into a POST request. ```shell curl "http://127.0.0.1:9180/apisix/admin/routes" -X PUT \ -H "X-API-KEY: ${admin_key}" \ -d '{ "id": "proxy-rewrite-route", "methods": ["GET"], "uri": "/get", "plugins": { "proxy-rewrite": { "uri": "/anything", "method":"POST" } }, "upstream": { "type": "roundrobin", "nodes": { "httpbin.org:80": 1 } } }' ``` ```shell curl "http://127.0.0.1:9080/get" ``` -------------------------------- ### Test file structure example Source: https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md Example of how test files are organized in the 't/' directory, showing how multiple files can be used for testing the same component. ```bash t/ ├── admin │ ├── consumers.t │ ├── consumers2.t ``` -------------------------------- ### Space - No Source: https://github.com/apache/apisix/blob/master/CODE_STYLE.md Example of incorrect spacing around operators. ```lua --No local i=1 local s = "apisix" ``` -------------------------------- ### Start Etcd Source: https://github.com/apache/apisix/blob/master/docs/en/latest/build-apisix-dev-environment-on-mac.md This command starts an Etcd container for APISIX to use. ```shell docker run -d --name etcd-apisix --net=host pachyderm/etcd:v3.5.2 ``` -------------------------------- ### Convert GET Request Query Parameters to Body Source: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/body-transformer.md Example of creating a route with the body-transformer plugin to convert GET request query parameters to the request body. ```shell curl "http://127.0.0.1:9180/apisix/admin/routes" -X PUT \ -H "X-API-KEY: ${admin_key}" \ -d '{ "id": "body-transformer-route", "uri": "/anything", "plugins": { "body-transformer": { "request": { "input_format": "args", "template": "{\"message\": \"hello {{name}}\"}" } } }, "upstream": { "type": "roundrobin", "nodes": { "httpbin.org:80": 1 } } }' ``` -------------------------------- ### GET /v1/discovery/{service}/dump Response Source: https://github.com/apache/apisix/blob/master/docs/en/latest/control-api.md Example JSON response for the GET /v1/discovery/{service}/dump endpoint, showing discovered service endpoints and configuration details. ```json { "endpoints": [ { "endpoints": [ { "value": "{\"https\":[{\"host\":\"172.18.164.170\",\"port\":6443,\"weight\":50},{\"host\":\"172.18.164.171\",\"port\":6443,\"weight\":50},{\"host\":\"172.18.164.172\",\"port\":6443,\"weight\":50}]}", "name": "default/kubernetes" }, { "value": "{\"metrics\":[{\"host\":\"172.18.164.170\",\"port\":2379,\"weight\":50},{\"host\":\"172.18.164.171\",\"port\":2379,\"weight\":50},{\"host\":\"172.18.164.172\",\"port\":2379,\"weight\":50}]}", "name": "kube-system/etcd" }, { "value": "{\"http-85\":[{\"host\":\"172.64.89.2\",\"port\":85,\"weight\":50}]}", "name": "test-ws/testing" } ], "id": "first" } ], "config": [ { "default_weight": 50, "id": "first", "client": { "token": "xxx" }, "service": { "host": "172.170.164.170", "port": "6443", "schema": "https" }, "shared_size": "1m" } ] } ``` -------------------------------- ### Configure Your First Route Source: https://github.com/apache/apisix/blob/master/docs/en/latest/getting-started/README.md This command creates a new route (ID 1) that proxies requests to httpbin.org. It defines the URI to match and the upstream service. ```shell curl -i "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT -d ' { "uri": "/get", "upstream": { "type": "roundrobin", "nodes": { "httpbin.org:80": 1 } } }' ```