NSX-T Data Center REST API

Generate a New Self-Signed Certificate

Creates a new self-signed certificate. A private key is also created at the
same time. This is convenience call that will generate a CSR and then self-sign it.
For validity of non-CA certificates, if a value greater than 825 days is
provided, it will be set to 825 days. No limit is set for CA certificates.

Request:

Method:
POST
URI Path(s):
/api/v1/trust-management/csrs?action=self_sign
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
CsrWithDaysValid+

Example Request:

POST https://<nsx-mgr>/api/v1/trust-management/csrs?action=self_sign { "subject": { "attributes": [ {"key":"CN","value":"Jane"}, {"key":"O","value":"VMware"}, {"key":"OU","value":"NSBU"}, {"key":"C","value":"US"}, {"key":"ST","value":"CA"}, {"key":"L","value":"PA"} ] }, "key_size": "2048", "algorithm": "RSA", "is_ca": true, "days_valid": 365 }

Successful Response:

Response Code:
201 Created
Response Headers:
Content-type: application/json
Response Body:
Certificate+

Example Response:

{ "id": "f1a858e1-fe70-41d0-a53b-32c43cec280f", "display_name": "358e0291-1f4f-4350-acd1-86b2b5f00403", "resource_type": "certificate_ca_with_private_key", "pem_encoded": "-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----\n", "has_private_key": true, "purpose": "signing-ca", "used_by": [], "key_size": 2048, "algorithm": "RSA", "is_ca": false, "_system_owned": false, "_last_modified_time": 1413371717767, "_create_time": 1413371717767, "_create_user": "admin", "_last_modified_user": "admin", "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

trust_csrs

Additional Errors: