GOST can use the RESTful API to interact with the GOST process by starting the Web API service.
You can also start the API service only, and then dynamically configure services and other components through the API.
The URL path prefix can be set via the
For example, the default path is http://localhost:18080/config, when
pathPrefix is set to
/api, it becomes http://localhost:18080/api/config.
accesslog property to enable the API access log. By default, no access log is output.
Authentication uses HTTP Basic Auth.
Authentication information can be set through the
auther options. If the
auther option is set, the
auth option is ignored.
The GOST program has built-in swagger API documentation. If the Web API service is enabled locally, you can also use https://gost.run/swagger-ui/?url=http://localhost:18080/docs/swagger.yaml to try to configure the local service (this assumes that the local Web API service is running on port 18080).
The default scheme in SwaggerUI is HTTPS. If you want to test local services, you need to manually switch to HTTP.