Last updated
Edit

peer_reservations_del

[Source]

The peer_reservations_del method removes a specific peer reservation, if one exists.

The peer_reservations_del 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:

{
    "id": "peer_reservations_del_example_1",
    "command": "peer_reservations_del",
    "public_key": "n9Jt8awsPzWLjBCNKVEEDQnw4bQEPjezfcQ4gttD1UzbLT1FoG99"
}

The request includes the following parameter:

FieldTypeDescription
public_keyStringThe node public key of the peer reservation to remove, in base58 format.

Response Format

An example of a successful response:

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

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

FieldTypeDescription
previousObject(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:

FieldTypeDescription
nodeStringThe [node public key][] of the peer server this reservation is for, as [base58][].
descriptionString(May be omitted) The description provided with this peer reservation, if any.

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.