### GET /services/prefixes Source: https://api.pletx.net/docs/swagger Lists all possible prefixes assigned to the service. ```APIDOC ## GET /services/prefixes ### Description List of possible prefixes assigned to the service. ### Method GET ### Endpoint /services/prefixes ### Request Example ```json { "query": "/services/prefixes" } ``` ### Response #### Success Response (200) - **api.PrefixesResponse** - The schema for the prefixes response. #### Response Example ```json { "example": "prefixes response" } ``` #### Error Response (400) - **api.ErrorResponse** - The schema for error responses. ``` -------------------------------- ### Get Service Overview Source: https://api.pletx.net/docs/swagger Retrieves an overview of the website's service status and bandwidth data. ```APIDOC ## GET /websites/api_pletx_net/service-overview ### Description Retrieves a comprehensive overview of the service, including bandwidth statistics. ### Method GET ### Endpoint /websites/api_pletx_net/service-overview ### Parameters None ### Request Example ``` GET /websites/api_pletx_net/service-overview ``` ### Response #### Success Response (200) - **bandwidth_data** (array) - An array of bandwidth data objects. - **drop_unit** (string) - The unit for dropped data (e.g., "Kb"). - **pass_unit** (string) - The unit for passed data (e.g., "Kb"). - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "bandwidth_data": [ { "date": "2023-10-27T00:00:00Z", "drop": 100, "pass": 500 } ], "drop_unit": "Kb", "pass_unit": "Kb", "status": "success" } ``` ``` -------------------------------- ### Get Service Prefixes Source: https://api.pletx.net/docs/swagger Retrieves a list of service prefixes for the website. ```APIDOC ## GET /websites/api_pletx_net/service-prefixes ### Description Retrieves a list of IP address prefixes used by the services. ### Method GET ### Endpoint /websites/api_pletx_net/service-prefixes ### Parameters None ### Request Example ``` GET /websites/api_pletx_net/service-prefixes ``` ### Response #### Success Response (200) - **prefixes** (array) - An array of IP address prefix strings. - **message** (string) - A message indicating the success of the operation. - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "prefixes": [ "192.168.1.0/24", "10.0.0.0/8" ], "message": "Service prefixes retrieved successfully", "status": "success" } ``` ``` -------------------------------- ### Get Rules Source: https://api.pletx.net/docs/swagger Retrieves a list of rules associated with the website. ```APIDOC ## GET /websites/api_pletx_net/rules ### Description Retrieves a paginated list of rules. Supports filtering and sorting. ### Method GET ### Endpoint /websites/api_pletx_net/rules ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **size** (integer) - Optional - The number of items per page. - **filter** (string) - Optional - A filter string to apply to the rules. - **sort** (string) - Optional - A field to sort the rules by. ### Request Example ``` GET /websites/api_pletx_net/rules?page=1&size=10&filter=Minecraft ``` ### Response #### Success Response (200) - **data** (array) - An array of rule objects. - **total_rows** (integer) - The total number of rules available. - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "data": [ { "rule_id": 1, "name": "Minecraft", "ip": "192.168.1.1", "port": 80, "protocol": "TCP", "internal_state": "working" } ], "total_rows": 150, "status": "success" } ``` ``` -------------------------------- ### GET /services/overview Source: https://api.pletx.net/docs/swagger Retrieves an overview of the service, including bandwidth data. Supports filtering by overview period and IP address. ```APIDOC ## GET /services/overview ### Description Get an overview of the service including bandwidth data. ### Method GET ### Endpoint /services/overview ### Parameters #### Query Parameters - **overview_period** (string) - Optional - Overview period. Allowed values: "10m", "1h", "1d", "1w". Defaults to "10m". - **query_ip** (string) - Optional - Filter by IP or CIDR (optional). ### Request Example ```json { "query": "/services/overview?overview_period=1h&query_ip=192.168.1.1" } ``` ### Response #### Success Response (200) - **api.ServiceOverviewResponse** - The schema for the service overview response. #### Response Example ```json { "example": "service overview response" } ``` #### Error Response (400) - **api.ErrorResponse** - The schema for error responses. ``` -------------------------------- ### GET /services/applications Source: https://api.pletx.net/docs/swagger Retrieves a list of all available applications within the PletX service. This endpoint is secured and returns a JSON response. ```APIDOC ## GET /services/applications ### Description Get the list of available applications. ### Method GET ### Endpoint /services/applications ### Parameters None ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **ApplicationsResponse** (object) - A response object containing a list of applications. #### Response Example ```json { "applications": [ { "id": "app-123", "name": "Example Application", "status": "active" } ] } ``` ``` -------------------------------- ### GET /services/rules Source: https://api.pletx.net/docs/swagger Retrieves a list of rules that have been learned automatically or added manually. Supports pagination and keyword search. ```APIDOC ## GET /services/rules ### Description Get list of rules learned or added manually. ### Method GET ### Endpoint /services/rules ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number. Defaults to 1. - **max_view** (integer) - Optional - Items per page. Set to zero for all. Defaults to 10. - **keyword** (string) - Optional - Keyword to search with, could be an IP Address, protocol or even application name. ### Request Example ```json { "query": "/services/rules?page=2&max_view=20&keyword=example.com" } ``` ### Response #### Success Response (200) - **api.RulesResponse** - The schema for the rules response. #### Response Example ```json { "example": "rules response" } ``` #### Error Response (400) - **api.ErrorResponse** - The schema for error responses. ``` -------------------------------- ### GET /services/attacks Source: https://api.pletx.net/docs/swagger Fetches a list of attacks that have been mitigated by the PletX service. Supports pagination and keyword search. ```APIDOC ## GET /services/attacks ### Description Get list of attacks mitigated on the service. ### Method GET ### Endpoint /services/attacks ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number, defaults to 1. - **max_view** (integer) - Optional - Items per page, set to zero for all, defaults to 10. - **keyword** (string) - Optional - Keyword to search with, could be an IP Address or even timestamp. ### Request Example ```json { "example": "/services/attacks?page=2&max_view=20&keyword=192.168.1.1" } ``` ### Response #### Success Response (200) - **AttacksResponse** (object) - A response object containing a list of attacks. #### Response Example ```json { "attacks": [ { "id": "attack-456", "timestamp": "2023-10-27T10:00:00Z", "source_ip": "192.168.1.100" } ], "total_attacks": 50 } ``` ``` -------------------------------- ### Get Bandwidth Data Source: https://api.pletx.net/docs/swagger Retrieves bandwidth utilization data over time. ```APIDOC ## GET /api/bandwidth ### Description Retrieves historical data on network bandwidth utilization, including traffic passing and dropped. ### Method GET ### Endpoint /api/bandwidth ### Parameters #### Query Parameters - **start_time** (string) - Required - The start of the time range for bandwidth data (ISO 8601 format). - **end_time** (string) - Required - The end of the time range for bandwidth data (ISO 8601 format). ### Response #### Success Response (200) - **data** (array) - A list of bandwidth data points. - **time** (string) - The timestamp of the data point (ISO 8601 format). - **total_drop_traffic** (string) - The amount of dropped traffic at this time (e.g., "0.38"). - **total_pass_traffic** (string) - The amount of traffic that passed at this time (e.g., "1.22"). #### Response Example ```json { "data": [ { "time": "2025-09-06T10:23:00Z", "total_drop_traffic": "0.38", "total_pass_traffic": "1.22" } ] } ``` ``` -------------------------------- ### Get Attack Flags Source: https://api.pletx.net/docs/swagger Retrieves a list of available attack flags. ```APIDOC ## GET /api/attack-flags ### Description Retrieves a list of available attack flags that can be used to categorize or filter attacks. ### Method GET ### Endpoint /api/attack-flags ### Response #### Success Response (200) - **flags** (array) - A list of available attack flag strings. #### Response Example ```json { "flags": [ "SYN_FLOOD", "UDP_FLOOD", "ICMP_FLOOD", "HANDSHAKE" ] } ``` ``` -------------------------------- ### GET /services/attacks/{attack_id} Source: https://api.pletx.net/docs/swagger Retrieves detailed information about a specific attack, including a breakdown of ports involved. Requires the attack ID as a path parameter. ```APIDOC ## GET /services/attacks/{attack_id} ### Description Get detailed information about a specific attack including port breakdown. ### Method GET ### Endpoint /services/attacks/{attack_id} ### Parameters #### Path Parameters - **attack_id** (integer) - Required - The ID of the attack to retrieve details for. ### Request Example ```json { "example": "/services/attacks/789" } ``` ### Response #### Success Response (200) - **AttackDetailsResponse** (object) - A response object containing detailed information about the attack. #### Response Example ```json { "id": "attack-789", "timestamp": "2023-10-27T11:00:00Z", "source_ip": "10.0.0.1", "ports": [ { "port": 80, "protocol": "TCP", "count": 1500 }, { "port": 443, "protocol": "TCP", "count": 2000 } ] } ``` ``` -------------------------------- ### Create Attack Rule Source: https://api.pletx.net/docs/swagger Creates a new rule for managing attacks. ```APIDOC ## POST /api/rules ### Description Creates a new rule for managing attacks. ### Method POST ### Endpoint /api/rules ### Parameters #### Request Body - **rule_name** (string) - Required - The name of the rule. - **description** (string) - Optional - A description for the rule. - **action** (string) - Required - The action to take when the rule is triggered (e.g., "block", "allow"). - **criteria** (object) - Required - The criteria for the rule. - **ip_address** (string) - Optional - The IP address to match. - **port** (integer) - Optional - The port to match. - **protocol** (string) - Optional - The protocol to match (e.g., "TCP", "UDP"). ### Request Example ```json { "rule_name": "Block Specific IP", "description": "Block traffic from a specific malicious IP address", "action": "block", "criteria": { "ip_address": "192.168.1.100", "protocol": "TCP" } } ``` ### Response #### Success Response (201) - **message** (string) - Confirmation message (e.g., "Rule created successfully"). - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "message": "Rule created successfully", "status": "success" } ``` ``` -------------------------------- ### List of Attacks Response Source: https://api.pletx.net/docs/swagger Retrieves a list of attacks, with pagination and total count. ```APIDOC ## GET /api/attacks ### Description Retrieves a list of attacks, with pagination and total count. ### Method GET ### Endpoint /api/attacks ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **pageSize** (integer) - Optional - The number of items per page. ### Response #### Success Response (200) - **data** (array) - A list of attacks. - **attack_id** (integer) - The ID of the attack. - **ended_at** (string) - The timestamp when the attack ended. - **flags** (string) - The flags associated with the attack (e.g., SYN, ACK). - **ip** (string) - The IP address targeted by the attack. - **maximum_peak** (string) - The maximum peak traffic observed during the attack (e.g., 1.5 Gbps). - **started_at** (string) - The timestamp when the attack started. - **status** (string) - The status of the response (e.g., "success"). - **total_rows** (integer) - The total number of attacks available. #### Response Example ```json { "data": [ { "attack_id": 1, "ended_at": "2025-09-06 10:25:00", "flags": "SYN,ACK", "ip": "192.168.1.1", "maximum_peak": "1.5 Gbps", "started_at": "2025-09-06 10:23:00" } ], "status": "success", "total_rows": 25 } ``` ``` -------------------------------- ### POST /websites/api_pletx_net/services Source: https://api.pletx.net/docs/swagger Creates a new service rule manually. This endpoint allows for the configuration of various parameters to define a new rule for a service. ```APIDOC ## POST /websites/api_pletx_net/services ### Description Create a new rule manually. This endpoint allows for the configuration of various parameters to define a new rule for a service. ### Method POST ### Endpoint /websites/api_pletx_net/services ### Parameters #### Query Parameters - **application_id** (integer) - Required - Application ID - **ip** (string) - Required - IP Address (ipv4 format) - **port** (integer) - Required - Port Number (1-65535) - **max_connections** (integer) - Optional - Max connections per minute (for custom TCP only) (1-65534) - **max_connections_action** (string) - Optional - Max connections action (for custom TCP only). Enum: "drop", "cookie" - **max_packet_size** (integer) - Optional - Max packet size in bytes (for custom TCP only) (0-1500) - **max_packet_num** (integer) - Optional - Max packet number per second (for custom TCP only) (0-65534) - **max_bytes** (integer) - Optional - Max bytes per second (for custom TCP only) (0-65534) ### Request Example ```json { "application_id": 123, "ip": "192.168.1.1", "port": 80, "max_connections": 100, "max_connections_action": "drop", "max_packet_size": 1500, "max_packet_num": 500, "max_bytes": 10000 } ``` ### Response #### Success Response (200) - **RuleInfo** (object) - Information about the created rule. #### Response Example ```json { "rule_created": true, "id": "rule-12345" } ``` #### Error Response (400) - **Error** (object) - Details about the error. ``` -------------------------------- ### Attack Details Response Source: https://api.pletx.net/docs/swagger Provides detailed information about a specific attack, including its ports and status. ```APIDOC ## GET /api/attacks/{attack_id} ### Description Retrieves detailed information about a specific attack, including its ports and status. ### Method GET ### Endpoint /api/attacks/{attack_id} ### Parameters #### Path Parameters - **attack_id** (integer) - Required - The unique identifier of the attack. ### Response #### Success Response (200) - **attack_details** (object) - Contains detailed information about the attack. - **attack_id** (integer) - The ID of the attack. - **ended_at** (string) - The timestamp when the attack ended. - **flags** (string) - The flags associated with the attack (e.g., SYN, ACK). - **ip** (string) - The IP address targeted by the attack. - **maximum_peak** (string) - The maximum peak traffic observed during the attack (e.g., 1.5 Gbps). - **started_at** (string) - The timestamp when the attack started. - **attack_ports** (array) - A list of ports affected by the attack. - **packets_peak** (integer) - The peak number of packets observed on this port. - **port** (integer) - The affected port number. - **protocol_name** (string) - The protocol used (e.g., TCP, UDP, ICMP). - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "attack_details": { "attack_id": 1, "ended_at": "2025-09-06 10:25:00", "flags": "SYN,ACK", "ip": "192.168.1.1", "maximum_peak": "1.5 Gbps", "started_at": "2025-09-06 10:23:00" }, "attack_ports": [ { "packets_peak": 1000000, "port": 80, "protocol_name": "TCP" } ], "status": "success" } ``` ``` -------------------------------- ### DELETE /websites/api_pletx_net/services Source: https://api.pletx.net/docs/swagger Deletes service rules. This can be used to delete all rules for an IP Address or a specific rule by providing IP, port, and protocol. ```APIDOC ## DELETE /websites/api_pletx_net/services ### Description Can be used to delete all rules for an IP Address or a specific rule by providing IP, port, and protocol. ### Method DELETE ### Endpoint /websites/api_pletx_net/services ### Parameters #### Query Parameters - **ip** (string) - Required - IP address to delete rules for (if it's set only without port and protocol then all rules for this IP will be deleted). (ipv4 format) - **port** (integer) - Optional - Port number to delete rules for (if provided, IP must also be provided). ### Request Example ```json { "ip": "192.168.1.1" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of deletion. #### Response Example ```json { "message": "Rules deleted successfully" } ``` #### Error Response (400) - **Error** (object) - Details about the error. ``` -------------------------------- ### DELETE /services/rules/{rule_id} Source: https://api.pletx.net/docs/swagger Deletes a specific service rule by its ID. Requires authentication. ```APIDOC ## DELETE /services/rules/{rule_id} ### Description Can be used to delete a specific rule by its ID. ### Method DELETE ### Endpoint /services/rules/{rule_id} ### Parameters #### Path Parameters - **rule_id** (integer) - Required - Rule ID ### Request Example (No request body specified for this endpoint) ### Response #### Success Response (200) - **(object)** - Details of the deleted rule (schema: api.DeleteRuleResponse) #### Error Response (400) - **(object)** - Error details (schema: api.ErrorResponse) ``` -------------------------------- ### Delete Attack Rule Source: https://api.pletx.net/docs/swagger Deletes an existing attack rule by its ID. ```APIDOC ## DELETE /api/rules/{rule_id} ### Description Deletes an existing attack rule identified by its unique ID. ### Method DELETE ### Endpoint /api/rules/{rule_id} ### Parameters #### Path Parameters - **rule_id** (integer) - Required - The unique identifier of the rule to delete. ### Response #### Success Response (200) - **message** (string) - Confirmation message (e.g., "Rule deleted successfully"). - **status** (string) - The status of the response (e.g., "success"). #### Response Example ```json { "message": "Rule deleted successfully", "status": "success" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.