Retrieving the nSA API details using Browser

To view and download the nSA rest APIs, perform the following:

1.Log in to nSA ICS using any of browser for example: Chorme, Mozilla).

2.Open your  Browser > Click on the Right Corner 3 Vertical Dots > More Tools > Developer Tools as shown in the below image.

3.Select Network tab, this list all the APIs which are in use to load a UI Page.

4.Click Request tab to see the payloads and Response tab to see the return value.

5.Click on the link, shown in step 3 figure and you can see Json, Raw Data, and Headers tabs. You can Save and Copy.

nSA Rest API

Gateway Registration

Copy
Post <IP address>/api/v1/nsa/register
REQUEST
{
    "reg_host_fqdn":"xxxxxxxx",
    "reg_code":"xxxxxx",
    "nw_interface":"internal",
    "use_proxy":"false"
}
RESPONSE
{
    "success":"Successfully triggered registration"
}

Gateway Registration Status

Copy
Get <IP address>/api/v1/nsa/registration-status
REQUEST
Get <IP address>/api/v1/nsa/registration-status
RESPONSE
{
    "gateway-id": "xxxxxxxxxxx",
    "notification-status": "success",
    "notification-status-message": "The Notification Channel is Connected.",
    "notification-url": "wss://marjoram4.e.marjoram.pzt.dev.perfsec.com/api/v1/notifications",
    "reg-status-message": "success",
    "reg-status-message": ""
}

Ribbon Summary Counts

Copy
POST /api/v1/analytics/summary
REQUEST
{
    "current_time": 1580515200,
    "start_time": 1580515200,
    "time_duration_type": "day",
    "timezone_offset": 330,
    "gateway_type": "pcs",
    "overlay_filter_type": "non_compliance_users",
    "global_filter": {
    "gateway_ids": [
    "74h4h3-u43943-4u3o4",
    "84h4h3-u43943-4u3o5"
   ]
 }
}
RESPONSE
[
     {
        "status": 73,
        "name": "device",
        "description": "Active devices vs. Connected devices",
        "actual_value": 16,
        "total_value": 25,
        "line_graph_data": [
        1,
        2,
        3
        ],
        "line_graph_color": "green",
        "trend_direction": "up",
        "trend_delta": 5
     }
]

Gateway Map View

Copy
POST /api/v1/analytics/pcs_location_view
REQUEST
{
    "current_time": 1580515200,
    "start_time": 1580515200,
    "time_duration_type": "day",
    "timezone_offset": 330,
    "gateway_type": "pcs",
    "overlay_filter_type": "non_compliance_users",
    "global_filter": {
    "gateway_ids": [
        "74h4h3-u43943-4u3o4",
        "84h4h3-u43943-4u3o5"
    ]
  }
}
RESPONSE
{
"bubble_items": [
    {
        "granularity": "city",
        "city": "Austin",
        "country": "USA",
        "continent": "North America",
        "id": "new_york",
        "bubble_color": "Green",
        "latitude": 48.5,
        "longitude": 71.923,
        "num_gws_good": 1,
        "num_gws_warning": 1,
        "num_gws_critical": 1,
        "num_gws_offline": 1,
        "total_gateways": 10,
        "active_users": {
        "count": 76,
        "color": "Green",
        "num_nonCompliance_users": 1
    },
"active_devices": {
    "count": 76,
    "color": "Green"
    },
    "active_sessions": {
    "count": 76,
    "color": "Green"
    },
    "non_compliance_count": {
    "count": 76,
    "color": "Green"
    },
"user_location_bubble_items": [
        {
        "id": "san_jose",
        "city": "Bengaluru",
        "latitude": 48.5,
        "longitude": 71.923,
        "num_active_users": 200
        }
      ]
    }
  ],
    "count": 10
}

Gateway User specific Map View

Copy
POST /api/v1/analytics/pcs_users_location_view
REQUEST
{
    "current_time": 1580515200,
    "start_time": 1580515200,
    "time_duration_type": "day",
    "timezone_offset": 330,
    "gateway_type": "pcs",
    "overlay_filter_type": "non_compliance_users",
    "global_filter": {
    "gateway_ids": [
    "74h4h3-u43943-4u3o4",
    "84h4h3-u43943-4u3o5"
    ]
  }
}
RESPONSE
{
"bubble_items": [
    {
        "granularity": "city",
        "city": "Bengaluru",
        "country": "India",
        "continent": "North America",
        "bubble_color": "Green",
        "latitude": 48.5,
        "longitude": 71.923,
        "avg_risk_score": {
            "count": 76,
            "color": "Green"
        },
        "num_active_users": 10,
        "num_high_risk_users": 1,
        "num_moderate_risk_users": 1,
        "num_low_risk_users": 1,
        "num_no_risk_users": 1
    }
   ],
"count": 10
}

Plotting Sanky Chart

Copy
POST /api/v1/analytics/pcs_l1_sankey_chart
REQUEST
{
    "current_time": 1580515200,
    "start_time": 1580515200,
    "time_duration_type": "day",
    "timezone_offset": 330,
    "gateway_type": "pcs",
    "overlay_filter_type": "non_compliance_users",
    "global_filter": {
    "gateway_ids": [
    "74h4h3-u43943-4u3o4",
    "84h4h3-u43943-4u3o5"
   ]
  }
}
RESPONSE
{
"user_groups_to_device_types": [
  [
    {
      "source": "Bangalore",
      "target": "Windows",
      "value": 10
    }
  ]
],
"device_types_to_gateway_names": [
  [
    {
      "source": "Bangalore",
      "target": "Windows",
      "value": 10
    }
  ]
],
"gateway_names_to_application_names": [
  [
    {
      "source": "Bangalore",
      "target": "Windows",
      "value": 10
    }
  ]
 ]
}

Top Active Gateways

Copy
POST /api/v1/analytics/widgets/top_gateways
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "current_time":"1649153664"
}
RESPONSE
[
    {
      "name":"pcs-bng","value":28
    }
]

Top Device Types

Copy
POST /api/v1/analytics/widgets/top_device_types
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "current_time":"1649153664"
}
RESPONSE
{
    "title": "TOP DEVICE TYPES",
    "device_types": [
    {
        "name": "bucket1",
        "value": 314
    }
  ]
}
 

Top User Locations

Copy
POST /api/v1/analytics/widgets/top_user_access_locations
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "current_time":"1649153664"
}
RESPONSE
{
    "title": "TOP USER ACCESS LOCATIONS",
    "user_access_locations": [
    {
        "name": "bucket1",
        "value": 314
    }
  ]
}

Active Session Duration

Copy
POST /api/v1/analytics/widgets/top_session_durations
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "current_time":"1649153664"
}
RESPONSE 
{
"buckets": [
    {
        "name": "35 Min(s) - 2 Hour(s)",
        "session_end_time": 1649156400,
        "session_start_time": 1649152800,
        "value": 28
    }
  ],
 "chart_timestamp": 1649158524,
 "title": "Session Times"
}

Connected Clients Active Users

Copy
POST /api/v1/analytics/devices/connected_clients
REQUEST
{
    "gateway_type": "pcs",
    "current_time": 1649158826,
    "time_duration_type": "active",
    "timezone_offset": 0,
    "users": "active"
}
RESPONSE 
{
     "connected_devices": [
     {
        "type": "Android 7.0",
        "values": [
            {
                "count": 2,
                "name": "9.1.7.4075 Mozilla"
            }
         ]
     },
     {
         "type": "Ubuntu",
         "values": [
          {
            "count": 2,
            "name": "9.1.11.5655 Mozilla"
          }
        ]
     },
     { 
         "type": "Windows 7",
         "values": [
            {
              "count": 2,
              "name": "9.1.12.5655 Mozilla"
            }
        ]
     },
     {
         "type": "iOS 12.0",
         "values": [
        { 
          "count": 3,
          "name": "9.1.10.5655 Mozilla"
        }
      ]
     },
     {
         "type": "Android 8.0.0",
         "values": [
        {
          "count": 1,
          "name": "9.1.9.4075 Mozilla"
        }
      ]
     },
     {
         "type": "Windows",
         "values": [
        {
          "count": 2,
          "name": "9.1.8.4075 Mozilla"
        }
      ]
     }
   ]
}

Connected Clients All Users

