Stop peers


Stops the specified peer. You can also use the Stop peer REST call to stop more than one peer. After the request for stopping multiple peers is sent, the response is returned as success or failure. Peers will stop in the background. 

This topic includes the following sections:

Request for stopping a single peer

HTTP method: PUT

Request URL: https://<hostname>:<port>/baocdp/rest/peer/<peer_name>/stop

In this URL, <peer_name> represents the name of the peer to stop. 

Header: See HTTP-request-and-response-headers for header information, such as required authentication token.

Request for stopping multiple peers

HTTP method: POST

Request URL: To stop multiple peers: https://<hostname>:<port>/baocdp/rest/peer/stop

Peers are specified in the request body and not in the URL. 

Header: See HTTP-request-and-response-headers for header information, such as required authentication token.

Request body properties for a single peer

This call does not require a request body.

Request body properties for multiple peers

Property

Type

Required

Description

Values

Default value

peers

array string

Yes

Top level for stopping multiple peers

NA

NA

name

string

Yes

name of the peer to be started

User-provided value

NA

Example request JSON for stopping multiple peers

{
  "peers": [
     {
        "name": "LAP"
     },
     {
        "name": "AP1"
     },
 {
    "name": "AP2"
 }
   ]
}

Response

If successful, this method stops the specified peer.

Response body properties

Property

Description

response

Status of the request

Example response JSON

{
 "response": "Success"
}

Status codes and messages

For more details about HTTP response codes, see HTTP response codes.

HTTP code

Message

Description

204

Accepted

Request succeeded

400


Bad request

An error occurred while enabling the adapter.

401

 

Unauthorized

403


Forbidden

404

Not Found

Peer not found

500


Internal Server Error

Related topics

HTTP-request-and-response-headers

Format-of-API-examples

Peer-management-API

Starting-and-stopping-peers

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*