This article details instructions for two calls:
- api/webapps (listing webapps on a server, and adding a new webapp)
- api/webapps/{id} (listing details of, updating, or deleting a webapp)
Summary:
List the current web applications on the specified Entuity server, add new web applications.
URL:
http(s)://{server hostname}/api/webapps
Summary:
List details of, modify or delete a specified web application.
URL:
http(s)://{server hostname}/api/webapps/{id}
Methods summary
webapps
- GET Method - list details of all web applications.
- POST Method - add a new web application.
webapps/{id}
- GET Method - list details of a specified web application.
- POST Method - modify an a existing web application.
- DELETE Method - delete a web application.
GET Method - webapps
Lists the details of all web applications on the Entuity server.
Response:
| Name | Description |
|---|---|
| Count | number of web applications on the server. |
| Items |
llist of webapp details:
|
Examples:
INPUT
curl -u admin:admin -X GET https://localhost/api/webapps
OUTPUT
{
"items" : [ {
"id" : 711,
"name" : "Google",
"description" : "",
"url" : "https://google.com",
"zoneId" : 0,
"zoneName" : "None",
"status" : 0,
"sslPollEnabled" : true,
"expiryDate" : 1776069544,
"daysToExpire" : "38",
"perfPollEnabled" : true,
"responseRegex" : "",
"allowRedirects" : true,
"connectionTimeout" : 5000,
"responseCode" : 200,
"tlsVersion" : "TLS_1_3",
"cipherSuite" : "TLS_AES_128_GCM_SHA256",
"regexMatched" : false,
"dnsLookupTime" : 152.1651,
"connectTime" : 35.272,
"sslHandshakeTime" : 26.7955,
"redirectTime" : 141.7738,
"waitTime" : 66.4741,
"dataTransferTime" : 5.8674,
"totalRequestTime" : 428.3868,
"firstByteTime" : 422.4805,
"redirectCount" : 1,
"totalResponseSize" : 17820,
"responseSizeExceeded" : false
} ],
"count" : 1
}
INPUT
curl -u admin:admin -X GET https://localhost/api/webapps?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="1" xmlns:ns5="http://www.entuity.com/webrpc" xmlns:ns2="http://www.entuity.com/schemas/webUI" xmlns:ns4="http://www.entuity.com/schemas/eventengine" xmlns:ns3="http://www.entuity.com/schemas/flow">
<item xsi:type="ns2:webAppType" id="800" name="BBC" description="BBC News" url="https://www.bbc.com" zoneId="0" zoneName="None" status="0" sslPollEnabled="true" expiryDate="1785147977" daysToExpire="109" perfPollEnabled="true" responseRegex="" allowRedirects="true" connectionTimeout="0" responseCode="200" tlsVersion="TLS_1_3" cipherSuite="TLS_AES_128_GCM_SHA256" regexMatched="false" dnsLookupTime="0.1351" connectTime="11.7763" sslHandshakeTime="19.9391" redirectTime="0.0" waitTime="11.121" dataTransferTime="10.7435" totalRequestTime="53.715" firstByteTime="42.9715" redirectCount="0" totalResponseSize="530615" responseSizeExceeded="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</items>
POST Method - webapps
Add a new web application.
Request parameters:
| Name | Description |
|---|---|
| id | StormWorks ID of the web application. |
| name | name of the web application. Maximum of 60 characters, and can't be all numbers. |
| description | description of the web application. Maximum of 255 characters. |
| sslPollEnabled | whether SSL certificate polling is enabled. By default, the polling period is once every 5 minutes. |
| perfPollEnabled | whether performance metrics are polled. |
| responseRegex | regex that is run over the response of the performance polling request. |
| allowRedirects | whether the performance polling request attempts to follow redirects. |
| connectionTimeout | length of time, in milliseconds, before any polling request times out. |
Response:
The StormWorks ID of the newly added web application, as 'GET Method' above would return it.
Examples:
INPUT
curl -u admin:admin https://localhost/api/inventory?media=json -X POST –H "content-type:application/json" -d \
'{
"polledName" : "10.66.23.1",
"managementLevel" : "FULL",
"protocol" : "IPv4",
"snmpType" : "v2c",
"credentialId" : "1"
}'
OUTPUT
'{
"message": "Queued"
}'
GET Method - webapps/{id}
Lists details about the specified web application.
Response:
| Name | Description |
|---|---|
| id | StormWorks ID of the web application. |
| name | name of the web application. Maximum of 60 characters, and can't be all numbers. |
| description | description of the web application. Maximum of 255 characters. |
| url | URL of the web application. Must begin with http:// or https://, and can't contain any of these characters: " ", "\", "<", ">", """, "{", "}", "`", "|", "^", "," |
| zoneId | the zone to which the web application is assigned. |
| zoneNamestatus | zone name. |
| sslPollEnabled | whether SSL certificate polling is enabled. By default, the polling period is once every 5 minutes. |
| expiryDate | timestamp of the expiry of the web application's SSL certificate. |
| daysToExpire | time left until expiry of the web application's SSL certificate. |
| perfPollEnabled | whether performance metrics are polled. |
| responseRegex | regex that is run over the response of the performance polling request. |
| allowRedirects | whether the performance polling request attempts to follow redirects. |
| connectionTimeout | the length of time, in milliseconds, before any polling request times out. |
| responseCode | the HTTP response code of the final destination. Redirects can be enabled or disabled for each web application. The status of the web application is directly affected by the response code. |
| tlsVersion | the TLS version used (for example, 1.3). |
| cipherSuite | the cipher suite used (for example, TLS_AES_128_GCM_SHA256). |
| regexMatched | if the specified regex found a match in the response. If this returns as false, an event is raised. |
| dnsLookupTime | the length of time, in milliseconds, for the DNS lookup to complete. |
| connectTime | the length of time, in milliseconds, from the DNS lookup completion until the TCP connect to the remote host (or proxy) is completed, excluding the SSL handshake. |
| sslHandshakeTime | the length of time, in milliseconds, for the SSL handshake to complete. |
| redirectTime | the length of time, in milliseconds, for all redirection steps, including DNS lookup, connect, SSL handshake, and data transfer, before the final transaction was started. redirectTime shows the complete execution time for multiple redirections. |
| waitTime | the length of time, in milliseconds, for the web application to send back the first byte of data after sending the request. |
| dataTransferTime | the length of time, in milliseconds, for all the data to be received from the web application. |
| totalRequestTime | the total time, in milliseconds, that the full operation lasted. |
| firstByteTime | the length of time, in milliseconds, from the start of the request to the first byte of data received. This is a sum of all previous time intervals (Time DNS Lookup, Time Connect, Time SSL Handshake, Time Redirect, Time Wait). |
| redirectCount | the total number of redirects followed. |
| totalResponseSize | total size of the response, in Bytes. |
| responseSizeExceeded | flag to mark whether the response size was larger than the configured maximum (default 1 MB). Use configure to define the maximum response size. |
Examples:
INPUT
curl -u admin:admin -X GET https://localhost/api/webapps/711
OUTPUT
[ {
"id" : 711,
"name" : "Google",
"description" : "",
"url" : "https://google.com",
"zoneId" : 0,
"zoneName" : "None",
"status" : 0,
"sslPollEnabled" : true,
"expiryDate" : 1776069544,
"daysToExpire" : "38",
"perfPollEnabled" : true,
"responseRegex" : "",
"allowRedirects" : true,
"connectionTimeout" : 5000,
"responseCode" : 200,
"tlsVersion" : "TLS_1_3",
"cipherSuite" : "TLS_AES_128_GCM_SHA256",
"regexMatched" : false,
"dnsLookupTime" : 1.1584,
"connectTime" : 11.0693,
"sslHandshakeTime" : 24.1427,
"redirectTime" : 140.3886,
"waitTime" : 70.7631,
"dataTransferTime" : 4.8358,
"totalRequestTime" : 252.3783,
"firstByteTime" : 247.5221,
"redirectCount" : 1,
"totalResponseSize" : 17833,
"responseSizeExceeded" : false
} ]
PUT Method - webapps/{id}
Modify the details of the specified web application.
Request:
Same as the POST Method - webapps section above. Please note that all parameters must be specified as any parameters not provided in the request will return to the default value.
Response:
On success, returns the StormWorks ID of the updated web application.
Example:
INPUT
curl -u admin:admin -X POST "localhost/api/webapps/711" -H "content-type: application/json" -d '
{
"name" : "Google",
"url" : "https://google.com",
"perfPollEnabled": "false"
}'
OUTPUT
[
711
]
DELETE Method - webapps/{id}
Deletes the selected web application.
Request:
No additional parameters needed.
Response:
Returns the ID of the deleted web application that matches the provided ID and a status message.
Example:
INPUT
curl -u admin:admin -X DELETE "localhost/api/webapps/711" -H "content-type: application/json"
OUTPUT
{
"711": "Success: removed web app: '711'"
}
Comments
0 comments
Please sign in to leave a comment.