Copy
POST /api/v1/analytics/devices/connected_clients
REQUEST
{
    "gateway_type": "pcs",
    "current_time": 1649158826,
    "time_duration_type": "active",
    "timezone_offset": 0,
    "users": "all"
}
RESPONSE 
{
     "connected_devices": [
     {
        "type": "Android 7.0",
        "values": [
         {
            "count": 2,
            "name": "9.1.7.4075 Mozilla"
        }
      ]
     },
     {
         "type": "U
        ]buntu",
         "values": [
      {
        "count": 2,
        "name": "9.1.11.5655 Mozilla"
      }
     },
     { 
         "type": "Windows 7",
         "values": [
      {
        "count": 2,
        "name": "9.1.12.5655 Mozilla"
      }
     ]
     },
     {
         "type": "iOS 12.0",
         "values": [
        { 
         "count": 3,
         "name": "9.1.10.5655 Mozilla"
        }
      ]
     },
     {
         "type": "Android 8.0.0",
         "values": [
        {
         "count": 1,
         "name": "9.1.9.4075 Mozilla"
        }
       ]
     },
     {
         "type": "Windows",
         "values": [
        {
         "count": 2,
         "name": "9.1.8.4075 Mozilla"
        }
       ]
     }
    ]
}

Non Compliances

Copy
POST /api/v1/analytics/users/top_non_compliance_by_policy
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "current_time":"1649153664"
}
RESPONSE
{
 "chart_timestamp": 1649159279,
 "non_compliance_policies": [
     {
     "name": "HCPolicy3_OSCheck",
     "values": [
        {
         "name": "HcResultFullNonCompliance",
         "value": 1
        },
        {
         "name": "HcResultPartialCompliance",
         "value": 1
        }
       ]
     },
     {
        "name": "HCPolicy4_File&Process",
        "values": [
         {
            "name": "HcResultFullNonCompliance",
            "value": 1
         },
         {
            "name": "HcResultPartialCompliance",
            "value": 1
         }
       ]
     },
     {
        "name": "HCPolicy1_Antivirus",
        "values": [
        {
            "name": "HcResultFullNonCompliance",
            "value": 1
        }
       ]
     },
     {
        "name": "HCPolicy2_Firewall",
        "values": [
        {
            "name": "HcResultFullNonCompliance",
            "value": 1
        }
       ]
     },
     {
        "name": "HCPolicy5_Pred&Custom",
        "values": [
        {
            "name": "HcResultFullNonCompliance",
            "value": 1
        }
      ]
     }
  ],
"title": "Non-Compliance"
}

Pre-Auth Non Compliances

Copy
POST /api/v1/analytics/users/pcs_pre_auth_nc?count=5
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "current_time":"1649153664",, 'category': 'device_os_type'
}
RESPONSE
{
    "chart_timestamp": 1649159279,
    "title": "Non-Compliance",
    "top_pre_auth_nc_items_by_category": []
}

Gateway Info Panel

Copy
POST /api/v1/analytics/widgets/top_gateways/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"active_users_count",
    "current_time":"1649153664"
}
RESPONSE
{
     "info_panel_items": [
     {
        "id": "feicie-cneineoic-nfeie-32he",
        "gateway_name": "eng-mkn-gw-1",
        "city_name": "bangalore",
        "overall_color": "green",
        "gateway_status": "active",
        "number_of_issues": 10,
        "cpu_line_graph_data": "string",
        "memory_line_graph_data": "string",
        "disk_used_line_graph_data": "string",
        "active_users_count": 10,
        "active_devices_count": 10,
        "active_sessions_count": 10,
        "active_applications_count": 10,
        "non_compliance_count": 10,
        "issues_highest_severity": "CRITICAL",
        "issues_details": [
        {
         "message_id": "NTP12456",
         "raw_message": "NTP server is not reachable",
         "issue_timestamp": 3848462926,
         "number_of_issues": 23
        }
     ],
         "system_uptime": 10748,
         "last_config_update_timestamp": 1063264,
         "ssl_sessions_count": 10,
         "auth_only_sessions_count": 10,
         "active_sync_device_count": 10,
         "is_node_part_of_cluster": true,
         "cluster_properties": {
         "cluster_id": "9ccf22b9fe9ccf22b9fe",
         "cluster_name": "CoaGroup",
         "cluster_type": "Active/Active",
         "cluster_node_type": "active",
         "cluster_member_type": "leader",
         "is_vip_owner": false,
         "is_node_reachable": true,
         "is_node_enabled": false
        }
      }
     ],
    "count": 10,
    "all_gateway_count": 10,
    "active_gateway_count": 5,
    "offline_gateway_count": 5,
    "online_gateway_count": 5,
    "unregistered_gateway_count": 5
}

Active Users Info Panel

Copy
POST /api/v1/analytics/widgets/pcs_top_users/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "name":"top_gateways",
    "sort_order":"desc",
    "sort_field":"timestamp",
    "current_time":"1649153664"
}
RESPONSE
{
    "info_panel_items": [
    {
        "connection_types": [
        "JSAM",
        "VPN"
        ],
        "user_name": "user1",
        "timestamp": 1580515200,
        "device_location_city": "Bengaluru",
        "network_access_layer": "L3",
        "gateway_name": "t-0-gw-1",
        "compliance_status": "Non-Compliant",
        "device_type": "macOS"
      }
    ],
    "count": 10,
    "total": 20
}

Devices Info Panel

Copy
POST /api/v1/analytics/widgets/pcs_top_device_types/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"device_type",
    "current_time":"1649153664"
}
RESPONSE
{
     "info_panel_items": [
     {
        "device_type": "Mac",
        "device_count": 335,
        "l3_session_count": 120,
        "l7_session_count": 120,
        "device_count_by_location": [
        {
            "name": "Bangalore",
            "value": 500
        },
        {
            "name": "London",
            "value": 200
        }
      ],
        "non_compliance_count": 25
     }
    ],
    "total": 20
}

Active Sessions Info Panel

Copy
POST /api/v1/analytics/widgets/pcs_top_sessions/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"user_name",
    "current_time":"1649153664"
}
RESPONSE
{
     "info_panel_items": [
     {
        "alerts_count": 10,
        "anomalies_count": 5,
        "connection_types": [
        "JSAM",
        "VPN"
        ],
        "device_location_city": "Bengaluru",
        "device_types": [
        "Windows",
        "Ubuntu"
        ],
        "gateway_name": "t-0-gw-1",
        "session_types": [
        "L3",
        "L7"
        ],
        "session_ids": [
        "9ccf22b9fe",
        "61cedb7c80"
        ],
    "timestamp": 1580515200,
    "user_name": "user1",
    "user_risk_score": 10
     }
    ],
"count": 10,
"total": 20
}

Active Applications Info panel

Copy
POST /api/v1/analytics/widgets/pcs_top_applications/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"timestamp",
    "current_time":"1649153664"
}
RESPONSE
{
 "info_panel_items": [
     {
    "application_bookmark_type": "User defined",
    "application_connection_broker": "WIN73428.auto.pcs.com:443",
    "application_desktop_protocol": "rdp",
    "application_host": "<IPv6 Address>",
    "application_ip": "<IP Address>",
    "timestamp": 1580515200,
    "application_name": "MyGmailCom",
    "application_port": "1494",
    "application_type": "Web",
    "application_url": "www.gmail.com",
    "devices_count": 5,
    "sessions_count": 5,
    "users_count": "5"
     }
  ],
"count": 5
"total": 20
}

Non Compliances Info panel

Copy
POST /api/v1/analytics/widgets/pcs_non_compliance/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"user_name",
    "current_time":"1649153664"
}
RESPONSE
{
     "info_panel_items": [
     {
        "user_name": "user1",
        "user_roles": [
        "Role1",
        "Role2"
        ],
        "timestamp": 1580515200,
        "compliance_status": "Non-Compliant",
        "non_compliance_policies": [
        {
            "policy_name": "engg_policy",
            "failure_reason": "Anti-Virus turned off"
        }
      ],
        "user_location": "Bangalore",
        "session_id": "d3534dse",
        "device_type": "Windows",
        "gateway_name": "gw-east-london"
     }
   ],
"count": 5,
"total": 20
}

Auth Failure Info Panel

Copy
POST /api/v1/analytics/widgets/pcs_top_auth_failures/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"user_name",
    "current_time":"1649153664"
}
RESPONSE
{
    "info_panel_items": [
     {
        "user_name": "user1",
        "timestamp": 1580515200,
        "device_location_city": "Bengaluru",
        "auth_server_name": "Server 1",
        "auth_server_position": "Primary",
        "device_type": "macOS",
        "gateway_name": "t-0-gw-1",
        "auth_failure_reason": "Login Failed. Incorrect token."
     }
  ],
"count": 10,
"total": 20
}

Anomalies Info Panel

