AppViz REST web services
Base URL
The base URL for all REST requests is the following:
https://<algosec_server>/BusinessFlow/rest/v1
where <algosec_server> is the AppViz server URL.
Some of the requests provided in this API are restricted for users with specific permissions. For details, see AppViz Permissions .
Note: Every request must be in JSON format. Each request must include the content-type header with the value application/json.
Header requirements in AppViz
The header requirement for all REST requests is:
Header requirements:
Key | Value |
---|---|
Cookie | JSESSIONID=<jsessionid>. <jsessionid> is the session ID provided in the response body of the login method. See Logging In . |
Authentication is through a cookie session. For example:
curl -X GET --cookie “JSESSIONID=<jsessionid>” "https://192.168.11.23/BusinessFlow/rest/v1/applications/?page_number=1" -H "accept: application/json;charset=utf-8"
Python
import requests, json
from requests.auth import HTTPBasicAuth
import pprint
#ASMS setup
asms_ip = '172.16.73.101'
asms_name = 'jason'
asms_pwd = 'doe'
# Compute Base URL & URLS we might use
base_url = "https://%s/BusinessFlow/rest/v1" % asms_ip
cookie = ''
pp = pprint.PrettyPrinter(indent=2)
# Login
login_url = base_url + "/login"
login = requests.post(login_url, auth=HTTPBasicAuth(asms_name, asms_pwd), verify=False)
# Save cookie for quick Authent
cookie = {"JSESSIONID": dict(login.json())['jsessionid']}
url_applications = base_url + "/applications/"
applications = requests.get(url_applications, cookies=cookie, verify=False)
pp.pprint(applications.json())
Swagger
The AppViz RESTful API includes Swagger support, enabling you to execute simplified API request calls and access full lists of request parameters.
To access Swagger API documentation:
- In the toolbar, click your username and click API Documentation.
-
From the dropdown at the top-right, click AlgoSec_AppViz.
AppViz REST API reference
AppViz supports the following REST APIs:
- Logging In
- Logging Out
- /applications
- /network_objects
- /network_services
- /settings/permissions
- Import vulnerability data
- Run a Risk Check
â See also: