Service host connection test

Test connection to host for the given payload.

HTTP method and URI path


POST /v3/service-hosts/validate-host-connection
 

Standard headers

Use the following standard HTTP header with this request:
  • Content-Type: application/json
  • Authorization: <Bearer token>

Required authorizations

The user ID associated with the token which is specified in the request header needs to be granted with one of the following roles:
  • sysadm
  • mladm
  • appuser

Request body

The request content is expected to contain a JSON object. See the following table for the description of the fields.

Table 1. Supported parameters for the service host connection test APIIn this table, the Parameter column lists the supported parameters, the Type column lists the data type for the parameter, the Required or optional column indicates whether the parameter is required or optional for this request, and the Description column provides a brief description of the parameter.

Parameter

Type

Required or optional

Description

hostAlias

String

Required

Unique alias of host. Must be an exact match CDA name for credential retrieval.

hostIp

String

Required

IP address or host name of host.

hostSshPort

String

Required

SSHPort

hostType

String

Required

zcx or zlinux

IparName

String

Required

Name of LPAR where host resides

cpcName

String

Required

Name of CPC where host resides

credentialType

String

Required

Method of user authentication on host (password or passphrase)

Example of request body:
{
  "hostAlias": "zcx-Host",
  "hostIp": "1.2.3.4",
  "hostSshPort": "8022",
  "hostType": "zcx",
  "lparName": "my-lpar",
  "cpcName": "my-cpc",
  "credentialType": "password"
}

Expected response

On completion, the service returns an HTTP response, which includes a status code that indicates whether your request is completed. Status code 200 indicates a successful completion. A status code of 4nn or 5nn indicates an error.

HTTP status codes

Table 2. Response from HTTP status codes In this table, the HTTP status code column and Error response columns list the returned fields, and the Description column provides a brief description of the field.

HTTP status code

Error response

Description

401

ALNC810E

Unauthorized to make request.

400

Various

Bad request payload format.