OBSOLETE - HTTP Proxy Server Exclude Hosts Configuration REST API - v2
NEW IN RELEASE 65
This REST API was deprecated in IQ Server Release 84 and removed in IQ Server Release 98. Please use HTTP Proxy Server Configuration REST API - v2 instead.
Supported HTTP methods include:
- GET - used to retrieve configuration information
- PUT - used to create and update configuration information in the IQ Server's database
Supported operations include:
- Get proxy exclude hosts
- Set proxy exclude hosts
Proxy configuration format
Item | Description |
---|---|
proxyExcludeHosts | IQ server uses the HTTP proxy as configured in Wildcards are supported. For example "*.example.com" matches "foo.example.com" and "foo.bar.example.com" etc. The use of IP addresses or subnets is not supported. |
Get proxy exclude hosts
You can get the proxy configuration by making a call to the following URL:
GET /api/v2/config/proxy
Currently, this only returns the proxy exclude hosts. Additional fields will be added in the future so please ensure that the client ignores unknown fields in the JSON response.
{ "proxyExcludeHosts": ["foo.example.com", "*.example.org"] }
You can run the follwing cURL command to make the request:
curl -u admin:admin123 'http://localhost:8070/api/v2/config/proxy'
Set proxy exclude hosts
You can create or update the proxy configuration by making a call to the following URL:
PUT /api/v2/config/proxy
The JSON payload currently only supports the proxyExcludeHosts parameter, for example:
{ "proxyExcludeHosts": ["example.com"] }
You can run the following cURL command to make the request:
curl -u admin:admin123 -X PUT -H "Content-Type: application/json" -d '{"proxyExcludeHosts":["example.com"]}' 'http://localhost:8070/api/v2/config/proxy'
If the proxy configuration was successfully created, the system will respond with the following:
{ "proxyExcludeHosts": ["example.com"] }
Precedence over config.yml
Setting the configuration using the REST API does not update the configuration in config.yml
. Instead the configuration is stored in the IQ server database. If there is a conflict then the configuration stored in the database takes precedence over the configuration stored in config.yml
. If you have created a configuration in the database and want to revert to use the configuration in config.yml
then make a call to DELETE /api/v2/config/[name] (currently not supported).