Files
xrpl-dev-portal/content/references/http-websocket-apis/admin-api-methods/peer-management-methods/peer_reservations_del.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

4.0 KiB

html, parent, blurb, labels
html parent blurb labels
peer_reservations_del.html peer-management-methods.html Remove a reserved slot for a specific peer server.
Core Server

peer_reservations_del

[Source]

The {% code-page-name /%} method removes a specific [peer reservation][], if one exists. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.4.0" %}New in: rippled 1.4.0{% /badge %}

The {% code-page-name /%} method is an admin method that cannot be run by unprivileged users.

Note: Removing a peer reservation does not automatically disconnect the corresponding peer, if that peer is connected.

Request Format

An example of the request format:

{% tabs %}

{% tab label="WebSocket" %}

{
    "id": "peer_reservations_del_example_1",
    "command": "{% $frontmatter.seo.title %}",
    "public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}

{% /tab %}

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

{
    "method": "{% $frontmatter.seo.title %}",
    "params": [{
      "public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
    }]
}

{% /tab %}

{% tab label="Commandline" %}

#Syntax: {% $frontmatter.seo.title %} <public_key>
rippled {% $frontmatter.seo.title %} n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99

{% /tab %}

{% /tabs %}

The request includes the following parameter:

Field Type Description
public_key String The [node public key][] of the [peer reservation][] to remove, in [base58][] format.

Response Format

An example of a successful response:

{% tabs %}

{% tab label="WebSocket" %}

{
  "id": "peer_reservations_del_example_1",
  "result": {
    "previous": {
      "description": "Ripple s1 server 'WOOL'",
      "node": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
    }
  },
  "status": "success",
  "type": "response"
}

{% /tab %}

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

{
   "result" : {
      "previous" : {
         "description" : "Ripple s1 server 'WOOL'",
         "node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
      },
      "status" : "success"
   }
}

{% /tab %}

{% tab label="Commandline" %}

Loading: "/etc/rippled.cfg"
Connecting to 127.0.0.1:5005

{
   "result" : {
      "previous" : {
         "description" : "Ripple s1 server 'WOOL'",
         "node" : "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
      },
      "status" : "success"
   }
}

{% /tab %}

{% /tabs %}

The response follows the [standard format][], with a successful result containing the following fields:

Field Type Description
previous Object (May be omitted) A peer reservation object with the last state of the peer reservation before deleting it. This field is always provided if a peer reservation was successfully deleted.

Note: If the specified reservation did not exist, this command returns success with an empty result object. In this case, the previous field is omitted.

Peer Reservation Object

If the previous field is provided, it shows the previous status of this peer reservation, with the following fields:

{% partial file="/_snippets/peer_reservation_object.md" /%}

Possible Errors

  • Any of the [universal error types][].
  • invalidParams - One or more fields are specified incorrectly, or one or more required fields are missing.
  • publicMalformed - The public_key field of the request is not valid. It must be a valid node public key in [base58][] format.
  • reportingUnsupported - ([Reporting Mode][] servers only) This method is not available in Reporting Mode.

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