EdgeView allows users to use its APIs, allowing for easy third party application integration. The following APIs are available for use:
- Collection: For accessing collections.
- Device: For accessing device information.
- Policy: For accessing a specific policy.
- Report: For accessing the Report API.
This section describes how to use EdgeView APIs.
Use EdgeView APIs
To use an EdgeView API, perform the following steps:
From the EdgeView menu bar, click the Menu icon on the top-right corner and select Edit Profile. The User Profile page appears.
Go to the Access Token tab and create an access token. For more information on managing access tokens, see Manage EdgeView Access Tokens.
Use the generated token in REST API calls as a bearer token for authorization. To test this, click the Menu icon on the top-right corner and select References > EdgeView API.
You are taken to the updated EdgeView API documentation.
You can try out any of the APIs listed here, by selecting the desired API and entering the required information along with the access token. For more information on how to try out the available APIs, refer to Use EdgeView Access Tokens.
To access a printable version of the EdgeView API documentation, execute the following command in EdgeView installation scc-build directory:
docker cp evapi:/usr/local/tomcat/webapps/evapi/WEB-INF/classes/index.html.
This command results in an index HTML file with the printable version of EdgeView API documentation in it.
EdgeView API Mapping to EdgeMarc Configuration Parameters
The following table lists the EdgeView API inputs and their corresponding EdgeMarc configuration parameters:
REST Proxy API
The following API is added to EV-API to call an SBC Edge 11.0 REST API via the REST Proxy:
Modified: for 16.2.2
Method | Endpoint | Description | Required Role(s)/Permission(s) |
---|---|---|---|
GET, POST, PUT, DELETE | /evapi/v1/proxy/node/{deviceId}/<SBC Edge REST API> | proxy: an SBC Edge REST API {deviceld}: the mac address of the device | tenantadmin/ztp |
The following example shows the usage of the SBC Edge REST API:
// For example, to perform system backup of a SBC Edge instance curl -k -o backup.tar -H "Authorization: Bearer <EV-API token> " "https://<EdgeVieww ipaddress>/evapi/v1/proxy/node/<macaddr (1k/2k0 or management ID (SBC Edge CNE>/rest/system?action=backup" --header 'Content-Type: application/x-www-form-urlencoded' -d "Passphrase=dummy" //get the list of alarms curl -k -H "Authorization: Bearer 03581470-2674-4a6d-939a-6b8f3ae011dd" --request GET 'https://10.10.94.70/evapi/v1/proxy/node/54:39:68:a0:00:00:02:c1/rest/activealarm' // get alarm details curl -k -H "Authorization: Bearer 03581470-2674-4a6d-939a-6b8f3ae011dd" --request GET --url 'https://10.10.94.70/evapi/v1/proxy/node/54:39:68:a0:00:00:02:c1/rest/activealarm/35' // ack an alarm // ** NOTE the data part -d "smoethext=somethext" is required as discovered by Kim during our initial testing of the rest api.It throws an error if this -d "dummy data" is absent. curl -k -H "Authorization: Bearer 03581470-2674-4a6d-939a-6b8f3ae011dd" --request POST --url 'https://10.10.94.70/evapi/v1/proxy/node/54:39:68:a0:00:00:02:c1/rest/activealarm/35?action=ack' -d "Passphdddadfasdfadfarase=dumadfadsfasdfmy" // when evuser is not a tenantadmin or ztp user: curl -k -H "Authorization: Bearer 34a05ccf-9657-414c-91f3-5886613dd2bc" --request GET --url 'https://10.10.94.70/evapi/v1/proxy/node/54:39:68:a0:00:00:02:c1/rest/activealarm/35' {"request":"http://10.10.94.70/evapi/v1/proxy/node/54:39:68:a0:00:00:02:c1/rest/activealarm/35", "message":"Field = FORBIDDEN, ErrorMessage = User is not authorized to perform proxy calls."}