Get website details
Obtains configuration details for a given website.
URL
/api/v1/website/[website_id]
HTTP Method
GET
URL Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| website_id | true | integer | Specifies the website ID to return detail for. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| mode | string containing integer |
The proxy mode of the website "0" → Pass Mode "1" → Protect Mode "3" → Detect Mode |
| status | string containing integer |
The status of the website "0" → Disabled "1" → Enabled |
| name | string | Proxy name |
| rhost | array of rhost_details | Details about the ip address(es)/hostname(s) of the protected web-server(s) |
| bind | array of strings containing ip or "*" | The listen IP (corresponds with "ip" above) |
| mirror_of | string containing integer | Indicates which Proxy ID that the Policy is mirrored from. A value of "0" indicates no mirroring is enabled. |
| sec | policy_ details | Details regarding security settings |
| vhost | vhost_details | Details about the Virtual Web Server |
| deployment | string containing integer |
The Deployment Mode "1" → Reverse Proxy "2" → Routing Proxy |
| id | string containing integer | Proxy ID |
rhost_details
| Index | Parameter | Type | Description |
|---|---|---|---|
| 0 | rhost_proto | string | The protocol used when reaching the protected web-server |
| 1 | rhost | string containing IP address or hostname | The IP address or hostname of the web-server to proxy traffic to |
| 2 | rhost_port | string containing integer | The port to use when reaching the protected web-server |
| 3 | rhost_role | string containing integer |
The role of the protected web-server "1" → Active "2" → Backup "3" → Down |
| 4 | rhost_status | string containing integer |
The status of the protected web-server "0" → ERROR "1" → OK |
| 5 | rhost_alt_port | string containing integer | The alternate port to use when reaching the protected web-server |
policy_details
| Parameter | Type | Description |
|---|---|---|
| ts | string containing integer |
The tuning status of the proxy "0" → Working "1" → Tuned |
vhost_details
| Parameter | Type | Description |
|---|---|---|
| proto | string | The protocol of the Virtual Web Server |
| port2 | string containing integer | The HTTP listen port of the Virtual Web Server when proto is set to "both" |
| as | -- | Deprecated |
| proxy_protocol_enabled | string containing integer |
Indicates whether proxy protocol is enabled |
| name | string |
The name of the Virtual Web Server |
| port | string containing integer | The primary listen port of the Virtual Web Server. Represents the HTTPS listen port when proto is set to "both" |
Example: Get website details for website 1
Request
/api/v1/website/1
curl -kv
-u api_ninja:ninja_password
-X GET
https://172.31.1.172:4849/api/v1/website/1
The cURL request has been formatted to improve readability.
Response
{
"bind": [
"*"
],
"deployment": "1",
"id": "1",
"mirror_of": "0",
"mode": "3",
"name": "example",
"rhost": [
[
"http",
"1.2.3.4",
"80",
"1",
"1",
"443"
],
[
"http",
"2.3.4.5",
"80",
"2",
"1",
"443"
],
[
"http",
"3.4.5.6",
"80",
"3",
"1",
"443"
]
],
"sec": {
"ts": "0"
},
"status": "1",
"vhost": {
"as": "",
"name": "example.rhostroles.com",
"port": "80",
"port2": "",
"proto": "http",
"proxy_protocol_enabled": "1"
}
}