Request Redirect
Proxies an FCGi request to another device on the network. The routing parameters are passed in the query string; the request body is forwarded as-is to the target endpoint, and the response is relayed back to the caller.
Useful in multi-device deployments where a central device must issue commands to peers on behalf of a client.
POST /request_redirect.fcgi
Parameters (query string)
- command (string): Required. Name of the FCGi endpoint to execute on the target device, without the
.fcgisuffix. Example:"load_all".
Target device identification — one of two modes:
Mode 1 — by device ID (device must exist in the local device table):
- device_id (int): Required. ID of the target device. Cannot be the current device's own ID.
Mode 2 — by address (direct IP with credentials):
- address (string): Required. IP address of the target device. Cannot be the current device's own IP.
- login (string): Required. Login credential for the target device.
- password (string): Required. Password for the target device.
Any additional query string parameters (other than the routing fields above) are forwarded to the target endpoint.
Body
- Forwarded as-is to the target endpoint. Content type is preserved.
Response
- Response proxied from the target device. Content type is preserved.
Request example — redirect by device ID
$.ajax({
url: "/request_redirect.fcgi?session=" + session + "&command=load_all&device_id=2",
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({})
});
Request example — redirect by address
$.ajax({
url: "/request_redirect.fcgi?session=" + session + "&command=load_all&address=192.168.0.10&login=admin&password=admin",
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({})
});