REST API - create

vcenter certificate management vcenter tls csr: create

Generates a CSR with the given Spec. This operation was added in vSphere API 6.7.2.

Request:

HTTP request

POST https://{server}/rest/vcenter/certificate-management/vcenter/tls-csr

Request Body Structure:

{
    "spec"{
        "state_or_province""string",
        "country""string",
        "email_address""string",
        "organization""string",
        "locality""string",
        "subject_alt_name"[
            "string",
            "string"
        ],
        "common_name""string",
        "key_size"1,
        "organization_unit""string"
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec spec The information needed to create a CSR.
spec.key_size long This attribute was added in vSphere API 6.7.2.

Optional. keySize will take 2048 bits if not modified.

spec.common_name string This attribute was added in vSphere API 6.7.2.

Optional. commonName will take PNID if not modified.

spec.organization string Organization field in certificate subject. This attribute was added in vSphere API 6.7.2.

spec.organization_unit string Organization unit field in certificate subject. This attribute was added in vSphere API 6.7.2.

spec.locality string Locality field in certificate subject. This attribute was added in vSphere API 6.7.2.

spec.state_or_province string State field in certificate subject. This attribute was added in vSphere API 6.7.2.

spec.country string Country field in certificate subject. This attribute was added in vSphere API 6.7.2.

spec.email_address string Email field in Certificate extensions. This attribute was added in vSphere API 6.7.2.

spec.subject_alt_name string[] This attribute was added in vSphere API 6.7.2.

Optional. subjectAltName is list of Dns Names and Ip addresses.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "csr""string"
    }
}

Response Type:

Name Type Description
bold = required
value info A Certificate Signing Request.
value.csr string Certificate Signing Request in PEM format. This attribute was added in vSphere API 6.7.2.

Errors:

HTTP Status Code Type Description
500 error If CSR could not be created for given spec for a generic error.