Copy
POST /api/v1/analytics/widgets/anomalies/panel
REQUEST
{
    "time_duration_type":"active",
    "gateway_type":"pcs",
    "sort_order":"desc",
    "sort_field":"user_name",
    "current_time":"1649153664"
}
RESPONSE
{
"info_panel_items": [
     {
    "anomaly_type": "GeoNewLocation",
    "user_name": "John Smith",
    "timestamp": 1587972453,
    "device_id": "27178d97948d46c09c205d30e9cf2afe",
    "session_id": "9ccf22b9fe",
    "device_type": "Windows",
    "anomaly_reason": "Non-familiar user location.",
    "anomaly_id": "e4abbb38ce8d4619891e561cedb7c807",
    "acknowledged": true,
    "active_session": true,
    "browser": "Google Chrome",
    "locations_history": [
    {
         "location_name": "Bangalore",
         "timestamp": 1580515200
    }
    ],
"current_location": "Bangalore"
},
{},
{
    "anomaly_type": "GeoNewLocation",
    "user_name": "John Smith",
    "timestamp": 1587972453,
    "device_id": "27178d97948d46c09c205d30e9cf2afe",
    "session_id": "9ccf22b9fe",
    "device_type": "Windows",
    "anomaly_reason": "Non-familiar user location.",
    "anomaly_id": "e4abbb38ce8d4619891e561cedb7c807",
    "acknowledged": true,
    "active_session": true,
    "browser": "Google Chrome",
    "application_names": [
    "Microsoft",
    "Facebook"
    ],
    "details": "Normal access hours range of user is between 9 a.m. to 5 p.m."
  }
 ],
"count": 20,
"total": 20
}

Summary Strip with Gateway Filter

Copy
POST /api/v1/analytics/summary
REQUEST
{
    "current_time": 1580515200,
    "start_time": 1580515200,
    "gateway_type": "pcs",
    "overlay_filter_type": "non_compliance_users",
    "global_filter": {
    "gateway_ids": [
    "74h4h3-u43943-4u3o4"
    ]
  }
}
RESPONSE
[
  {
    "status": 73,
    "name": "device",
    "description": "Active devices vs. Connected devices",
    "actual_value": 16,
    "total_value": 25,
    "line_graph_data": [
        1,
        2,
        3
      ],
    "line_graph_color": "green",
    "trend_direction": "up",
    "trend_delta": 5
  }
]

Search Logs

Copy
POST /api/analytics/logs/search
REQUEST
{
    "name": "Filter1",
    "start_time_es": 1576533928,
    "end_time_es": 1576533928,
    "current_time": 1576533928,
    "timezone_offset": 330,
    "offset": 0,
    "limit": 100,
    "search_string": "PCS",
    "search_string_columns": [
        "application_configured_name"
        ],
    "sort_by": "timestamp",
    "sort_group_by": "application_name",
    "group_by": "application_name",
    "order": "desc",
    "log_type": "access",
    "gateway_type": "pcs",
    "columns": [
        "timestamp",
        "message_id",
        "severity",
        "session_id",
        "raw_message"
        ],
    "group_by_columns": [
        "unique_gateway_names_count",
        "unique_user_names_count",
        "unique_application_names_count",
        "summary_device_types",
        "summary_message_types",
        "unique_device_ids_count",
        "unique_session_ids_count"
        ],
     "filters": [
     {
        "filter_by": "message_ids",
        "operator": "IS",
        "value": "PCSGateway"
     }
   ]
}
RESPONSE
{
    "total": 1000,
    "count": 10,
    "offset": 0,
    "log_lines": [
    {
        "timestamp": 1576533928,
        "message_id": "ADM24682",
        "gateway_id": "123e4567-e89b-12d3-a456-426655440000",
        "gateway_name": "Azure-Gateway_1",
        "severity": "INFO",
        "source_ip": "<IP Address>",
        "raw_message": "Primary authentication successful for admindb/SDP Admin Auth from\n172.21.8.171\n",
        "user_name": "testuser1",
        "user_group": "testgroup1",
        "session_id": "fa0726e89c",
        "device_id": "965C34BA98C94F4EAE6F2D8564E6CEAC",
        "application_name": "Jira.abc.com",
        "application_group_names": [
            [
                "group-1",
                "group-2"
            ]
        ],
        "application_protocol": "HTTPS",
        "application_protocol_display_name": "Web",
        "application_discovered": false,
        "application_type": "url",
        "application_status": "Green",
        "application_connection_broker": "auto.pcs.com",
        "application_desktop_protocol": "ssh",
        "application_host": "auto.pcs.com",
        "application_ip": "1.2.3.4",
        "application_url": "www.gmail.com",
        "application_location_city": "Bengaluru",
        "application_bookmark_type": "Admin defined",
        "non_compliance_policy_name": "Jira_access_policy",
        "non_compliance_policy_types_list": [
            [
                "Location",
                "HC"
            ]
        ],
        "message_type": "Anomaly",
        "sub_message_type": "Anomaly",
        "pulse_client_version": "2021.12.1",
        "device_type": "Windows",
        "device_os_type": "Windows 10 Pro",
        "device_location_city": "mumbai",
        "user_risk_score": 10.23,
        "user_risk_score_category": "High",
        "user_alerts_count": 13,
        "user_anomalies_count": 10,
        "user_activity_deviations_count": 5,
        "acknowledged": true,
        "session_type": "local",
        "adaptive_auth_reason": "new_location",
        "controller": true,
        "is_session_active": true,
        "session_duration": "2:20:00",
        "bandwidth_consumed": 1024,
        "bandwidth_consumed_str": "1.00 Kb",
        "connected_time": "2:10:30",
        "role_names": [
            [
                "role-1",
                "role-2"
            ]
        ],
        "session_created_timestamp": 1576533928,
        "browser": "Google Chrome",
        "gateway_status": "online",
        "gateway_version": "21.x Build 1",
        "esap_version": "21.x Build 1",
        "cpu": 26.75,
        "physical_memory": 18.25,
        "swap_memory": 20.9,
        "disk_used_percentage": 34.5,
        "throughput_value": 67,
        "avg_cpu": 26.75,
        "avg_memory": 18.25,
        "avg_disk": 34.5,
        "avg_throughput": 67,
        "max_concurrent_user_licenses_consumed": 200
    }
  ]
}

Top Busy Users

Copy
Post
/api/v1/analytics/users/top_busy_users
Response
{
    "current_time":1668488805,
    "time_duration_type":"active",
    "timezone_offset":0
}
Request
{
    "blocks": [ ],
    "chart_timestamp": 1668488805,
    "max_apps_list": [ ],
    "max_gradient_value": 10,
    "max_users_list": [ ],
    "min_gradient_value": 0,
    "title": "Top Busy Users"
}

Applications by Type

Copy
Post
/api/v1/analytics/applications/applications_by_type
Request
{
    "current_time":1668489311,
    "time_duration_type":"active",
    "timezone_offset":0
}
Response 
{
    "chart_timestamp": 1668489311,
    "data": [],
    "title": "Applications Type"
}

Top Gateways by Health

Copy
Post
api/v1/analytics/gateways/top_gateways_by_health
Request
{
    "gateway_type":"zta",
    "current_time":1668496306,
    "time_duration_type":"active","
    "timezone_offset":0,
    "category":"cpu"
}
Response 
{
    "chart_timestamp": 1668496306,
    "data": [
    {
     "name": "esxi-21-12r1-95",
     "value": 1.98
    },
    {
     "name": "esxi-22-1r1-75",
     "value": 2.0
    }
  ],
     "title": "ZTA L2 Gateways By Health Chart",
     "total_items": 2
}

Policy Failures Trend

