To get a list of Packet Capture appliances connected to the specified NDR cluster, send the following request:
GET https://<IA_IP_address>:<port_number>/stats/v1/pxstats/<cluster_name>/hosts
Required header:
Cookie: px=<token>
Options
IA_IP_address—The IP address of the NDR appliance running the NDR API.
port_number—The port number of the NDR appliance running the NDR API.
cluster_name—The name of the cluster.
token—This token authenticates the session. By default, the session times out after 24 hours.
Example
GET https://xxx.xxx.xxx.xxx:443/stats/v1/pxstats/ia150/hosts
Required header:
Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PX hosts for a cluster: Response
HTTP/1.1 [Response Code] [Response Message] Server: [Server] Date: [Date] Content-Type: [Content Type]
Response fields
Response Code—A standard HTTP response code.
Response Message—A standard HTTP response message.
Server—The server being used.
Date—Standard HTML date format.
Content Type—The response format.
Example
HTTP/1.1 200 OK Server: nginx Date: Fri, 29 Apr 2016 18:28:44 GMT Content-Type: application/json; charset=utf-8 ["px151.fireeye.com"]
cURL code sample: PX hosts for a cluster
curl -k -H "Content-Type: Application/json" --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://xxx.xxx.xxx.xxx:443/stats/v1/pxstats/ia150/hosts
This cURL sample includes the following options:
-k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.-H "Content-Type: Application/json"—This header specifies that the request body is in JSON format.--cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This option specifies the authentication token for this session.https://xxx.xxx.xxx.xxx:443/stats/v1/pxstats/ia150/hosts—The statistics request URL. Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance. Replaceia150with the cluster name of interest.
Results
This example returns a list of PX appliances connected to the specified NDR cluster.