POST /api/v1//ping/
Initiates an asynchronous network diagnostic task (ICMP PING) directed at a client device. Since latency tests take time to complete, this endpoint creates a background job in WispHub and returns atask_id that can be used to poll for results later.
This endpoint returns immediately with a task ID. Use the Get Ping Result endpoint to retrieve the diagnostic results.
Path Parameters
ID of the service that owns the assigned IP or device
Request Body
Number of ICMP ping packets to send to the target device
Response
Indicates whether the request was successful
Response type. Values:
success, error, infoSpecific action identifier. Possible values:
ping_created- Task created successfullyping_failed- Task creation failed
Response data object
Optional message providing additional context
Optional metadata object
Example Request
Example Response
Async Task Workflow
The ping diagnostic follows an asynchronous pattern:- Create Task: Call this endpoint with the service ID and number of pings
- Receive Task ID: The response contains a
task_idfor tracking - Poll for Results: Use the Get Ping Result endpoint with the task ID to retrieve results
- Interpret Status: The result endpoint returns connection status:
stable,intermittent,no_internet, orerror
The WispHub backend processes the ping task asynchronously and returns HTTP 202 internally. Poll the results endpoint periodically until the task completes.
Status Codes
200- Task created successfully400- Invalid request parameters401- Unauthorized (invalid or missing token)404- Service not found500- Internal server error