Copy
Post
/api/v1/analytics/policy_failures/policy_failures_trend
Request
{
    "current_time":1668499346,
    "time_duration_type":"active",
    "timezone_offset":0
}
Response
{
    "bar_chart_data": {
    "data": [
    {
     "timestamp": "07:00 AM",
     "value": 0
    },
    {
     "timestamp": "07:05 AM",
     "value": 0
    },
    {
     "timestamp": "07:10 AM",
     "value": 0
    },
    {
     "timestamp": "07:15 AM",
     "value": 0
    },
    {
     "timestamp": "07:20 AM",
     "value": 0
    },
    {
     "timestamp": "07:25 AM",
     "value": 0
    },
    {
     "timestamp": "07:30 AM",
     "value": 0
    },
    {
     "timestamp": "07:35 AM",
     "value": 0
    },
    {
     "timestamp": "07:40 AM",
     "value": 0
    },
    {
     "timestamp": "07:45 AM",
     "value": 0
    },
    {
     "timestamp": "07:50 AM",
     "value": 0
    },
    {
     "timestamp": "07:55 AM",
     "value": 0
    },
    {
     "timestamp": "08:00 AM",
     "value": 0
    }
    ],
     "name": "Unique users"
    },
     "chart_timestamp": 1668499346,
     "lines_chart_data": [],
     "timestamps_list": [
         "07:00 AM",
         "07:05 AM",
         "07:10 AM",
         "07:15 AM",
         "07:20 AM",
         "07:25 AM",
         "07:30 AM",
         "07:35 AM",
         "07:40 AM",
         "07:45 AM",
         "07:50 AM",
         "07:55 AM",
         "08:00 AM"
    ],
     "title": "Policy Failures Access Trend",
     "top_failure_types_list": [],
     "unique_applications": {
     "data": [
    {
     "timestamp": "07:00 AM",
     "value": 0
    },
    {
     "timestamp": "07:05 AM",
     "value": 0
    },
    {
     "timestamp": "07:10 AM",
     "value": 0
    },
    {
    "timestamp": "07:15 AM",
    "value": 0
    },
    {
     "timestamp": "07:20 AM",
     "value": 0
    },
    {
     "timestamp": "07:25 AM",
     "value": 0
    },
    {
     "timestamp": "07:30 AM",
     "value": 0
    },
    {
     "timestamp": "07:35 AM",
     "value": 0
    },
    {
     "timestamp": "07:40 AM",
     "value": 0
    },
    {
    "timestamp": "07:45 AM",
    "value": 0
    },
    {
    "timestamp": "07:50 AM",
    "value": 0
    },
    {
     "timestamp": "07:55 AM",
     "value": 0
    },
    {
     "timestamp": "08:00 AM",
     "value": 0
    }
    ],
     "name": "Unique applications"
    },
     "unique_users": {
     "data": [
    {
     "timestamp": "07:00 AM",
     "value": 0
    },
    {
     "timestamp": "07:05 AM",
     "value": 0
    },
    {
     "timestamp": "07:10 AM",
     "value": 0
    },
    {
     "timestamp": "07:15 AM",
     "value": 0
    },
    {
     "timestamp": "07:20 AM",
     "value": 0
    },
    {
    "timestamp": "07:25 AM",
    "value": 0
    },
    {
    "timestamp": "07:30 AM",
    "value": 0
    },
    {
     "timestamp": "07:35 AM",
     "value": 0
    },
    {
     "timestamp": "07:40 AM",
     "value": 0
    },
    {
     "timestamp": "07:45 AM",
     "value": 0
    },
    {
     "timestamp": "07:50 AM",
     "value": 0
    },
    {
     "timestamp": "07:55 AM",
     "value": 0
    },
    {
     "timestamp": "08:00 AM",
     "value": 0
    }
  ],
 "name": "Unique users"
 }
}

Audit Logs

Copy
Post
/api/v1/analytics/actionable_insights_actions/audit_logs
Request
{
    "start_time_es":1668413629,
    "end_time_es":1668500029,
    "current_time":1668500029,
    "time_duration_type":"day",
    "timezone_off
    set":0,"offset":0,"limit":50,
    "category":"user_risk_score",
    "gateway_type":"zta"
}
Response
{
    "count": 0,
    "log_lines": [],
    "total": 0
}

Report Templates

Copy
Get
/api/v1/analytics/reports_new/templates
Response
"templates": [
    {
        "created": "1970-01-01T00:00:00Z",
        "description": "Custom report provides a way to add additional information and it can be saved as a report template.",
        "gateway_type": "zta",
        "is_base_template": true,
        "name": "Custom Report",
        "read_only": true,
        "template_id": "e1e898b3201f4d18b24251f8294ee314",
        "updated": "1970-01-01T00:00:00Z"
    },
    {
        "created": "1970-01-01T00:00:00Z",
        "description": "User access information summarizing the activity of individual users or user groups.",
        "gateway_type": "zta",
        "is_base_template": false,
        "name": "User Activity Summary Report",
        "read_only": true,
        "template_id": "250801c6f8e7423f995d320c0e211602",
        "updated": "1970-01-01T00:00:00Z"
    },
    {
        "created": "1970-01-01T00:00:00Z",
        "description": "Application activity information summarizing how applications are accessed and used.",
        "gateway_type": "zta",
        "is_base_template": false,
        "name": "Application Access Report",
        "read_only": true,
        "template_id": "07bdc031cf784d7b9f6af4aa90ed4428",
        "updated": "1970-01-01T00:00:00Z"
    },
    {
        "created": "2022-07-25T04:59:20Z",
        "description": "",
        "gateway_type": "zta",
        "is_base_template": false,
        "name": "template1",
        "read_only": false,
        "template_id": "cd8ae185d52647eb9a8a89a1e1cf1dd5",
        "updated": "2022-07-25T04:59:20Z"
    },
    {
        "created": "1970-01-01T00:00:00Z",
        "description": "Metrics and indicators of UEBA threat level associated with users.",
        "gateway_type": "zta",
        "is_base_template": false,
        "name": "User UEBA threat Report",
        "read_only": true,
        "template_id": "9d2a883a76194068a20149ee3b90f3bc",
        "updated": "1970-01-01T00:00:00Z"
    }
  ]
}

Secure Access Policies

