esx attestation certificate csr: create
Generate a CSR.
Generate a certificate signing request (CSR) for the attestation signing certificate.
Calling this operation repeatedly will result in a generating a new CSR each time and generating a new private key. An existing CSR, if it exists, will be discarded.
Request:
HTTP request
POST https://{server}/api/esx/attestation/certificate/csr
{
"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"
}
"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"
}
Body Parameters:
| Name | Type | Description |
|---|---|---|
| bold = required | ||
| - | create_spec | The CSR specification. |
| -.key_size | long | Size in bits of the generated private key. Optional. If unset, keySize will be 2048 bits. |
| -.common_name | string | Common name for the certificate. This is typically the hostname of the associated server. Optional. If unset, commonName will be automatically generated based on the system hostname. |
| -.organization | string | Organization field in certificate subject |
| -.organization_unit | string | Organization unit field in certificate subject |
| -.locality | string | Locality field in certificate subject |
| -.state_or_province | string | State field in certificate subject |
| -.country | string | Country field in certificate subject |
| -.email_address | string | Email field in certificate extensions |
| -.subject_alt_name | string[] | Subject alternative names. Optional. If unset, subjectAltName will be empty. |
Response:
HTTP Status Code: 201
Response Body Structure:
{
"csr" : "string"
}
"csr" : "string"
}
Headers:
NoneType:
| Name | Type | Description |
|---|---|---|
| bold = required | ||
| - | info | A structure containing the CSR. |
| -.csr | string | Certificate Signing Request (CSR) in PEM format. |
Errors:
| HTTP Status Code | Type | Description |
|---|---|---|
| 500 | error | if there is a generic error. |
| 400 | invalid_argument | if the CSR specification is invalid. |
| 401 | unauthenticated | if the caller is not authenticated. |
| 403 | unauthorized | if the caller is not authorized. |