🔌 Base endpoint: /mockoon-admin/environment
This endpoint allows you to fully update the environment definition without restarting the mock server or the application. The payload must include the complete environment configuration. No merging with the existing configuration will be performed.
⚠️ Note: some server configuration options cannot be updated during runtime (see below).
To update the environment configuration, call the /mockoon-admin/environment endpoint with the following parameters:
PUT/mockoon-admin/environmentExample request:
CopyPUT /mockoon-admin/environment Content-Type: application/json { "uuid": "7417c190-8547-442d-aab0-b61f2c3ee381", "name": "API mock", "routes": [ { "uuid": "ba616755-e6cb-4aec-9b59-2643c347552b", "type": "http", "method": "get", "endpoint": "test", "responses": [ { "uuid": "a9ec0e58-94f9-405a-b802-60005c020dd0", "body": "hello123", ... } ], ... } ] }
Since version 9.6.0, most of the environment configuration can be updated during runtime, without restarting the mock server. The updated endpoints, WebSocket servers and proxy options will be applied immediately, and the new routes will be available for incoming requests.
However, the server port, hostname and TLS options cannot be updated during runtime and require a server restart to take effect.