Update peer

Updates a peer as specified. 

This is an asynchronous call and no validation errors are displayed. 

This topic includes the following sections:

Request

HTTP method: PUT

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

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

Request body properties

PropertyTypeRequiredDescriptionValuesDefault value

name

StringYes

Name of the peer to update

Note: The name cannot be changed.

User-provided value

NA
descriptionStringNoPeer descriptionUser-provided valueNA
metricsyncPointStringNoSpecifies if the peer will be used as a synchronization point for uploading metrics (not applicable for LAPs)

User-provided value

true or false

false
workflowServerStringNo

Specifies if the peer will service SOAP requests to run workflows (not applicable for LAPs)

User-provided value

true or false

false
loggingInfoObjectNo

Specifies logging information for the peer.

To use loggingInfo, specify the following attributes:

  • componentName
  • logLevel

componentName and logLevel

NA
componentNameStringYes, if loggingInfo is specifiedSpecifies the name of the components associated with the logging informationUser-provided valueNA
logLevelStringYes, if loggingInfo is specifiedSpecifies the logging levels associated with the specified componentsWARN, DEBUG, OFF, INFO, ERRORWARN

Example request JSON

{
       "peers":[
                     {
                       "name":"LAP",
                        "description":"new description for LAP",
                        "metricsyncPoint":"TRue",
                       "workflowServer":"false",
                       "loggingInfo": [
                                               {
                                                  "componentName": "Adapters",
                                                  "logLevel": "DEBUG"
                                             },
                                             {
                                                "componentName": "Configuration",
                                               "logLevel": "DEBUG"
                                            }
                                       ]
                },
                {
                   "name":"AP1",
                   "description":"new description for AP1",
                   "metricsyncPoint":"TRue",
                  "workflowServer":"false",
                 "loggingInfo": [
                                         {
                                            "componentName": "Grid Framework",
                                             "logLevel": "DEBUG"
                                       },
                                       {
                                          "componentName": "Foundation",
                                          "logLevel": "DEBUG"
                                      }
                      ]
                }
          ]
}

Response

If successful, this method updates the specified peer.

Response body properties

PropertyDescription
responseStatus of the request

Example response JSON

{
  "response": "Success"
}

Status codes and messages

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

HTTP codeMessageDescription
200OKRequest succeeded
202Success

Request created and may be partially successful.

For additional debugging, check the grid.log file.

400 

Bad request

An error occurred while enabling the adapter.

401 Unauthorized
404
Invalid REST URL
405 Method not allowed

Related topics

HTTP request and response headers

Format of API examples

Editing peers

Was this page helpful? Yes No Submitting... Thank you

Comments