Http Reverse proxy API Reference¶
The hosting.rproxy API methods are used to manage http reverse proxy
instances.
Methods¶
-
hosting.rproxy.count(apikey[, opts=nil])¶ Count reverse proxies.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: int – number of reverse proxies found
-
hosting.rproxy.create(apikey, params)¶ Create a reverse proxy.
New in version 3.3.7.
New in version 3.3.35: opened datacenter constraint
Parameters: - apikey (string) – API connection key
- params (struct) –
Reverse proxy creation parameters
Returns: list of struct –
Operationrproxy_iaas_createand possibly a
-
hosting.rproxy.delete(apikey, rproxy)¶ Delete a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – The reverse proxy id
Returns: struct –
Operationrproxy_iaas_delete
-
hosting.rproxy.info(apikey, rproxy)¶ Get reverse proxy information.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – The reverse proxy id
Returns: struct –
Reverse proxy description
-
hosting.rproxy.list(apikey[, opts=nil])¶ List reverse proxies.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: struct –
list of reverse proxies description
-
hosting.rproxy.update(apikey, rproxy, params)¶ Update a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – The reverse proxy id
- params (struct) –
Reverse proxy update parameters
Returns: struct –
Operationrproxy_iaas_update
-
hosting.rproxy.server.count(apikey[, opts=nil])¶ Count reverse proxy servers.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: int – Number of servers
-
hosting.rproxy.server.create(apikey, rproxy, params)¶ Create a server for a reverse proxy.
New in version 3.3.7.
Note
The server will be declared in the instance rproxy_id
Parameters: - apikey (string) – API connection key
- rproxy (struct) – the reverse proxy id
- params (struct) –
Parameters
Returns: struct –
Operationrproxy_server_create
-
hosting.rproxy.server.delete(apikey, server)¶ Delete a server of a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- server (int) – the server id
Returns: struct –
Operationrproxy_server_delete
-
hosting.rproxy.server.disable(apikey, server)¶ Disable a server.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- server (int) – the server id
Returns: struct –
Operationrproxy_server_update
-
hosting.rproxy.server.enable(apikey, server)¶ Enable a server.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- server (int) – the server id
Returns: struct –
Operationrproxy_server_update
-
hosting.rproxy.server.list(apikey[, opts=nil])¶ List reverse proxy servers.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: struct –
servers information
-
hosting.rproxy.vhost.alter_zone(apikey, vhost, params)¶ Create a record in the domain zone for this virtual host.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- vhost (string) – FQDN of the virtual host
- params (struct) –
Zone alter parameters
Returns: struct –
Operationrproxy_iaas_zone_alter
-
hosting.rproxy.vhost.count(apikey[, opts=nil])¶ Count virtual hosts related to reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: int – Number of virtual hosts
-
hosting.rproxy.vhost.create(apikey, rproxy, params)¶ Create a virtual host.
New in version 3.3.7.
Note
The virtual host will be declared in the instance rproxy_id
Warning
If you are not using Gandi DNS, a DNS record must be created for this host name separately. see rproxy-dns-check for more information.
Parameters: - apikey (string) – API connection key
- rproxy (struct) – the reverse proxy id
- params (struct) –
FQDN of the virtual host
Returns: list of struct –
Operationrproxy_vhost_createand possibly a
-
hosting.rproxy.vhost.delete(apikey, vhost)¶ Delete a virtual host.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- vhost (string) – FQDN of the virtual host
Returns: struct –
Operationrproxy_host_delete
-
hosting.rproxy.vhost.get_dns_entries(apikey, params)¶ Get the keys you need to put in your zone (including the TXT record). If vhost is a domain name, you have to put @=key. Otherwise, you have to put subdomain=key.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- params (struct) –
Parameters to retrieve related dns entries
Returns: struct – Information on the dns entries you need to add
-
hosting.rproxy.vhost.info(apikey, vhost)¶ Get virtual host information.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- vhost (string) – FQDN of the virtual host
Returns: struct –
Virtual host information
-
hosting.rproxy.vhost.list(apikey[, opts=nil])¶ List virtual hosts related to reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- opts (struct) –
Filtering options
Returns: struct –
Virtual host information
-
hosting.rproxy.probe.check_server(apikey, server)¶ Test the current probe on a server.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- server (int) – The server id
Returns: struct –
result of probe on server
-
hosting.rproxy.probe.disable(apikey, rproxy)¶ Disable probe for a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – The reverse proxy id
Returns: struct –
Operationrproxy_iaas_update
-
hosting.rproxy.probe.enable(apikey, rproxy)¶ Enable probe for a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – The reverse proxy id
Returns: struct –
Operationrproxy_iaas_update
-
hosting.rproxy.probe.test(apikey, rproxy, params)¶ Test a given probe on all active servers of a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – The reverse proxy id
- params (struct) –
Probe description
Returns: struct –
Result of test done
-
hosting.rproxy.probe.update(apikey, rproxy, params)¶ Update probe definition for a reverse proxy.
New in version 3.3.7.
Parameters: - apikey (string) – API connection key
- rproxy (int) – reverse proxy id
- params (struct) –
Probe description
Returns: struct –
Operationrproxy_iaas_update
Parameters¶
LbAlgorithm¶used by
LbDescription
Name Description round-robin basic round robin load balancing client-ip load balancing using client ip address
LbDescription¶used by
RproxyCreateandRproxyUpdate
Name Default Type Mandatory algorithmround-robin string no
RproxyCreate¶parameter of
hosting.rproxy.create()
Name Default Type Mandatory datacenter_idint yes idof thedatacenterof the instancename string yes name of the reverse proxy lbstruct no Load balancing parameters override False boolean no Define the behaviour when a DNS record already exists ( zone_altermust also be set)probestruct no probe parameters serversarray of struct no initial servers to use ssl_enable boolean no Enable SSL support vhostsarray of string no initial virtual hosts to manage zone_alter False boolean no Define if the PaaS backend should modify the domain’s zone to add virtual hosts (you must have permissions on the domain)
RproxyId¶parameter of
hosting.rproxy.delete(),hosting.rproxy.info(),hosting.rproxy.probe.disable(),hosting.rproxy.probe.enable(),hosting.rproxy.probe.test(),hosting.rproxy.probe.update(),hosting.rproxy.server.create(),hosting.rproxy.update()andhosting.rproxy.vhost.create()used by
RproxyVhostListOptionsandServerListOptions
RproxyListOptions¶parameter of
hosting.rproxy.count()andhosting.rproxy.list()
Name Default Type Mandatory <date_created string no >date_created string no items_per_page 100 int no number of items returned for the pagination name string no page 0 int no page number for pagination offset sort_by string no used to sort returned items: name, vhost vhost array of string or string no ~name string no
RproxyProbeCreateDescription¶used by
RproxyCreate
Name Default Type Mandatory enable False boolean no enable or disable the probe host 127.0.0.1 string no virtual host to test interval 10 int no probe interval in seconds methodOPTIONS string no HTTP method for probe response 200 int no HTTP response expected threshold 3 int no number of probes to consider in the window timeout 5 int no probe timeout in seconds url string no probe url on the virtual host window 5 int no total number of probes to consider for health decisions
RproxyUpdate¶parameter of
hosting.rproxy.update()
Name Default Type Mandatory lbstruct no load balancing parameter name string no name of the reverse proxy ssl_enable boolean no enable or disable of ssl
RproxyState¶used by
RproxyVhostListOptionsandServerListOptions
Name Description running rproxy is alive and running being_created rproxy does not exist yet locked rproxy is paused by Gandi for a legal reason deleted rproxy is deleted paused rproxy is alive but not running
ServerCreate¶parameter of
hosting.rproxy.server.create()
Name Default Type Mandatory ip string yes Ip (v4 or v6) address for the server port int yes Tcp port for the server fallback boolean no
ServerListOptions¶parameter of
hosting.rproxy.server.count()andhosting.rproxy.server.list()
Name Default Type Mandatory id int or array of int no ip string no items_per_page 100 int no number of items returned for the pagination page 0 int no page number for pagination offset port int no rproxy_id int no sort_by string no used to sort returned items: id, ip, port, rproxy_id, state statestring no
RproxyDnsEntry¶parameter of
hosting.rproxy.vhost.get_dns_entries()
Name Default Type Mandatory datacenterint yes idof thedatacenterwhere this virtual host will be locatedvhost string yes virtual host name
RproxyVhostAlterZone¶parameter of
hosting.rproxy.vhost.alter_zone()
Name Default Type Mandatory override False boolean no
RproxyVhostCreate¶parameter of
hosting.rproxy.vhost.create()
Name Default Type Mandatory vhost string yes the vhost fqdn override False boolean no Define the behaviour when a DNS record already exists ( zone_altermust also be set)with_ssl boolean no add a free ssl generation to the newly created vhost zone_alter False boolean no Define if the PaaS backend should modify the domain’s zone to add virtual hosts (you must have permissions on the domain)
RproxyVhostListOptions¶parameter of
hosting.rproxy.vhost.count()andhosting.rproxy.vhost.list()
Name Default Type Mandatory id int or array of int no items_per_page 100 int no number of items returned for the pagination name string no page 0 int no page number for pagination offset rproxy_id int no sort_by string no used to sort returned items: id, name, rproxy_id, state statestring no ~name string no
HttpVerb¶used by
RproxyProbeCreateDescription,RproxyProbeDescriptionandRproxyProbeUpdateDescription
Name Description GET - POST - PUT - DELETE - OPTIONS -
RproxyProbeDescription¶parameter of
hosting.rproxy.probe.test()Changed in version 3.3.8: key
enableis deprecated and will be removed in the next major release.
.
Name Default Type Mandatory enable boolean no useless parameter host string no interval int no methodstring no response int no threshold int no timeout int no url string no window int no
RproxyProbeUpdateDescription¶parameter of
hosting.rproxy.probe.update()
Name Default Type Mandatory enable boolean no enable or disable the probe host string no virtual host to test interval int no probe interval in seconds methodstring no HTTP method for probe response int no HTTP response expected threshold int no number of probes to consider in the window timeout int no probe timeout in seconds url string no probe url on the virtual host window int no total number of probes to consider for health decisions
Returns¶
RproxyReturn¶returned by
hosting.rproxy.info()andhosting.rproxy.list()
Name Type datacenterstruct only returned with method hosting.rproxy.info()datacenter_id int idof thedatacenterof the reverse proxyonly returned with method hosting.rproxy.list()date_created dateTime.iso8601 entity_id string id int reverse proxy unique identifier lb string only returned with method hosting.rproxy.info()name string name of the reverse proxy probe string serversarray of struct ssl_enable boolean state string state of the reverse proxy uuid int technical uuid of this reverse proxy vhostsarray of struct
RproxyServerReturn¶returned by
hosting.rproxy.server.list()used by
RproxyReturn
Name Type id int server unique identifier ip string server ip address port int server tcp port rproxy_id int id of related reverse proxy state string server state
RproxyVhostReturn¶returned by
hosting.rproxy.vhost.info()andhosting.rproxy.vhost.list()used by
RproxyReturn
Name Type cert_id string related hosted certificate id id int virtual host unique identifier name string virtual host name rproxy_id int id of related reverse proxy state string virtual host state
ProbeTestGlobalReturn¶returned by
hosting.rproxy.probe.test()
Name Type serversarray of struct all tested servers status int global status of probe testing timeout double estimated minimum timeout in seconds
ProbeTestReturn¶returned by
hosting.rproxy.probe.check_server()used by
ProbeTestGlobalReturn
Name Type status int status of probe on this server timeout double estimated minimum timeout in seconds