Copy
Get
/api/v1/policies/ui/secure-access-policies
Response
{
"count": 5,
"items": [
    {
        "application_health_messages": [
            "Application reachability is unknown"
        ],
        "application_health_status": "grey",
        "device_policy_display_name": "",
        "enabled": false,
        "gateway_display_name": "",
        "gateway_type": "single",
        "id": "8b85c4149f35441bbe654b28b1fdcd50",
        "is_default": true,
        "resource_config": {
            "name": "Application discovery"
        },
        "resource_display_name": "Application discovery",
        "resource_id": "df24da54f1284b55b74802bc71551970",
        "resource_type": "single",
        "type": "application",
        "user_rule_group_config": {
            "name": "Users",
        "role_config": {
            "id": "629d15eb93524f35a75b8dfc74fa833d",
            "name": "ZTA User Role",
            "redirect_url": "/user",
            "type": "user"
         }
        },
        "user_rule_group_display_name": "Users",
        "user_rule_group_id": "c29ba05cf207453b83dde26b5f5fa5b1"
    },
    {
        "application_health_messages": [
            "Application is reachable"
        ],
        "application_health_status": "green",
        "device_policy_display_name": "",
        "enabled": true,
        "gateway_config": {
            "actions": [
                "change_settings",
                "upgrade",
                "reboot"
            ],
        "appliance_version": "22.1R1-75",
        "capabilities": [
            "readiness",
            "reboot",
            "action",
            "action_snapshot",
            "action_debug_log",
            "action_ping",
            "action_nslookup",
            "action_arp",
            "action_traceroute",
            "action_avgrtt",
            "action_portprobe",
            "action_tcp_dump",
            "action_node_monitoring",
            "configurable_session_timeouts",
            "connect_via_mgmt_interface",
            "application_discovery",
            "configurable_custom_ip_pool_range",
            "configurable_sub_domain",
            "replace",
            "group_actions",
            "settings_update"
        ],
        "created": "2022-06-13T13:37:57Z",
        "external_fqdn": "esxi-22-1r1-75.g.tenant1.e.cedar.pzt.dev.perfsec.com",
        "external_ip": "<IP Address>",
        "gateway_type": "pzt_gateway",
        "id": "0183c3d395944b5691c7579470c7181d",
        "is_ready": true,
        "location": {
            "city_id": 99
        },
        "model": "ISA4000-V",
        "name": "esxi-22-1r1-75",
        "notification_channel_status": "online",
        "ntp_primary_server": "time.windows.com",
        "ntp_secondary_server": "time.nist.gov",
        "orchestration": {
            "mode": "manual",
            "type": "vsphere"
        },
        "public_ip": "10.97.129.56",
        "public_ips": [
            "10.97.129.56"
        ],
        "sdp_mode": "pzt-gateway",
        "serial_number": "VASPHQ3NHXSHFC3TS",
        "state": "registered",
        "tunnel_idle_timeout": 5,
        "type": "VPN",
        "updated": "2022-07-04T17:53:12Z",
        "use_dynamic_ip": false,
        "versions": [
            "21.12R1-95",
            "21.6R1-189",
            "21.3R1-233",
            "21.2R1-153",
            "21.1R1-169"
          ]
        },
        "gateway_display_name": "esxi-22-1r1-75",
        "gateway_id": "0183c3d395944b5691c7579470c7181d",
        "gateway_type": "single",
        "id": "3023aea53c5a42fcacb8c088164dbce1",
        "is_default": false,
        "resource_config": {
            "name": "avinetwork"
        },
        "resource_display_name": "avinetwork",
        "resource_id": "42da64c4fb0b464d97cd964600790d82",
        "resource_type": "single",
        "type": "application",
        "user_rule_group_config": {
            "name": "Users",
            "role_config": {
                "id": "629d15eb93524f35a75b8dfc74fa833d",
                "name": "ZTA User Role",
                "redirect_url": "/user",
                "type": "user"
            }
        },
        "user_rule_group_display_name": "Users",
        "user_rule_group_id": "c29ba05cf207453b83dde26b5f5fa5b1"
    },
    {
        "application_health_messages": [
        "Application reachability is unknown"
        ],
        "application_health_status": "grey",
        "device_policy_display_name": "",
        "enabled": true,
        "gateway_display_name": "AWSGW",
        "gateway_group_config": {
        "config_only_cluster": false,
        "created": "2022-06-01T04:37:00Z",
        "external_fqdn": "awsgw.gg.tenant1.e.cedar.pzt.dev.perfsec.com",
        "group_type": "pzt_gateway",
        "id": "ab516bbd37a5441588c4ba019ada753c",
        "members": [],
        "members_group": [],
        "name": "AWSGW",
        "ready_members": [],
        "registered_members": [],
        "type": "gateways_service.zta_group",
        "updated": "2022-06-14T11:34:47Z"
        },
        "gateway_group_id": "ab516bbd37a5441588c4ba019ada753c",
        "gateway_type": "group",
        "id": "09451120063e4455800f2ec5544576f2",
        "is_default": false,
        "resource_config": {
        "name": "Cisco"
        },
        "resource_display_name": "Cisco",
        "resource_id": "31eb4b8cb368404289bc4bf25daf4fc9",
        "resource_type": "single",
        "type": "application",
        "user_rule_group_config": {
        "name": "Users",
        "role_config": {
        "id": "629d15eb93524f35a75b8dfc74fa833d",
        "name": "ZTA User Role",
        "redirect_url": "/user",
        "type": "user"
        }
        },
        "user_rule_group_display_name": "Users",
        "user_rule_group_id": "c29ba05cf207453b83dde26b5f5fa5b1"
    },
    {
        "application_health_messages": [
            "Application is reachable"
        ],
        "application_health_status": "green",
        "device_policy_config": {
            "name": "actionable-insight"
        },
        "device_policy_display_name": "actionable-insight",
        "device_policy_id": "b1cfba738a344d76a73f587f6b2d9d12",
        "enabled": true,
        "gateway_config": {
        "actions": [
            "change_settings",
            "upgrade",
            "reboot",
            "rollback"
        ],
        "appliance_version": "22.2R1-361",
        "capabilities": [
            "readiness",
            "reboot",
            "rollback",
            "action",
            "action_snapshot",
            "action_debug_log",
            "action_ping",
            "action_nslookup",
            "action_arp",
            "action_traceroute",
            "action_avgrtt",
            "action_portprobe",
            "action_tcp_dump",
            "action_node_monitoring",
            "configurable_session_timeouts",
            "connect_via_mgmt_interface",
            "application_discovery",
            "configurable_custom_ip_pool_range",
            "configurable_sub_domain",
            "configurable_date_time",
            "configurable_custom_domain",
            "replace",
            "group_actions",
            "settings_update"
        ],
        "created": "2022-06-13T13:38:49Z",
        "external_fqdn": "esxi-21-12r1-95.g.tenant1.e.cedar.pzt.dev.perfsec.com",
        "external_ip": "<IP Address>",
        "gateway_type": "pzt_gateway",
        "id": "d5da0263a8d94fd9823ba5568db397b1",
        "is_ready": true,
        "location": {
            "city_id": 73478
        },
        "model": "ISA4000-V",
        "name": "esxi-21-12r1-95",
        "notification_channel_status": "online",
        "ntp_primary_server": "time.windows.com",
        "ntp_secondary_server": "time.nist.gov",
        "orchestration": {
            "mode": "manual",
            "type": "vsphere"
        },
        "public_ip": "<IP Address>",
        "public_ips": [
            "10.97.129.59"
        ],
        "sdp_mode": "pzt-gateway",
        "serial_number": "VASPH7W9CAYNETC4S",
        "state": "registered",
        "tunnel_idle_timeout": 5,
        "type": "VPN",
        "updated": "2022-07-07T15:47:00Z",
        "use_dynamic_ip": false,
        "versions": [
            "21.12R1-95",
            "21.6R1-189",
            "21.3R1-233",
            "21.2R1-153",
            "21.1R1-169"
          ]
        },
    "gateway_display_name": "esxi-21-12r1-95",
    "gateway_id": "d5da0263a8d94fd9823ba5568db397b1",
    "gateway_type": "single",
    "id": "d485a40b720941219ee667d86fabb9d6",
    "is_default": false,
    "resource_config": {
        "name": "dailymotion"
    },
    "resource_display_name": "dailymotion",
    "resource_id": "a1f5441eeb554cdbba52f5b981f226f7",
    "resource_type": "single",
    "type": "application",
    "user_rule_group_config": {
        "name": "accounts-auth",
        "role_config": {
            "id": "0439999bdf3d43188126ea4fd8c24638",
            "name": "accounts-auth",
            "redirect_url": "/user",
            "type": "user"
        }
    },
    "user_rule_group_display_name": "accounts-auth",
    "user_rule_group_id": "dbcbd6f7db274bada01c805638e50ab6"
    },
    {
        "application_health_messages": [
            "Application is reachable"
            ],
        "application_health_status": "green",
        "device_policy_display_name": "",
        "enabled": true,
        "gateway_config": {
            "actions": [
                "change_settings",
                "upgrade",
                "reboot",
                "rollback"
                ],
        "appliance_version": "22.2R1-361",
        "capabilities": [
            "readiness",
            "reboot",
            "rollback",
            "action",
            "action_snapshot",
            "action_debug_log",
            "action_ping",
            "action_nslookup",
            "action_arp",
            "action_traceroute",
            "action_avgrtt",
            "action_portprobe",
            "action_tcp_dump",
            "action_node_monitoring",
            "configurable_session_timeouts",
            "connect_via_mgmt_interface",
            "application_discovery",
            "configurable_custom_ip_pool_range",
            "configurable_sub_domain",
            "configurable_date_time",
            "configurable_custom_domain",
            "replace",
            "group_actions",
            "settings_update"
            ],
        "created": "2022-06-13T13:38:49Z",
        "external_fqdn": "esxi-21-12r1-95.g.tenant1.e.cedar.pzt.dev.perfsec.com",
        "external_ip": "<IP Address>",
        "gateway_type": "pzt_gateway",
        "id": "d5da0263a8d94fd9823ba5568db397b1",
        "is_ready": true,
            "location": {
            "city_id": 73478
            },
        "model": "ISA4000-V",
        "name": "esxi-21-12r1-95",
        "notification_channel_status": "online",
        "ntp_primary_server": "time.windows.com",
        "ntp_secondary_server": "time.nist.gov",
        "orchestration": {
            "mode": "manual",
            "type": "vsphere"
            },
        "public_ip": "<IP Address>",
        "public_ips": [
            "10.97.129.59"
            ],
        "sdp_mode": "pzt-gateway",
        "serial_number": "VASPH7W9CAYNETC4S",
        "state": "registered",
        "tunnel_idle_timeout": 5,
        "type": "VPN",
        "updated": "2022-07-07T15:47:00Z",
        "use_dynamic_ip": false,
        "versions": [
            "21.12R1-95",
            "21.6R1-189",
            "21.3R1-233",
            "21.2R1-153",
            "21.1R1-169"
            ]
        },
        "gateway_display_name": "esxi-21-12r1-95",
        "gateway_id": "d5da0263a8d94fd9823ba5568db397b1",
        "gateway_type": "single",
        "id": "4bc02821efee494cba1e47797490c9f7",
        "is_default": false,
        "resource_config": {
            "name": "facebook"
            },
        "resource_display_name": "facebook",
        "resource_id": "07f0114ee3a24ed4ba24e13b49f127f2",
        "resource_type": "single",
        "type": "application",
        "user_rule_group_config": {
            "name": "Users",
            "role_config": {
                "id": "629d15eb93524f35a75b8dfc74fa833d",
                "name": "ZTA User Role",
                "redirect_url": "/user",
                "type": "user"
                }
            },
        "user_rule_group_display_name": "Users",
        "user_rule_group_id": "c29ba05cf207453b83dde26b5f5fa5b1"
    }
  ],
"offset": 0,
"total": 5
}

User Rule Groups

