Host Certificate Manager Generate Certificate Signing Request

Host Certificate Manager Generate Certificate Signing Request
Requests the server to generate a certificate-signing request (CSR) for itself.

Requests the server to generate a certificate-signing request (CSR) for itself.

The CSR is then typically provided to a Certificate Authority to sign and issue the SSL certificate for the server. Use InstallServerCertificate to install this certificate.

Required privileges: Certificate.Manage

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/HostCertificateManager/{moId}/GenerateCertificateSigningRequest
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case HostCertificateManager/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.


Request Body
Required

Show optional properties

{
    "useIpAddressAsCommonName": false
}
{
    "useIpAddressAsCommonName": false,
    "spec": {
        "_typeName": "string",
        "kind": "string",
        "subjectAlternativeNames": [
            "string"
        ],
        "cryptoAlgorithm": "string"
    }
}
boolean
useIpAddressAsCommonName
Required

if true, use host's management IP address as CN in the CSR; otherwise use host's FQDN.

spec
Optional

is used to generate CSR for selected certificate kind.

Since: vSphere API Release 8.0.1.0

Authentication
This operation uses the following authentication methods.
Responses
200

CSR in PEM format

Returns string of type(s) application/json
Operation doesn't return any data structure

500

HostConfigFault: if there's a problem generating the CSR.

Returns HostConfigFault of type(s) application/json
This response body class contains all of the following: VimFault
{
    "_typeName": "string",
    "faultCause": {
        "_typeName": "string",
        "faultCause": "MethodFault Object",
        "faultMessage": [
            {
                "_typeName": "string",
                "key": "string",
                "arg": [
                    {
                        "_typeName": "string",
                        "key": "string",
                        "value": {
                            "_typeName": "string"
                        }
                    }
                ],
                "message": "string"
            }
        ]
    },
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"useIpAddressAsCommonName":"boolean"}' https://{api_host}/sdk/vim25/{release}/HostCertificateManager/{moId}/GenerateCertificateSigningRequest