WebtoB Admin API
WebtoB provides management features through the Admin API using Rest API. A port can be specified in the /server/admin settings, and API communication is performed through that port.
The admin settings in config are configured as follows. In the following example settings, Admin API communication is possible on port 9090.
"server":{
"admin": {
"port": 9090
}
}
|
If For example, when |
The following describes the APIs provided by the Admin API.
| API | Description |
|---|---|
Displays environment configuration settings. |
|
Reloads the config file to dynamically apply settings. |
|
Displays the WebtoB system information. |
|
Retrieves information about patches applied after the release. |
|
Checks the connected web browser. |
|
Displays connection information. |
|
Checks the destination information. |
|
Retrieves statistics about the state of destinations, threads, and services. |
|
Resets statistics for the destination. |
|
Shuts down WebtoB. |
|
Displays information about responses stored in the HTTP response cache. |
|
Deletes responses stored in the HTTP response cache. |
|
Refreshes the certificate information. |
The main features of WebtoB Admin API are as follows:
-
All APIs communicate using the POST method.
-
For APIs operating on HTH, if there is no response from HTH for a certain period of time, it will be displayed as 'busy_hth' after a timeout. For example, if HTH-1 and HTH-2 do not respond within the timeout period for the /cliinfo API, the information will be displayed as 'busy_hth' as shown in the following example.
{ "result": { "HTH-0": [ { ... } ] }, "busy_hth": [ "HTH-1", "HTH-2" ] } -
If the API operates correctly, it returns HTTP response code 200, otherwise it returns an appropriate response code depending on the situation.
The following describes common error response codes.
Response Code Description 400
Failed to validate JSON schema for HTTP body.
401
User authentication failed.
403
No permission to perform actions on the requested API.
404
Requested API not found.
405
Invalid method used for the request.
500
An error occurred during API operation. (The specific error and message differ depending on the API)
-
If the response code is not 200, it is commonly structured as follows:
{ "error_code": string, "error_message": string }For example, a response code of 404 may appear as follows:
{ "error_code": "APIERR_COMMON_0003", "error_message": "No such API" }
Environment Information
/config
Retrieves the environment information of the currently running system. This process allows you to check not only the values specified in the environment settings file but also the values applied by default.
-
Usage
{ "path": string }Option Description Path
Specifies the JSON path to the environment configuration file. The path must always start with '/'.
If the path is omitted or set to '/', all currently configured settings will be retrieved. -
Example
The following is an example of checking the NODE section environment settings with the "/config" Admin API. For detailed information of the configuration items in the NODE section, refer to Configuration Items.
[Request] { "path": "/node" } [Response] { "result": { "cache_entry": 128, "cache_key": "HOST_URI", "cache_max_file_size": 8192, "connection_pool_size": 8192, "graceful_shutdown_timeout": 5, "hth_count": 1, "hth_schedule": "RR", "limit_request_body_size": 0, "limit_request_header_field_count": 100, "limit_request_header_field_size": 8190, "limit_request_line_size": 8190, "listen_backlog": 4096, "max_cache_memory_size": 100, "name": "webtob-server", "system_filters": [], "worker_threads": 1 } }
/updateconfig
Reloads the configuration file and apply the settings dynamically. Only settings specified with the '|dynamic|' key in the schema file are applied.
-
Usage
This API does not require any separate parameters.
-
Example
The following is an example of updating the settings using the "/updateconfig" Admin API after modifying the config file.
[Request] { } [Response] { }
/webtobinfo
Displays general information about the currently running WebtoB.
-
Usage
This API does not require any separate parameters.
-
Example
The following is an example of checking information about the currently running WebtoB using the "/webtobinfo" Admin API.
[Request] {} [Response] { "result": { "license_type": "CLOUD Enterprise edition", "expiration_date": "2099/12/31", "hth_count": 1, "worker_thread_count": 1 } }
/patchinfo
Retrieves patch information applied after the release.
-
Usage
{ "patch_version": string }Option Description patch_version
Path version name or version number.
If omitted, all changes made after the release will be retrieved.
-
Example
The following is an example of checking patch information for version B18 using the "/patchinfo" Admin API.
[Request] { "patch_version": "6.0_B18" } [Response] { "result": [ "WebtoB 6 Linux B19 epoll 2025.04.07", { "* 6_B18 (2025.03.31)": [ "Added the PatchInfo command", "Changed the location of wscfl (bin->lib)", "Fixed an issue where METHOD was not migrated when the ACCESS section is missing in the .m file", "Fixed an issue where the license was read from an iccorect path", "Modified wsreboot.sh to run outside the bin directory" ] } ] }
Operational Status Information
/cliinfo
Displays the environment settings, such as the current status, IP address, number of processed requests, of the currently connected client (usually a web browser).
-
Usage
{ "http_server": string, "virtual_host": string, "hth_number": integer }Option Description None
Retrieves information about all clients connected to the server.
http_server
Retrieves information about clients connected to the specified HTTP server.
virtual_host
Retrieves information about the clients connected to the specified virtual host. This option can only be set if http_server is set, and the value must be a virtual host name included in the http_server.
hth_number
Retrieves information about clients connected to the specified HTH. If not specified, information for all HTHs will be retrieved.
-
Example
The following is an example of checking the client information connected to the vhost1 virtual host in HTH 3 using the "/cliinfo" Admin API.
[Request] { "http_server": "http1", "virtual_host": "vhost1", "hth_number": 3 } [Response] { "result": { "HTH-3": [ { "no": 1, "idle": 24, "local_ipaddr:port": "192.168.15.167:8080", "remote_ipaddr:port": "192.168.15.168:48006", "request_count": 0, "response_count": 0, "ssl": false, "status": "READY", "http_server": "http1", "virtual_host": "vhost1" }, { "no": 0, "idle": 24, "local_ipaddr:port": "192.168.15.167:8080", "remote_ipaddr:port": "192.168.15.168:48005", "request_count": 2, "response_count": 2, "ssl": false, "status": "READY", "http_server": "http1", "virtual_host": "vhost1" } ] } }The following describes each output item.
Item Description no
The connection number managed internally by WebtoB.
idle
Client idle time with no data exchanges.
local_ipaddr:port,
remote_ipaddr:portIP address and port number of the server and client.
request_count
The number of requests sent by the client.
response_count
The number of responses sent to the client.
ssl
Specifies whether the client is using an SSL connection.
status
Client state within the server.
-
CONNECTING: Trying to connect.
-
CONNECTED: Connection established.
-
READY: Receiving requests from the client.
-
RUNNING: A client request is being processed on the server.
-
DISCONNECTING: Attempting to terminate the connection.
-
DISCONNECTED: Connection terminated.
http_server
The HTTP server that the client connected to.
virtual_host
The last virtual host accessed by the client.
-
/connectioninfo
Displays the environment settings, such as the current status, IP address, number of processed requests, of the currently connected client (usually a web browser) and server.
-
Usage
{ "hth_number": integer }Option Description None
Retrieves information about all clients connected to WebtoB.
hth_number
Retrieves information about clients and servers connected to the specified HTH. If not specified, information for all HTHs is retrieved.
-
Example
The following is an example of checking the client and server information connected to HTH 3 using the "/connectioninfo" Admin API.
[Request] { "hth_number": 3 } [Response] { "result": { "HTH-3": [ { "acceptor": "WJP-0", "request_count": 1, "response_count": 1, "counterpart": "", "idle": 3, "local_ipaddr:port": "127.0.0.1:9999", "no": 0, "remote_ipaddr:port": "127.0.0.1:44866", "remote_type": "JSV", "ssl": false, "status": "READY", "virtual_host": "" }, { "acceptor": "http1", "request_count": 2, "response_count": 2, "counterpart": "", "idle": 2, "local_ipaddr:port": "192.168.15.167:8080", "no": 10, "remote_ipaddr:port": "192.168.15.168:64223", "remote_type": "CLIENT", "ssl": false, "status": "READY", "virtual_host": "" }, { "acceptor": "", "request_count": 1, "response_count": 1, "counterpart": "", "idle": 2, "local_ipaddr:port": "192.168.15.167:60504", "no": 11, "remote_ipaddr:port": "192.168.15.124:8080", "remote_type": "RPROXY", "ssl": false, "status": "READY", "virtual_host": "" } ] } }The following describes each output item.
Item Description no
The connection number managed internally by WebtoB.
idle
Idle time with no data exchanges.
local_ipaddr:port,
remote_ipaddr:portIP address and port number of the server and client.
request_count
The number of requests sent through this connection.
response_count
The number of responses sent through this connection.
ssl
Specifies whether the connection is established using SSL.
status
Client state within the server.
-
CONNECTING: Trying to connect.
-
CONNECTED: Connection established.
-
READY: Receiving requests from the client.
-
RUNNING: A client request is being processed on the server.
-
DISCONNECTING: Attempting to terminate the connection.
-
DISCONNECTED: Connection terminated.
acceptor
The server that this connection is connected to.
virtual_host
The last virtual host accessed by this connection. (Applies only to clients)
counterpart
The number of the counterpart to this connection. If the current connection is a client, the counterpart refers to a server connection, and vice versa. For queued WJP connection, it may be displayed as -1.
-
/svginfo
Displays information about each destination that is currently in operation.
-
Usage
{ "htmls": boolean, "jeus" : array(string), "rproxy" : array(string) }Option Description None
Displays information about all destinations.
html
Sets whether to display HTMLS destination information.
jeus
Specifies the JEUS destination name. Including "*" displays information for all JEUS destinations.
rproxy
Specifies the reverse proxy group destination name. Including "*" displays information for all reverse proxy group destinations.
-
Example
The following is an example of checking information for all JEUS destinations and the reverse proxy group destination named "rproxy1" using the "/svginfo" Admin API.
[Request] { "jeus" : [*], "rproxy" : ["rproxy1"] } [Response] "result": [ { "HTH-0": { "jeus": [ { "aqcnt": 0, "count": 0, "cqcnt": 0, "qpcnt": 0, "reqs": 0, "rscnt": 0, "status": "NRDY", "svgname": "MyGroup2" }, { "aqcnt": 0, "count": 0, "cqcnt": 0, "qpcnt": 0, "reqs": 0, "rscnt": 0, "status": "NRDY", "svgname": "MyGroup1" } ], "rproxy": [ { "aqcnt": 0, "count": 0, "cqcnt": 0, "qpcnt": 0, "reqs": 0, "rscnt": 0, "status": "RDY", "svgname": "rproxy1" } ] } } ]The following describes each output item.
Item Description aqcnt
Cumulative number of queued requests. (Cumulative cqcnt value)
count
Number of processed requests.
cqcnt
Number of requests in the queue.
qpcnt
Number of queued requests that have been removed from the queue due to request timeout, qp command, etc.
reqs
Number of requests sent to the destination.
rscnt
Number of server restarts due to abnormal termination of the destination.
status
Client state within the destination.
-
RDY: Request can be processed by the destination. There are destination processes connected to WebtoB.
-
NRDY: Request cannot be processed. There are no destination processes connected to WebtoB.
-
BLK: The destination is suspended by administrator command. Request cannot be processed.
svgname
Destination name specified in configuration.
-
/statinfo
Displays actual system operational status and retrieves information about the destination processes and services statistics currently in operation.
You can check dynamic information for each destination, such as the number of services processed and the number of connections.
-
Usage
{ "hth_number" : integer, "target":{ "jeus": array(string), "rproxy" : array(string), "htmls": boolean } }Option Description hth_number
Specifies the HTH number for which to check statistics.
target/jeus
Specifies the JEUS destination for which statistical information is displayed. If "*" is included, information for all JEUS destinations is displayed.
target/rproxy
Specifies the reverse proxy destination for which statistical information is displayed. If '*' is included, information for all reverse proxy destination is displayed.
target/htmls
Specifies whether to display HTMLS statistical information.
At least one item must be specified under 'target'.
-
Example
The following is an example of checking information for the JEUS destination named "MyGroup1", the destination within the reverse proxy group named "rproxy1", and the HTMLS destination using the "/statinfo" Admin API.
[Request] { "hth_number" : 1, "target":{ "jeus": ["MyGroup1"], "rproxy" : ["rproxy1"], "htmls": true } } [Response] { "result": { "HTH-0": { "jeus": [ { "average_processed_time": 0.0, "connections": 50, "request_count": 0, "response_count": 0, "server": "amV1c19kb21haW4vc2VydmVyMQ==", "server_group": "MyGroup1", "sticky_routed_count": 0 } ], "rproxy": [ { "average_processed_time": 0.0, "connections": 0, "request_count": 0, "response_count": 0, "server": "192.168.15.167:8090", "server_group": "rproxy1", "sticky_routed_count": 0 }, { "average_processed_time": 0.0, "connections": 0, "request_count": 0, "response_count": 0, "server": "192.168.15.167:8088", "server_group": "rproxy1", "sticky_routed_count": 0 } ], "htmls": { "average_processed_time": 0.000309519, "queue_count": 0, "request_count": 5, "response_count": 5, "server": "HTMLS" } } } }The following describes each output item.
Item Description average_processed_time
The average processing time per request. (Unit: seconds)
connections
The number of connections linked to the destination.
request_count
The number of requests sent to the destination.
response_count
The number of requests processed by the destination.
server
Destination identification information
-
jeus: jengineid
-
Reverse proxy: Target destination address
-
HTMLS: HTMLS (fixed)
server_group
The destination name
sticky_routed_count
The number of times the request was routed to the destination based on the Sticky ID received from the client.
-
/restat
Resets statistical information for the destination. Use this command to reset the information for the associated services or destinations.
-
Usage
{ "hth_number" : integer, "target":{ "jeus": array(string), "rproxy" : array(string), "htmls": boolean } }Option Description None
Resets all HTHs.
hth_number
Specifies the HTH number to reset. If not set, all HTHs are reset.
target
Specifies the target to reset. At least one target must be specified.
target/jeus
Specifies the JEUS destinations to reset. If '*' is included, all JEUS destinations are reset.
target/rproxy
Specifies the reverse proxy destinations to reset. If '*' is included, all reverse proxy destinations are reset.
target/htmls
Specifies whether to reset HTMLS statistics.
-
Example
The following is an example of resetting statistics for the JEUS destination named "MyGroup1".
[Request] { "target": { "jeus": ["MyGroup1"] } } [Response] "HTH-0": { "jeus": [ "MyGroup1" ] }Returns the names of the targets that were successfully reset for each HTH.
Process Shutdown
/shutdown
Shuts down the running WebtoB.
-
Usage
{ "timeout": integer }Option Description "timeout"
Specifies the timeout for the graceful shutdown process in seconds. If WebtoB does not shut down within the specified time, it will be forcibly terminated.
If omitted, the value set in /node/graceful_shutdown_timeout is applied. -
Example
The following is an example of calling the "/shutdown" Admin API to forcibly terminate WebtoB if it hasn’t shut down after attempting a graceful shutdown for 30 seconds.
[Request] { "timeout": 30 } [Response] { "result": {} }The response is returned immediately after WebtoB receives the command. However, the WebtoB process may still be running even after the response is received.
Cache Information Management
/cachelist
Displays the response information currently stored in WebtoB’s HTTP response cache.
-
Usage
{ "hth_number": integer }Option Description None
Displays all cache information.
"hth_number"
Specifies the HTH number to query cache information.
-
Example
The following is an example of checking cache information for HTH 0 using the "/cachelist" Admin API. The rest of the request path is used only for internal server debugging.
[Request] { "hth_number": 0 } [Response] "result": { "HTH-0": { "cache_map": [ { "expire_time": "2023-10-25 16:35:18", "key": "192.168.15.167:8080/index.html", "size": 4312 }, { "expire_time": "2023-10-25 16:34:52", "key": "192.168.15.167:8080/favicon.ico", "size": 4507 }, { "expire_time": "2023-10-25 16:34:52", "key": "192.168.15.167:8080/4.html", "size": 219 } ], "cache_map_size": 3, "memory_usage": 9038 } }The following describes each output item.
Item Description cache_map
Returns a key (URI) and related information managed in the cache.
cache_map/expire_time
The expiration time of the item.
cache_map/key
The URI of the item.
cache_map/size
The total size of the cache item.
cache_map_size
The number of cache items currently managed in the cache.
memory_usage
The total amount of memory used by the cache item content. (Unit: bytes).
/cacherefresh
Removes the response data from the WebtoB HTTP response cache.
-
Usage
{ "url": string, "ext": string }Option Description None
Clears the entire cache.
url
Specifies the URL of the cache to be removed.
ext
Specifies the extension of the cache to be removed.
Only one of url or ext can be specified.
The following is an example of removing the response for "test.domain.com/test.html" from the cache using the "/cacherefresh" Admin API.
[Request] { "url": "test.domain.com/test.html" } [Response] "result": { "HTH-0": { "removed_count": 1 } }The following describes each output item.
Item Description removed_count
The number of cache items that were removed.