Copy
Get
/api/v1/policies/ui/user-rule-groups
Response
{
"count": 10,
"items": [
    {
        "allow_delete": false,
        "description": "",
        "id": "86e839565b56491daa9005a556bf2f86",
        "is_default": false,
        "name": "acccounts-erollment",
        "role_config": {
        "id": "8211c9d25d5d40e6a7ec813881482a22",
        "name": "acccounts-erollment",
        "redirect_url": "/user",
        "type": "user"
        },
        "role_id": "8211c9d25d5d40e6a7ec813881482a22",
        "rules": [
        {
        "allow_delete": false,
        "attribute": "is",
        "id": "89e89246cd614a97b246ac4ff773616e",
        "is_default": true,
        "name": "AllEnrollmentUsers",
        "type": "username",
        "value": "*"
        }
        ],
        "sign_in_config": {
        "id": "48ed0870bb774668937cf5c83a350b28",
        "policy_type": "enroll",
        "primary_auth_server_config": {
        "id": "6b089519901f4143b5ce65b37c10580b",
        "name": "account-enrollment",
        "type": "SAML (Azure AD)"
        },
        "primary_auth_server_id": "6b089519901f4143b5ce65b37c10580b",
        "realm": "accounts-enrollment",
        "url_pattern": "*/login/accountsenrollment/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "48ed0870bb774668937cf5c83a350b28",
        "sign_in_policy_name": "accounts-enrollment"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "dbcbd6f7db274bada01c805638e50ab6",
        "is_default": false,
        "name": "accounts-auth",
        "role_config": {
        "id": "0439999bdf3d43188126ea4fd8c24638",
        "name": "accounts-auth",
        "redirect_url": "/user",
        "type": "user"
        },
        "role_id": "0439999bdf3d43188126ea4fd8c24638",
        "rules": [
        {
        "allow_delete": false,
        "attribute": "is",
        "id": "ab94fbc66a17458fb7a0aa09fee549ee",
        "is_default": true,
        "name": "AllAdminUsers",
        "type": "username",
        "value": "*"
        },
        {
        "allow_delete": false,
        "attribute": "is",
        "id": "bb77d22ae3b440bbb3d464f0df50f4af",
        "is_default": true,
        "name": "AllUsers",
        "type": "username",
        "value": "*"
        }
        ],
        "sign_in_config": {
        "id": "e6dc3e529f544f92b1cd233a60526058",
        "policy_type": "user",
        "primary_auth_server_config": {
        "id": "ba6bcd6bc42649e98366d17fe1ffd3e3",
        "name": "account-auth",
        "type": "SAML (Azure AD)"
        },
        "primary_auth_server_id": "ba6bcd6bc42649e98366d17fe1ffd3e3",
        "realm": "accounts-auth",
        "url_pattern": "*/login/accounts/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "e6dc3e529f544f92b1cd233a60526058",
        "sign_in_policy_name": "accounts-auth"
    },
    {
        "allow_delete": false,
        "id": "2891190c7952409687e7db43ed77a8b6",
        "is_default": true,
        "name": "Administrators",
        "role_config": {
        "id": "bcebb37e1e85405db98f188cb4a7cca9",
        "name": ".Administrators",
        "redirect_url": "/admin",
        "type": "admin"
        },
        "role_id": "bcebb37e1e85405db98f188cb4a7cca9",
        "rules": [
        {
        "allow_delete": false,
        "attribute": "is",
        "id": "ab94fbc66a17458fb7a0aa09fee549ee",
        "is_default": true,
        "name": "AllAdminUsers",
        "type": "username",
        "value": "*"
        }
        ],
        "sign_in_config": {
        "id": "f87680b7292242b9af247fec1b17347c",
        "policy_type": "admin",
        "primary_auth_server_config": {
        "id": "4a02312f7b1f4dd89f5350966feb528d",
        "name": "Admin Auth",
        "type": "Local"
        },
        "primary_auth_server_id": "4a02312f7b1f4dd89f5350966feb528d",
        "realm": "ZTA Admin Users",
        "url_pattern": "*/login/admin/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "f87680b7292242b9af247fec1b17347c",
        "sign_in_policy_name": "Admin Signin"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "52b2377af03d43298d396c1dac50301d",
        "is_default": false,
        "name": "cxo",
        "rules": [
        {
        "allow_delete": true,
        "attribute": "is",
        "id": "d07d5d42282a484cac0e9fcb1d9e3c31",
        "is_default": false,
        "name": "cxo",
        "type": "username",
        "value": "cxo*"
        }
        ],
        "sign_in_config": {
        "id": "aefca271a9a74664909811f5df05fd68",
        "policy_type": "admin",
        "primary_auth_server_config": {
        "id": "6d4f27fb5ca841d5a52f2c16c04f7b7f",
        "name": "cxo",
        "type": "Local"
        },
        "primary_auth_server_id": "6d4f27fb5ca841d5a52f2c16c04f7b7f",
        "realm": "cxo",
        "url_pattern": "*/login/cxo/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "aefca271a9a74664909811f5df05fd68",
        "sign_in_policy_name": "cxo"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "f8ec4120e92b40ce824a328ce8828de8",
        "is_default": false,
        "name": "cxoics",
        "rules": [
        {
        "allow_delete": true,
        "attribute": "is",
        "id": "d07d5d42282a484cac0e9fcb1d9e3c31",
        "is_default": false,
        "name": "cxo",
        "type": "username",
        "value": "cxo*"
        }
        ],
        "sign_in_config": {
        "id": "28c7137a53d34de68b516caecebf8bcc",
        "policy_type": "admin",
        "primary_auth_server_config": {
        "id": "a9e08f5f7c354ac6a290fc08046947fd",
        "name": "cxoics",
        "type": "Local"
        },
        "primary_auth_server_id": "a9e08f5f7c354ac6a290fc08046947fd",
        "realm": "cxoics",
        "url_pattern": "*/login/cxoics/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "28c7137a53d34de68b516caecebf8bcc",
        "sign_in_policy_name": "cxoics"
    },
    {
        "allow_delete": false,
        "id": "78ab1bbd743948bb9a4ca4128558b4b6",
        "is_default": true,
        "name": "Enrollment",
        "role_config": {
        "id": "6257484614ad45dfb2146ca5990f7e97",
        "name": "ZTA User Enrollment Role",
        "redirect_url": "/user",
        "type": "user"
        },
        "role_id": "6257484614ad45dfb2146ca5990f7e97",
        "rules": [
        {
        "allow_delete": false,
        "attribute": "is",
        "id": "89e89246cd614a97b246ac4ff773616e",
        "is_default": true,
        "name": "AllEnrollmentUsers",
        "type": "username",
        "value": "*"
        }
        ],
        "sign_in_config": {
        "id": "cb8753de76fb45d581e07d4bc700cb67",
        "policy_type": "enroll",
        "primary_auth_server_config": {
        "id": "dfae63cb445a479785cbab24e3ffdae6",
        "name": "AzureAD-Enroll",
        "type": "SAML (Azure AD)"
        },
        "primary_auth_server_id": "dfae63cb445a479785cbab24e3ffdae6",
        "realm": "ZTA Enrollment",
        "url_pattern": "*/login/enroll/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "cb8753de76fb45d581e07d4bc700cb67",
        "sign_in_policy_name": "Enrollment Signin"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "0002f260f66c49e283425f71197efb7d",
        "is_default": false,
        "name": "KAN_QAADMIN",
        "role_config": {
            "id": "5cf6acc4109f41a5b176ef797422d6df",
            "name": ".Read-Only Administrators",
            "redirect_url": "/admin",
            "type": "admin"
        },
        "role_id": "5cf6acc4109f41a5b176ef797422d6df",
        "rules": [
            {
                "allow_delete": true,
                "attribute": "is",
                "id": "32edd86e75b04b9dbfae2ddbeb5aae7c",
                "is_default": false,
                "name": "KAN_QAADMIN",
                "type": "username",
                "value": "*"
            }
        ],
        "sign_in_config": {
            "id": "52cee518e8cb4c3c9dc542a43f02cc6c",
            "policy_type": "admin",
            "primary_auth_server_config": {
                "id": "12123587ff824be68d38670a3ea06aa8",
                "name": "kan-samlauth",
                "type": "SAML (Azure AD)"
            },
            "primary_auth_server_id": "12123587ff824be68d38670a3ea06aa8",
            "realm": "kan_mfa",
            "secondary_auth_server_config": {
                "id": "3845bf68848146da8f30499b9ee39eb7",
                "name": "totpauth",
                "type": "TOTP"
        },
            "secondary_auth_server_id": "3845bf68848146da8f30499b9ee39eb7",
            "url_pattern": "*/login/QA/",
            "use_as_saml_idp": false
        },
        "sign_in_policy_id": "52cee518e8cb4c3c9dc542a43f02cc6c",
        "sign_in_policy_name": "kan_mfa"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "efb26b761c1f4ce999fe4f72f56cc3b2",
        "is_default": false,
        "name": "netadmin",
        "role_config": {
            "id": "985ed98560e64c9dac40b4446218f30b",
            "name": ".CxOs",
            "redirect_url": "/admin",
            "type": "admin"
        },
        "role_id": "985ed98560e64c9dac40b4446218f30b",
        "rules": [
            {
                "allow_delete": true,
                "attribute": "is",
                "id": "6ef26f4550a04f3a9c5b42620e8fab95",
                "is_default": false,
                "name": "netadmin",
                "type": "username",
                "value": "*"
            }
        ],
        "sign_in_config": {
            "id": "da1cec892b724513817c9f2a4b154b63",
            "policy_type": "admin",
            "primary_auth_server_config": {
                "id": "3812afcbf54c42eebf389ca4d7362c84",
                "name": "net-admin",
                "type": "Local"
            },
        "primary_auth_server_id": "3812afcbf54c42eebf389ca4d7362c84",
        "realm": "netadmin",
        "url_pattern": "*/login/netadmin/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "da1cec892b724513817c9f2a4b154b63",
        "sign_in_policy_name": "netadmin"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "94c5b334df81427ab1f4b41af307a7e7",
        "is_default": false,
        "name": "netics",
        "role_config": {
            "id": "30c586d61c6e43fcbc79f5b405b6b5bd",
            "name": ".Network Administrators",
            "redirect_url": "/admin",
            "type": "admin"
        },
        "role_id": "30c586d61c6e43fcbc79f5b405b6b5bd",
        "rules": [
            {
            "allow_delete": true,
            "attribute": "is not",
            "id": "c3de640193af456d9774bb8b1a7848aa",
            "is_default": false,
            "name": "non-matching",
            "type": "username",
            "value": "user7"
            }
        ],
        "sign_in_config": {
        "id": "4756d7f1e19749cfb69ac3a124355d68",
        "policy_type": "admin",
        "primary_auth_server_config": {
            "id": "b3c9c1655b0544cab9daada76e7e10c1",
            "name": "networkics",
            "type": "Local"
            },
        "primary_auth_server_id": "b3c9c1655b0544cab9daada76e7e10c1",
        "realm": "networkics",
        "url_pattern": "*/login/netics/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "4756d7f1e19749cfb69ac3a124355d68",
        "sign_in_policy_name": "networkics"
    },
    {
        "allow_delete": false,
        "description": "",
        "id": "d4c923047a8248e28341c04b6e606b2c",
        "is_default": false,
        "name": "non-matching",
        "role_config": {
            "id": "dd29dd3f209042a58b1a82cb6ebeee10",
            "name": "non-matching",
            "redirect_url": "/user",
            "type": "user"
        },
        "role_id": "dd29dd3f209042a58b1a82cb6ebeee10",
        "rules": [
            {
            "allow_delete": true,
            "attribute": "is not",
            "id": "c3de640193af456d9774bb8b1a7848aa",
            "is_default": false,
            "name": "non-matching",
            "type": "username",
            "value": "user7"
            }
        ],
        "sign_in_config": {
        "id": "21ff78e93fda4b0c86e7af96dfa75680",
        "policy_type": "user",
        "primary_auth_server_config": {
        "id": "bc3a6edc5c924c05ac2849045761ac1b",
        "name": "AzureAD-Auth",
        "type": "SAML (Azure AD)"
        },
        "primary_auth_server_id": "bc3a6edc5c924c05ac2849045761ac1b",
        "realm": "ZTA Users",
        "url_pattern": "*/login/",
        "use_as_saml_idp": false
        },
        "sign_in_policy_id": "21ff78e93fda4b0c86e7af96dfa75680",
        "sign_in_policy_name": "User Signin"
    }
  ],
"offset": 0,
"total": 16
}

Salient Tasks

Copy
Get
/api/gateways/salient-tasks
Response
{
    "items": [
    {
     "gateway_id": "d5da0263a8d94fd9823ba5568db397b1"
    },
    {
     "gateway_id": "0183c3d395944b5691c7579470c7181d"
    }
  ],
 "total": 2
}

Custom Domains Summary

Copy
Get
/api/custom-domains/summary
Response
{
    "items": [
    {
    "details": [
        {
         "domain_name": "tenant1.cedar.pzt.dev.perfsec.com",
         "type": "TLS"
        },
        {
         "domain_name": "tenant1.e.cedar.pzt.dev.perfsec.com",
         "type": "mTLS"
        }
    ],
     "domain": "tenant1.cedar.pzt.dev.perfsec.com",
     "status": "Active"
    }
  ],
"total": 1
}

Trusted Server

Copy
Get
/api/certificates/trusted-server
Respone
{
"items": [
       {
        "certificate": "-----BEGIN CERTIFICATE-----\nMIIDoDCCAoigAwIBAgIQIPEHTWdoiJcV7NzjWYaX0DANBgkqhkiG9w0BAQsFADBq\nMQswCQYDVQQGEwJJTjEPMA0GA1UECgwGZTJlLXFhMRAwDgYDVQQLDAd0ZXN0aW5n\nMRIwEAYDVQQIDAlLYXJuYXRha2ExEDAOBgNVBAMMB2UyZXRlc3QxEjAQBgNVBAcM\nCUJhbmdhbG9yZTAeFw0yMTA1MjUxNDI3NDVaFw0zMTA1MjUxNTI3NDVaMGoxCzAJ
        \nBgNVBAYTAklOMQ8wDQYDVQQKDAZlMmUtcWExEDAOBgNVBAsMB3Rlc3RpbmcxEjAQ\nBgNVBAgMCUthcm5hdGFrYTEQMA4GA1UEAwwHZTJldGVzdDESMBAGA1UEBwwJQmFu\nZ2Fsb3JlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxf8UvrRkrcnQ\nURWk6LbSTXGyobdA2i4wzk/yIEUJahGG4Q0zovBZZgKZcfjNDg4V/C5hiCiWU3V6\nsGrKHrS4mMkVNmyGdJ2x7+P31vbf/KevKqWfR59ltYeYp1kqpbEdXCxNkiDdCKg5\ngg4yc69BFTacaLEH0pYFseTk9n359qTF0P5lstx2iCjYGSm1mfTX1S0aP4aoqW2B\nVHQozDtW0SHhbnDapTYto29Q/2m+CF2FQow/iL11sdPRW0+RzD9sXTzj84fwL6Sf\npe7UxxPpOcG5B2R1/m+yg6ob6LVrT+CSBFT+UABbQCW5dtGkYN9eBfpPm/SKChkT\n0I8FCKFUCQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTkDXFi\nN3ysCKpXT7VYML+MWcHRsTAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQAD
        \nggEBAFF7gDjY1fthxUbjilp2REqxMuuKmNXrGHshNIHtSZkiBwvcGBlZgcRsj/wO\n1joy2otLDubIG5IYdAZK68uSvOsepXLFGKVKgSu4oPbA6ZIt2yNWbcooMuGxbM6W\nbIWAxbqdbitIE63mCWB8K4nKgm+A0IzTXxyIUylEcHACOO3LbM49eTCzyfJ++TJb\nS3zzp1ilW4eD2SRg34dRg1jwOAIRcLqhD6PPwEHEckCvki4EdAk12s9lm0+LY2y5\n2iEyvMzLjUlpSKliEb6cF+YIUiWPqcDoq+oCngOKrPKS9IpbuArp2PDBbfQAYlMD
        \ngF3NJWL9WThCpRvl+kpeAibXlvQ=\n-----END CERTIFICATE-----",
        "created": "2021-
        "created": "2021-05-26T06:54:48Z",
        "expires": "2031-05-25T15:27:45Z",
        "id": "bdf26a86b79c4e00a9d68e6b3575cb0e",
        "issuer_common_name": "e2etest",
        "not_valid_before": "2021-05-25T14:27:45Z",
        "subject_common_name": "e2etest"
      }
  ],
"total": 1
}

Roles

Copy
Get
/api/v1/policies/roles
Response 
{
"items": [
    {
        "allow_delete": false,
        "description": "All pages accessible",
        "id": "bcebb37e1e85405db98f188cb4a7cca9",
        "is_default": true,
        "name": ".Administrators",
        "redirect_url": "/admin",
        "type": "admin"
    },
    {
        "allow_delete": true,
        "description": "Insights Dashboards, Logs , Reports & Subscriptions",
        "id": "985ed98560e64c9dac40b4446218f30b",
        "is_default": true,
        "name": ".CxOs",
        "redirect_url": "/admin",
        "type": "admin"
    },
    {
        "allow_delete": true,
        "description": "Gateways Overview and Logs only",
        "id": "30c586d61c6e43fcbc79f5b405b6b5bd",
        "is_default": true,
        "name": ".Network Administrators",
        "redirect_url": "/admin",
        "type": "admin"
    },
    {
        "allow_delete": true,
        "description": "All except Workflows , Subscriptions , Upgrade & Admin Role",
        "id": "5cf6acc4109f41a5b176ef797422d6df",
        "is_default": true,
        "name": ".Read-Only Administrators",
        "redirect_url": "/admin",
        "type": "admin"
    },
    {
        "allow_delete": true,
        "id": "8211c9d25d5d40e6a7ec813881482a22",
        "is_default": false,
        "name": "acccounts-erollment",
        "redirect_url": "/user",
        "type": "user"
    },
    {
        "allow_delete": true,
        "id": "0439999bdf3d43188126ea4fd8c24638",
        "is_default": false,
        "name": "accounts-auth",
        "redirect_url": "/user",
        "type": "user"
    },
    {
        "allow_delete": true,
        "description": "",
        "id": "7109aa170469425483014bd2372c14b8",
        "is_default": false,
        "name": "NewROA",
        "redirect_url": "/admin",
        "type": "admin"
    },
    {
        "allow_delete": true,
        "id": "dd29dd3f209042a58b1a82cb6ebeee10",
        "is_default": false,
        "name": "non-matching",
        "redirect_url": "/user",
        "type": "user"
    },
    {
        "allow_delete": true,
        "id": "f7c19a90c340456595e87003da092eae",
        "is_default": false,
        "name": "sales-auth",
        "redirect_url": "/user",
        "type": "user"
    },
    {
        "allow_delete": true,
        "id": "5347999c673649d7b273f7600cd38b23",
        "is_default": false,
        "name": "sales-enrollment",
        "redirect_url": "/user",
        "type": "user"
    },
    {
        "allow_delete": true,
        "id": "6257484614ad45dfb2146ca5990f7e97",
        "is_default": true,
        "name": "ZTA User Enrollment Role",
        "redirect_url": "/user",
        "type": "user"
    },
    {
        "allow_delete": true,
        "id": "629d15eb93524f35a75b8dfc74fa833d",
        "is_default": true,
        "name": "ZTA User Role",
        "redirect_url": "/user",
        "type": "user"
    }
   ],
"total": 12
}

Address

Copy
Get
/api/locations/address-ranges
Response
{
"items": [
    {
        "city": {
            "id": 99,
            "name": "Bengaluru"
        },
        "country": {
            "id": 70,
            "name": "India"
        },
        "id": "b278a5d7b72740e2a74df5574df7f066",
        "network": "<IP Address>/32",
        "state": {
            "id": 1178,
            "name": "Karnataka"
        }
    },
    {
        "city": {
            "id": 99,
            "name": "Bengaluru"
        },
        "country": {
            "id": 70,
            "name": "India"
        },
        "id": "6bb80619d0774836afc4216363252492",
        "network": "<IP Address>/32",
        "state": {
            "id": 1178,
            "name": "Karnataka"
        }
    },
    {
        "city": {
            "id": 100,
            "name": "Mumbai"
        },
        "country": {
            "id": 70,
            "name": "India"
        },
        "id": "b313b5612dd74584b19fe1eec865818f",
        "network": "<IP Address>/32",
        "state": {
            "id": 1177,
            "name": "Maharashtra"
        }
    },
    {
        "city": {
            "id": 100,
            "name": "Mumbai"
        },
        "country": {
            "id": 70,
            "name": "India"
        },
        "id": "3e7d1ab0e4d54c6bae1ae6ddaf389f24",
        "network": "<IP Address>/32",
        "state": {
            "id": 1177,
            "name": "Maharashtra"
        }
    },
    {
        "city": {
            "id": 68,
            "name": "Moscow"
        },
        "country": {
            "id": 100,
            "name": "Russia"
        },
        "id": "4f616a0bd8394baeb7ef5d0454d59a39",
        "network": "<IP Address>/32",
        "state": {
            "id": 593,
            "name": "Moscow"
        }
    }
  ],
"total": 5
}

Installation Packages

Copy
Get
api/clients/packages
Response
{
"auto_update": {
    "esap": true,
    "pulse_client": false
    },
"items": [
    {
        "id": "8d4842f1377a4c6db737e3cd7e220bfe",
        "pinned": false,
        "release_date": "2022-11-23T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "esap",
        "version": "4.0.5"
    },
    {
        "id": "af5983f20d88410796d8007a0752ba90",
        "pinned": false,
        "release_date": "2022-03-11T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "esap",
        "version": "3.9.6"
    },
    {
        "id": "b0b9c41d07d94aa4b80b27d70ab2e63d",
        "pinned": false,
        "release_date": "2022-01-20T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "esap",
        "version": "3.9.3"
    },
    {
        "id": "2e75ebd8c2b3403daca2100a232926a0",
        "pinned": false,
        "release_date": "2021-09-06T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "esap",
        "version": "3.8.5"
    },
    {
        "id": "b1b51f7577844199b22dc3c3901c7276",
        "pinned": false,
        "release_date": "2022-11-30T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "pulse_client",
        "version": "22.3R1-18029"
    },
    {
        "id": "464f2b6719aa4e26966f2e103850d29b",
        "pinned": true,
        "release_date": "2022-07-07T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "pulse_client",
        "version": "22.2R1-1295"
    },
    {
        "id": "f7e6fddbede94ac09c96c58b1aeea0ce",
        "pinned": false,
        "release_date": "2022-03-28T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "pulse_client",
        "version": "9.1R14-15521"
    },
    {
        "id": "32d3d32b5fe949e3be961391a08198fc",
        "pinned": false,
        "release_date": "2022-01-21T11:18:12Z",
        "release_notes_url": "https://help.ivanti.com/ps/legacy/PULSE-CLIENT/PULSE-SECURE-CLIENT-DESKTOP/9.1RX/ps-pulse-9.1r7-releasenotes.pdf",
        "state": "active",
        "type": "pulse_client",
        "version": "9.1R13-13865"
    }
  ],
"total": 8
}

Install ESAP

Copy
https://tenant1.cedar.pzt.dev.perfsec.com/api/pcs-configs/multinode/install_esap
Request
{
    "gatewayIds":["4cce0aad63e74ec695d981a06530bb7f"],
    "clusterIds":[],
    "version":"4.0.5"
}
Response

    "message": "Successful upgrade"
}

Upgrade

Copy
Get
 
Request
api/gateways/packages?gateway_type=pcs_gateway&package_type=upgrade
{
    "items": [
    {
        "appliance_version": "22.2R1-480",
        "created": "2022-06-30T12:37:49Z",
        "gateway_type": "pcs_gateway",
        "group_id": "d71c033b923a48b191441e7947bc9677",
        "id": "d5e8bd43f68b4a52b95854e7fa7c8509",
        "location": {
            "name": "blr"
        },
    ],
"total": 1
}

Config Groups

Copy
Get
api/pcs-configs/config-groups
{
    "items": [
    {
    "block_types": [
        "signin.auth-servers"
        ],
    "clusters": [],
    "gateways": [],
    "id": "3e521380c99a4543a87a0ea756f2b2a6",
    "last_updated": "2022-11-02T15:09:00Z",
    "name": "E2E-New-app",
    "version": "22.1R1"
    },
  ]
}

Auth Server

Copy
Get
Request
/api/v1/policies/auth-servers
{
    "auth_servers": [
        {
        "allow_delete": true,
        "id": "ba6bcd6bc42649e98366d17fe1ffd3e3",
        "is_default": false,
        "local_config": {
            "total_users": 0
            },
        "name": "account-auth",
        "type": "SAML (Azure AD)"
        },
    ],
"total": 1
}

Licenses

Copy
Get
/api/licenses/subscriptions
Response
{
"items": [
    {
        "category": "PCS",
        "display_name": "21.x PCS",
        "end_date": "2022-12-01T00:00:00Z",
        "features": {
        "allow_support": true,
        "named_users": 100000
        },
    "id": "cfc9ec4b-788a-484f-954d-4f736069021e",
    "serial_number": "11-4038621",
    "start_date": "2021-01-01T00:00:00Z"
    },
    {
        "category": "ZTA",
        "display_name": "zta subscription",
        "end_date": "2025-12-04T00:00:00Z",
        "features": {
        "allow_support": true,
        "named_users": 50000
        },
    "id": "94f5904a-113d-416b-9aa4-3b0755632c8c",
    "serial_number": "abc-1200AB",
    "start_date": "2022-01-01T00:00:00Z"
  }
],
"total": 2
}

Delete one or more named users from the nSA

Copy
Del
/api/licenses/subscribers/products/pcs/delete/named-users
  
   resp = r.post(rest_api, verify=False, data = json.dumps(users_to_delete_list), 

headers={'Content-type': 'application/json'})
    print("Response code: "  + str(resp.status_code))

    #print("Response content: " + str(resp.content))    

    if resp.status_code == 202:

        print("Successfully triggered deletion of users: " + str(users_to_delete_list))
        result = True
    else:
        
    print("Error in deleting users: " + str(users_to_delete_list))        

    
return result