Files
xrpl-dev-portal/content/references/http-websocket-apis/public-api-methods/utility-methods/ping.md
mDuo13 554a3732d4 Migrate content syntax via script
The changes in this commit were auto-generated by running

tool/migrate.sh

Following this commit, the Dactyl build no longer works but the Redocly
build (mostly) should.
2024-01-31 16:09:41 -08:00

1.4 KiB

html, parent, blurb, labels
html parent blurb labels
ping.html utility-methods.html Confirm connectivity with the server.
Core Server

ping

[Source]

The ping command returns an acknowledgement, so that clients can test the connection status and latency.

Request Format

An example of the request format:

{% tabs %}

{% tab label="WebSocket" %}

{
    "id": 1,
    "command": "ping"
}

{% /tab %}

{% tab label="JSON-RPC" %}

{
    "method": "ping",
    "params": [
        {}
    ]
}

{% /tab %}

{% tab label="Commandline" %}

#Syntax: ping
rippled ping

{% /tab %}

{% /tabs %}

Try it! >

The request includes no parameters.

Response Format

An example of a successful response:

{% tabs %}

{% tab label="WebSocket" %}

{
    "id": 1,
    "result": {},
    "status": "success",
    "type": "response"
}

{% /tab %}

{% tab label="JSON-RPC" %}

200 OK

{
    "result": {
        "status": "success"
    }
}

{% /tab %}

{% /tabs %}

The response follows the [standard format][], with a successful result containing no fields. The client can measure the round-trip time from request to response as latency.

Possible Errors

  • Any of the [universal error types][].

{% raw-partial file="/_snippets/common-links.md" /%}