### Example Response for Starlink Pool Quota Update Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc An example of a JSON response when updating a Starlink pool's quota. It includes fields for response code, caller reference, server reference, and an optional message. ```json { "resp_code": "SUCCESS", "caller_ref": "", "server_ref": "", "message": "Quota updated successfully" } ``` -------------------------------- ### Top-up eSIM Data Plan via API (Bash) Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt This snippet demonstrates how to top-up an eSIM data plan for devices using a cURL command. It requires an access token and specifies the product ID, device IDs, and quantity. The response includes transaction details and confirmation. ```bash curl -X POST \ -H "Authorization: Bearer [ACCESS_TOKEN]" \ -H "Content-Type: application/json" \ -d '{ "data": { "store_product_id": "global_1gb", "device_ids": [78901, 78902], "quantity": 2 } }' \ https://api.ic.peplink.com/rest/o/12345/esim/topup # Response { "resp_code": "SUCCESS", "ref": "topup_request_def456", "message": "eSIM top-up initiated", "data": { "transaction_id": "txn_789012", "devices_updated": 2, "total_cost": 10.00, "currency": "USD", "new_pool_balance": 40.50 } } ``` -------------------------------- ### Peplink API: Get Custom Captive Portals (Request) Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc This snippet shows a basic example of a GET request to retrieve custom captive portals for a given organization and group. It highlights the path parameters required. ```http GET /rest/o/{organization_id}/g/{group_id}/custom_portals ``` -------------------------------- ### POST /rest/o/{organization_id}/g/{group_id}/d/{device_id}/tools/wan_analysis_server/start Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Starts a device's WAN performance analysis server. ```APIDOC ## POST /rest/o/{organization_id}/g/{group_id}/d/{device_id}/tools/wan_analysis_server/start ### Description Start device's WAN performance analysis server. ### Method POST ### Endpoint /rest/o/{organization_id}/g/{group_id}/d/{device_id}/tools/wan_analysis_server/start ### Parameters #### Path Parameters - **organization_id** (String) - Required - The organization ID. - **group_id** (int) - Required - The group ID. - **device_id** (int) - Required - The device ID. #### Request Body - **data** (String) - Required - Raw data for the request. ``` -------------------------------- ### Get MediaFast Report CSV - GET /rest/o/{organization_id}/g/{group_id}/mediafast_usages/csv Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a MediaFast usage report in CSV format. This endpoint requires organization_id and group_id as path parameters. Optional query parameters include start date, end date, report type, and sorting preferences. ```curl curl -X GET \ 'https://your-peplink-api.com/rest/o/{organization_id}/g/{group_id}/mediafast_usages/csv?start=yyyy-MM-dd&end=yyyy-MM-dd&type=summary&report_type=bandwidth&no_of_record=10&keyword=example&search=test&order_by=bandwidth_saved&order=asc' \ -H 'Accept: text/csv' ``` -------------------------------- ### Get Daily Client Count with cURL Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt Retrieves historical daily client count for a group using a GET request. This data is useful for capacity planning and trend analysis. It requires the organization ID, group ID, and a date range (start and end). The response provides daily peak, average, and minimum client counts. ```bash curl -H "Authorization: Bearer [ACCESS_TOKEN]" \ "https://api.ic.peplink.com/rest/o/12345/g/456/daily_client_count?start=2025-10-01T00:00:00&end=2025-10-08T23:59:59" # Response { "resp_code": "SUCCESS", "data": { "group_id": 456, "group_name": "San Francisco Branch", "daily_counts": [ { "date": "2025-10-01", "peak_count": 156, "average_count": 98, "min_count": 12 }, { "date": "2025-10-02", "peak_count": 178, "average_count": 102, "min_count": 15 }, { "date": "2025-10-03", "peak_count": 145, "average_count": 87, "min_count": 8 } ] } } ``` -------------------------------- ### Device Response Sample Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Example structure for a response containing device information. ```APIDOC ## Device Response Sample ```json { "resp_code": "", "caller_ref": "", "server_ref": "", "message": "", "data": { "ticket_id": "", "devices": [ { "id": 0, "group_id": 0, "group_name": "", "sn": "", "name": "", "status": "", "usage": 0.0, "tx": 0.0, "rx": 0.0, "product_id": 0, "client_count": 0, "fw_ver": "", "last_online": "", "offline_at": "", "first_appear": "", "lan_mac": "", "config_rollback": true, "config_rollback_date": "", "ic2_config_apply_locked": true, "outstanding_patch_ids": [ "" ], "device_config_apply_locked": true, "sp_default": true, "product_name": "", "product_code": "", "mv": "", "tags": [ "" ], "tag_info": [ { "id": 0, "name": "" } ], "note": "", "longitude": 0.0, "latitude": 0.0, "address": "", "location_timestamp": "", "follow_loc_dev": 0, "follow_loc_dev_info": { "id": 0, "sn": "", "name": "", "onlineStatus": "" }, "isStatic": true, "expiry_date": "", "sub_expiry_date": "", "prime_expiry_date": "", "prime_type": 0, "expired": true, "sub_expired": true, "gps_support": true, "gps_exist": true, "support_ssid_count": 0.0, "radio_modules": [ { "module_id": 0, "frequency_band": "", "active_frequency_band": "" } ] } ] } } ``` ``` -------------------------------- ### GET /rest/o/{organization_id}/starlink_pools/usages/{profile_id}/{report_type} Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves Starlink pool usage data for a specified profile and report type. You can filter the results by start and end times and choose to include detailed profile information. ```APIDOC ## GET /rest/o/{organization_id}/starlink_pools/usages/{profile_id}/{report_type} ### Description Retrieves Starlink pool usage data for a specified profile and report type. You can filter the results by start and end times and choose to include detailed profile information. ### Method GET ### Endpoint `/rest/o/{organization_id}/starlink_pools/usages/{profile_id}/{report_type}` ### Parameters #### Path Parameters - **organization_id** (String) - Required - The ID of the organization. - **profile_id** (int) - Required - The ID of the profile. - **report_type** (String) - Required - The type of report. Enum: `hourly`, `daily`, `monthly` #### Query Parameters - **start** (String) - Optional - The start of the reporting period. Format: `yyyy-MM-dd'T'HH:mm:ss` - **end** (String) - Optional - The end of the reporting period. Format: `yyyy-MM-dd'T'HH:mm:ss` - **include_detail** (Boolean) - Optional - Whether to include profile details. ### Response #### Success Response (200) - **resp_code** (string) - Response code Enum:SUCCESS, INVALID_INPUT, INTERNAL_ERROR, PENDING - **caller_ref** (string) - Caller reference identifier, auto generated if not specified - **server_ref** (string) - Server reference identifier, generated on server side - **message** (string) - Response message - **data** (starlink_pool_usages) - Response data object - **datetime** (string) - Report date, in YYYY-MM-DD'T'HH:MM:SS format - **date_from** (string) - Report date from, in YYYY-MM-DD'T'HH:MM:SS format - **date_to** (string) - Report date to, in YYYY-MM-DD'T'HH:MM:SS format - **rx** (number) - Upload usage (in MB) - **tx** (number) - Download usage (in MB) #### Response Example ```json { "resp_code": "SUCCESS", "caller_ref": "", "server_ref": "", "message": "", "data": { "datetime": "2023-10-27T10:00:00", "date_from": "2023-10-27T09:00:00", "date_to": "2023-10-27T10:00:00", "rx": 1024.5, "tx": 2048.75 } } ``` ``` -------------------------------- ### GET /rest/o/{organization_id}/esim/sa/products/all Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a list of all available eSIM products from the eStore, including their specifications and pricing. ```APIDOC ## GET /rest/o/{organization_id}/esim/sa/products/all ### Description Retrieves a list of all available eSIM products from the eStore, including their specifications and pricing. ### Method GET ### Endpoint /rest/o/{organization_id}/esim/sa/products/all ### Parameters #### Path Parameters - **organization_id** (string) - Required - The unique identifier for the organization. ### Request Body This endpoint does not require a request body. ### Request Example (No request body) ### Response #### Success Response (200) - **resp_code** (string) - Response code Enum:SUCCESS, INVALID_INPUT, INTERNAL_ERROR, PENDING. - **caller_ref** (string) - Caller reference identifier, auto generated if not specified. - **server_ref** (string) - Server reference identifier, generated on server side. - **message** (string) - Optional - Response message. - **data** (array[esim_estore_products_response]) - Response data object containing a list of eSIM products. **esim_estore_products_response Object:** - **price_unit** (string) - Currency code used for pricing. - **sfc_usage** (String) - Amount of data usage allocated for the product. - **listed_price** (String) - Original selling price of the eStore product before any discount. - **product_id** (String) - Unique identifier for the eStore product. - **esim_data** (String) - Total data allowance included with the eSIM product. - **validity** (String) - Validity period of the eSIM product. - **sfc_speed** (String) - Data speed or bandwidth associated with the product. - **product_name** (String) - Display name or title of the eStore product. - **discounted_price** (String) - Final price after applying discounts or promotions. #### Response Example ```json { "resp_code": "SUCCESS", "caller_ref": "", "server_ref": "", "message": "", "data": [ { "price_unit": "USD", "sfc_usage": "10GB", "listed_price": "20.00", "product_id": "prod_12345", "esim_data": "10GB", "validity": "30 days", "sfc_speed": "100 Mbps", "product_name": "Basic eSIM Plan", "discounted_price": "18.00" } ] } ``` ``` -------------------------------- ### Get Configuration Files List Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a list of configuration backup files for a specified device. ```APIDOC ## GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/config_backup ### Description Retrieves a list of configuration backup files for a specified device. ### Method GET ### Endpoint /rest/o/{organization_id}/g/{group_id}/d/{device_id}/config_backup ### Parameters #### Path Parameters - **organization_id** (String) - Required - The ID of the organization. - **group_id** (int) - Required - The ID of the group. - **device_id** (int) - Required - The ID of the device. #### Query Parameters - **start** (String) - Optional - Start date and time for filtering backups (Format: yyyy-MM-dd'T'HH:mm:ss). - **end** (String) - Optional - End date and time for filtering backups (Format: yyyy-MM-dd'T'HH:mm:ss). - **type** (String) - Optional - Type of backups to retrieve. Enum: all, wireless. ### Response #### Success Response (200) - **resp_code** (string) - Response code. Enum: SUCCESS, INVALID_INPUT, INTERNAL_ERROR, PENDING. - **caller_ref** (string) - Caller reference identifier. - **server_ref** (string) - Server reference identifier. - **message** (string) - Response message. - **data** (array[config_files]) - Response data object. - **date** (string) - Backup date. - **file_list** (array[config_file]) - List of configuration files. - **size** (integer) - File size in bytes. - **time** (string) - Backup time. - **id** (integer) - File ID for download. #### Response Example ```json { "resp_code": "", "caller_ref": "", "server_ref": "", "message": "", "data": [ { "date": "", "file_list": [ { "size": 0, "time": "", "id": 0 } ] } ] } ``` ``` -------------------------------- ### Get Device Top Manufacturers CSV - Python Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's top client devices in CSV format. Requires organization_id, group_id, and device_id. Optional parameters include start and end dates, and type (all or wireless). ```python import requests def get_top_manufacturers_csv(organization_id, group_id, device_id, start=None, end=None, type='all'): url = f"/rest/o/{organization_id}/g/{group_id}/d/{device_id}/top_manufacturers/csv" params = {'start': start, 'end': end, 'type': type} response = requests.get(url, params=params) response.raise_for_status() # Raise an exception for bad status codes return response.text ``` -------------------------------- ### Get Device Location in CSV Format Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's location data in CSV format. This endpoint is suitable for exporting location history for analysis or integration with other systems. Requires specifying organization, group, and device IDs, with optional start and end times. ```bash GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/loc/csv?start=yyyy-MM-dd'T'HH:mm:ss&end=yyyy-MM-dd'T'HH:mm:ss ``` -------------------------------- ### Convert and Apply Configuration File Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Converts a device configuration file and applies it to a compatible target device. ```APIDOC ## POST /rest/o/{organization_id}/g/{group_id}/d/{device_id}/config_backup/{id}/target/{target_device_id}/convert ### Description Converts a device configuration file and applies it to a compatible target device. ### Method POST ### Endpoint /rest/o/{organization_id}/g/{group_id}/d/{device_id}/config_backup/{id}/target/{target_device_id}/convert ### Parameters #### Path Parameters - **organization_id** (String) - Required - The ID of the organization. - **group_id** (int) - Required - The ID of the group. - **device_id** (int) - Required - The ID of the source device. - **id** (int) - Required - The ID of the configuration file. - **target_device_id** (int) - Required - The ID of the target device to apply the configuration to. ### Response #### Success Response (200) - The response content type is `application/json`. ``` -------------------------------- ### Get Device WAN Usage CSV - Python Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's WAN usage data in CSV format. Requires organization_id, group_id, and device_id. Optional parameters include start and end dates. The response is a CSV string with 'Day' and 'Usage (MB)' columns. ```python import requests def get_wan_usage_csv(organization_id, group_id, device_id, start=None, end=None): url = f"/rest/o/{organization_id}/g/{group_id}/d/{device_id}/usage/csv" params = {'start': start, 'end': end} response = requests.get(url, params=params) response.raise_for_status() # Raise an exception for bad status codes return response.text ``` -------------------------------- ### POST /config_backup/{backup_id}/restore Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt Restore a device to a previous configuration backup. Applies a saved configuration backup to rollback changes or recover from misconfigurations. ```APIDOC ## Restore Device Configuration ### Description Restore a device to a previous configuration backup. Applies a saved configuration backup to rollback changes or recover from misconfigurations. ### Method POST ### Endpoint `/rest/o/{organization_id}/g/{group_id}/d/{device_id}/config_backup/{backup_id}/restore` ### Parameters #### Path Parameters - **organization_id** (integer) - Required - The ID of the organization. - **group_id** (integer) - Required - The ID of the group. - **device_id** (integer) - Required - The ID of the device. - **backup_id** (integer) - Required - The ID of the configuration backup to restore. ### Request Example ```bash curl -X POST \ -H "Authorization: Bearer [ACCESS_TOKEN]" \ https://api.ic.peplink.com/rest/o/12345/g/456/d/78901/config_backup/5000/restore ``` ### Response #### Success Response (200) - **resp_code** (string) - "SUCCESS" indicates the request was processed. - **ref** (string) - A reference ID for the restore operation. - **message** (string) - A human-readable message about the operation status. - **data** (object) - Contains details about the restore operation. - **backup_id** (integer) - The ID of the backup that was restored. - **estimated_completion** (string) - The estimated time of completion for the restore process (ISO 8601 format). #### Response Example ```json { "resp_code": "SUCCESS", "ref": "restore_request_xyz789", "message": "Configuration restore initiated. Device will reboot.", "data": { "backup_id": 5000, "estimated_completion": "2025-10-08T16:05:00" } } ``` ``` -------------------------------- ### Get Configuration Backups using cURL Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt Retrieves a list of configuration backups for a device. This endpoint returns available configuration backups with timestamps, enabling restoration and configuration management. Requires an authorization token. ```bash curl -H "Authorization: Bearer [ACCESS_TOKEN]" \ https://api.ic.peplink.com/rest/o/12345/g/456/d/78901/config_backup ``` -------------------------------- ### Get Device Daily Client Count CSV - Peplink API Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's daily client count in CSV format. This endpoint requires organization, group, and device IDs. Optional query parameters include start, end, and type for filtering the data. ```plaintext GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/daily_client_count/csv ``` -------------------------------- ### Device Response Sample Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc A sample response structure for retrieving device information. ```APIDOC ## Device Response Sample ### Response Structure ```json { "resp_code": "", "caller_ref": "", "server_ref": "", "message": "", "data": { "client_id": "", "mac": "", "device": { "id": 0, "group_id": 0, "group_name": "", "sn": "", "name": "", "status": "", "usage": 0.0, "tx": 0.0, "rx": 0.0, "product_id": 0, "client_count": 0, "fw_ver": "", "last_online": "", "offline_at": "", "first_appear": "", "lan_mac": "", "config_rollback": true, "config_rollback_date": "", "ic2_config_apply_locked": true, "outstanding_patch_ids": [""], "device_config_apply_locked": true, "sp_default": true, "product_name": "", "product_code": "", "mv": "", "tags": [""], "tag_info": [ { "id": 0, "name": "" } ], "note": "", "longitude": 0.0, "latitude": 0.0, "address": "", "location_timestamp": "", "follow_loc_dev": 0, "follow_loc_dev_info": { "id": 0, "sn": "", "name": "", "onlineStatus": "" }, "isStatic": true, "expiry_date": "", "sub_expiry_date": "", "prime_expiry_date": "", "prime_type": 0, "expired": true, "sub_expired": true, "gps_support": true, "gps_exist": true, "support_ssid_count": 0.0, "radio_modules": [ { "module_id": 0, "frequency_band": "", "active_frequency_band": "" } ], "group_type": "", "device_type": "", "last_sync_date": "", "v6_license": "", "uptime": 0, "uptime_appear": "", "fw_pending_trial_round": 0 } } } ``` ``` -------------------------------- ### Get Device Location in KML Format Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's location data in KML format. KML is an XML-based file format used to display geographic data in applications like Google Earth. Requires organization, group, and device IDs, with an optional start timestamp. ```bash GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/loc/kml?start=yyyy-MM-dd'T'HH:mm:ss ``` -------------------------------- ### Get Device Location in GPX Format Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Fetches a device's location data in GPX format. GPX is a standard XML format for GPS data, useful for interoperability with GPS devices and software. Requires organization, group, and device IDs, with optional start and end times. ```bash GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/loc/gpx?start=yyyy-MM-dd'T'HH:mm:ss&end=yyyy-MM-dd'T'HH:mm:ss ``` -------------------------------- ### GET /websites/incontrol2_peplink_api Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a detailed overview of a device's status and configuration. ```APIDOC ## GET /websites/incontrol2_peplink_api ### Description Retrieves a detailed overview of a device's status and configuration, including various boolean flags for enabled features, network settings, and status indicators. ### Method GET ### Endpoint /websites/incontrol2_peplink_api ### Parameters None ### Request Example ```json { "example": "No request body needed for GET request." } ``` ### Response #### Success Response (200) - **low_data_usage_mode** (boolean) - Indicates if the device enabled low data usage mode. - **ra_enabled** (boolean) - Indicates if the device enabled remote assistance. - **watchdog_enabled** (boolean) - Indicates if the device enabled hardware watchdog. - **ra_supported** (boolean) - Indicates if the device support remote assistance. - **watchdog_supported** (boolean) - Indicates if the device support hardware watchdog. - **ap_router_mode** (boolean) - Indicates if the device applied router mode, true - router mode, false - bridge mode. - **ssid_mac_list** (array[ssid_mac_list]) - SSID mac list. - **site_id** (string) - PepVPN Site ID. - **handshake_port** (boolean) - (PepVPN / SpeedFusion) Handshake port. - **refuse_legacy** (boolean) - (PepVPN / SpeedFusion) Indicates if the device accept connections from legacy firmware. - **peer_connections** (integer) - PepVPN / SpeedFusion Peer Connections. - **pepvpn_peers** (integer) - Maximum number of PepVPN / SpeedFusion Peer Connections. - **is_default_password** (boolean) - Indicates if default password is used in device web admin. - **is_apply_bulk_config** (boolean) - Indicates if the device is applied with bulk config. - **is_wlan_ap_suspended** (boolean) - Indicates if the device WLAN AP is suspended. - **is_ap_schedule_enabled** (boolean) - Indicates if the device AP schedule enabled. - **is_ha_enabled** (boolean) - Indicates if high availability enabled. - **is_ha_slave** (boolean) - Indicates if the device is a high availability slave unit. - **ha_role** (string) - High Availability Preferred Role (master|slave). - **ha_status** (string) - High Availability Status. - **ha_transition_time** (string) - Last Transition Date and time. - **periph_status_available** (boolean) - Indicates if periph status is available. - **periph_status** (periph_status) - Periph status. - **port_status_available** (boolean) - Indicates if port status is available. - **port_status** (port_status) - Port status. - **gobi_sim_lock_supported** (boolean) - Indicates if the device support SIM lock. - **gobi_sim_locks** (array[string]) - List of SIM lock states. - **poe_supported** (boolean) - Indicates if the device support poe. - **admin_conf** (admin_conf) - Admin configuration object. - **outbound_policy_managed** (boolean) - Indicates if outbound policy is managed. - **firewall_rules_managed** (boolean) - Indicates if firewall rules are managed. - **is_apply_import_lan** (boolean) - Indicates if LAN import is applied. - **is_apply_csv_override** (boolean) - Indicates if CSV override is applied. - **is_wlc_enabled** (boolean) - Indicates if WLC is enabled. - **mgnt_incontrol_vlan_ip** (string) - Management InControl VLAN IP address. - **mgnt_incontrol_vlan** (integer) - Management InControl VLAN ID. - **mgnt_incontrol_vlan_gateway** (string) - Management InControl VLAN gateway. - **mgnt_incontrol_vlan_dns** (array[string]) - List of Management InControl VLAN DNS servers. - **mgnt_incontrol_vlan_connection_type** (string) - Management InControl VLAN connection type. - **mgnt_vlan_ip** (string) - Management VLAN IP address. - **mgnt_vlans** (array[vlan_interface]) - List of management VLAN interfaces. - **max_lacp_group_support** (integer) - Maximum LACP group support. - **max_port_per_lacp_group** (integer) - Maximum ports per LACP group. - **endpoint_support** (boolean) - Indicates if endpoint support is enabled. - **slow_response** (boolean) - Indicates if slow response is detected. - **slow_response_start_time** (string) - Start time of slow response. - **wlan_mac_list** (array[wlan_mac_list]) - WLAN MAC address list. - **slot_module_list** (array[slot_module]) - List of slot module information. - **vlan_managed** (boolean) - (device detail) Indicates if the device has VLAN managed. - **icmg_mvpn** (boolean) - Indicates if MVPN is managed by InControl. - **icmg_wan** (boolean) - Indicates if Device WAN settings is managed by InControl. - **icmg_schedule_reboot** (boolean) - Indicates if the device is applying Device Schedule Reboot. - **icmg_schedule** (boolean) - Indicates if the device is applying Device Schedule. - **icmg_wlan** (boolean) - Indicates if SSID and Radio settings is managed by InControl. - **icmg_portal** (boolean) - Indicates if Captive Portal is managed by InControl. - **icmg_lan** (boolean) - Indicates if Device LAN IP settings is managed by InControl. - **icmg_sdswitch** (boolean) - Indicates if SD Switch is managed by InControl. - **icmg_outbound** (boolean) - Indicates if Outbound Policy managed by InControl. - **icmg_firewall** (boolean) - Indicates if Firewall Rules is managed by InControl. - **icmg_admin** (boolean) - Indicates if device web admin management is managed by InControl. #### Response Example ```json { "low_data_usage_mode": true, "ra_enabled": false, "watchdog_enabled": true, "ra_supported": true, "watchdog_supported": true, "ap_router_mode": true, "ssid_mac_list": [], "site_id": "site123", "handshake_port": true, "refuse_legacy": false, "peer_connections": 5, "pepvpn_peers": 10, "is_default_password": false, "is_apply_bulk_config": true, "is_wlan_ap_suspended": false, "is_ap_schedule_enabled": true, "is_ha_enabled": false, "is_ha_slave": false, "ha_role": "master", "ha_status": "active", "ha_transition_time": "2023-10-27T10:00:00Z", "periph_status_available": true, "periph_status": {}, "port_status_available": true, "port_status": {}, "gobi_sim_lock_supported": true, "gobi_sim_locks": ["lock1", "lock2"], "poe_supported": true, "admin_conf": {}, "outbound_policy_managed": true, "firewall_rules_managed": true, "is_apply_import_lan": false, "is_apply_csv_override": false, "is_wlc_enabled": false, "mgnt_incontrol_vlan_ip": "192.168.1.1", "mgnt_incontrol_vlan": 100, "mgnt_incontrol_vlan_gateway": "192.168.1.254", "mgnt_incontrol_vlan_dns": ["8.8.8.8", "8.8.4.4"], "mgnt_incontrol_vlan_connection_type": "DHCP", "mgnt_vlan_ip": "10.0.0.1", "mgnt_vlans": [], "max_lacp_group_support": 4, "max_port_per_lacp_group": 8, "endpoint_support": true, "slow_response": false, "slow_response_start_time": "", "wlan_mac_list": [], "slot_module_list": [], "vlan_managed": true, "icmg_mvpn": false, "icmg_wan": true, "icmg_schedule_reboot": false, "icmg_schedule": true, "icmg_wlan": true, "icmg_portal": false, "icmg_lan": true, "icmg_sdswitch": false, "icmg_outbound": true, "icmg_firewall": true, "icmg_admin": true } ``` ``` -------------------------------- ### Get Device WAN Quality in CSV Format Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's WAN quality data in CSV format. Requires organization, group, and device IDs. Optional parameters include WAN ID and a time range (start and end dates). The response content type is text/csv. ```shell GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/wan_quality/csv?wan_id={wan_id}&start={start}&end={end} ``` -------------------------------- ### Get Device List (Bash) Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt Retrieves a list of all devices within an organization, with an option to include real-time status. The response provides comprehensive device information, including model, firmware version, operational status, WAN connections, client counts, and bandwidth usage. Query parameters can filter results and specify the number of devices to return. ```bash curl -H "Authorization: Bearer [ACCESS_TOKEN]" \ "https://api.ic.peplink.com/rest/o/12345/d?has_status=true&device_count=100" ``` -------------------------------- ### Get Device Details (Bash) Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt Fetches detailed information for a specific device using its ID. This endpoint returns a complete configuration overview, including status, interface details, client information, and hardware specifications. The request requires an authorization token and the device's group and ID. ```bash curl -H "Authorization: Bearer [ACCESS_TOKEN]" \ https://api.ic.peplink.com/rest/o/12345/g/456/d/78901 ``` -------------------------------- ### Get Hourly DPI Report Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves the hourly DPI (Deep Packet Inspection) usage data for a specific device. This endpoint requires organization, group, and device identifiers, along with optional start and end times for the query. The response includes detailed usage statistics per DPI protocol. ```json { "resp_code": "", "caller_ref": "", "server_ref": "", "message": "", "data": { "name": "", "percentage_size": 0.0, "percentage_packets": 0.0, "packets": 0, "size": 0, "usages": [ { "timestamp": "", "size": 0, "packets": 0 } ] } } ``` -------------------------------- ### Get Configuration Backups Source: https://context7.com/context7/incontrol2_peplink_api/llms.txt Retrieve a list of configuration backups for a device. Returns available configuration backups with timestamps for restoration and configuration management. ```APIDOC ## Get Configuration Backups ### Description Retrieve a list of configuration backups for a device. Returns available configuration backups with timestamps for restoration and configuration management. ### Method GET ### Endpoint `/rest/o/{organization_id}/g/{group_id}/d/{device_id}/config_backup` ### Parameters No parameters required for this endpoint. ### Request Example ```bash curl -H "Authorization: Bearer [ACCESS_TOKEN]" \ https://api.ic.peplink.com/rest/o/12345/g/456/d/78901/config_backup ``` ### Response #### Success Response (200) *The response structure for this endpoint is not provided in the input text.* #### Response Example *The response example for this endpoint is not provided in the input text.* ``` -------------------------------- ### Get Device WAN Usage JSON - Python Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a device's WAN usage data in JSON format. Requires organization_id, group_id, and device_id. Optional parameters include start and end dates. The response includes response code, caller reference, server reference, message, and an array of WAN usage data. ```python import requests def get_wan_usage_json(organization_id, group_id, device_id, start=None, end=None): url = f"/rest/o/{organization_id}/g/{group_id}/d/{device_id}/usage" params = {'start': start, 'end': end} response = requests.get(url, params=params) response.raise_for_status() # Raise an exception for bad status codes return response.json() ``` -------------------------------- ### GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/cp Source: https://incontrol2.peplink.com/api/ic2-api-doc/ic2-api-doc Retrieves a list of captive portals configured for a specific device. Includes options to get a summary or extra fields. ```APIDOC ## GET /rest/o/{organization_id}/g/{group_id}/d/{device_id}/cp ### Description Get a device's captive portal list. This endpoint retrieves a list of captive portals configured for a specific device. You can request a summary view or include additional fields in the response for more detailed information. ### Method GET ### Endpoint /rest/o/{organization_id}/g/{group_id}/d/{device_id}/cp ### Parameters #### Path Parameters - **organization_id** (String) - Required - The ID of the organization. - **group_id** (int) - Required - The ID of the group. - **device_id** (int) - Required - The ID of the device. #### Query Parameters - **summary** (boolean) - Optional - If true, returns a summary of the captive portals. Accepts 'true' or 'false'. - **extra_fields** (String) - Optional - Specifies any additional fields to include in the response. ### Request Example ```json { "example": "GET /rest/o/123/g/456/d/789/cp?summary=true&extra_fields=all" } ``` ### Response #### Success Response (200) - **cp_list** (Array) - A list of captive portals associated with the device. #### Response Example ```json { "example": "{\"cp_list\": [{\"cp_id\": \"cp123\", \"name\": \"Portal A\"}, {\"cp_id\": \"cp456\", \"name\": \"Portal B\"}] }" } ``` ```