2.3 Device APIs

2.3.1 Get Device Health

This API returns the health of Access Manager devices (Identity Servers and Access Gateways). The API returns the health for the following levels:

  • Entire Access Manager

  • Each cluster

  • Each device

  • Each service and component (remote web servers, data stores, and so forth)

You can use this API for integration with external systems, such as NOC to view the status of Access Manager devices and the remote web servers.

Sample Request

Invoke a URL similar to https://192.168.0.0:8443/amsvc/v1/health?expand=4

The expand parameter specifies the level of detail that is returned. Accepted values are 1,2,3, and 4. 4 returns the maximum detail for all devices.

Sample Response
<amService xmlns="urn:novell:schema:am:service">
<health status="noReport" uri="https://192.168.0.0:8443/amsvc/v1/health">
<idpClusterHealthList status="Green" total="1">
<clusterHealth status="Green" uri="https://192.168.0.0:8443/amsvc/v1/idpclusters/SCC7c9nsp/health">
<instanceID>SCC7c9nsp</instanceID>
<displayName>IDPCluster</displayName>
<deviceHealthList total="1">
<deviceHealth status="Green"
uri="https://192.168.0.0:8443/amsvc/v1/idpclusters/SCC7c9nsp/devices/idp-CC1B3FFB0BC40AD8/health">
<instanceID>idp-CC1B3FFB0BC40AD8</instanceID>
<displayName>192.168.0.6</displayName>
<serviceHealthList total="5">
<serviceHealth status="Passed">
<serviceName>Config Datastore</serviceName>
<message>Operating properly</message>
</serviceHealth>
...

NOTE:This API returns the health information saved in Administration Console. This data is refreshed every five minutes. Therefore, it is sufficient to invoke this API every 5 minutes to get the latest health.

2.3.2 Get Device Statistics

This API returns the statistics for all Identity Servers and Access Gateways in Access Manager.

Sample Request

Send a GET request to a URL. For example, https://192.168.0.0:8443/amsvc/v1/statistics.

Sample Response
<amService xmlns="urn:novell:schema:am:service">
<response code="SUCCESS"/>
<statistics uri="https://192.168.0.0:8443/amsvc/v1/statistics">
<idpClusterStatisticsList total="1">
<clusterStatistics uri="https:// 192.168.0.0:8443/amsvc/v1/idpclusters/SCC7c9nsp/statistics">
<instanceID>SCC7c9nsp</instanceID>
<displayName>IDPCluster</displayName>
<deviceStatistics uri="https:// 192.168.0.0:8443/amsvc/v1/idpclusters/SCC7c9nsp/devices/idp-CC1B3FFB0BC40AD8/statistics">
<instanceID>idp-CC1B3FFB0BC40AD8</instanceID>
<displayName>192.168.0.6</displayName>
<statisticList total="90">
<statistic displayName="Cached Sessions">100</statistic>
<statistic displayName="Historical Maximum Logins Served">890</statistic> ...

NOTE:This API returns the statistics information saved in Administration Console. It is refreshed every 10 minutes. Therefore, it is sufficient to invoke this API every 10 minutes to get the latest statistics.

2.3.3 Scaling the Devices

You can use these APIs to scale up or scale down Access Gateway and Identity Servers. These APIs can only assign or delete a node in an existing cluster. For more information about how to configure these APIs, see the following configurations.

Scaling Down Identity Server

Scaling down from a cluster: Perform the following steps:

  1. Delete a node from an existing Identity Server cluster. Send a DELETE request to the following URL with the cluster ID and the device ID.

    NOTE:You can not delete the primary Identity Server nodes. You can delete only the secondary nodes of Identity Server in a cluster.

    POST: https://<AC_IP:PORT>/amsvc/v1/idpclusters/<clusterID>/devices/<deviceID>

    In the above POST request, the following details are used.

    Cluster ID: The name of the Identity Server cluster from which the node will be deleted.

    Device ID: The device ID of the Identity Server node that is to be deleted.

    Sample Response

    200 OK

  2. When the node is deleted from the cluster, send a PUT request to the following URL to update the cluster.

    https:// <AC_IP:PORT>164.99.86.7:8443/amsvc/v1/idpclusters/<clusterID>

    With input { "update" : "all" }

Scaling down an individual node: Perform the following to delete a node that is not part of a cluster:

Delete a node from an Administration Console. Send a DELETE request to the following URL with the device ID.

POST: https://<AC_IP:PORT>/amsvc/v1/idpclusters/<clusterID>/devices/<deviceID>

Device ID: The device ID of the Identity Server node that is to be deleted.

Sample Response

200 OK