Import Certificate By Json V2 Using POST

Import Certificate By Json V2 Using POST

This API is used to import an already existing certificate.

Request
URI
POST
https://{api_host}//10.155.180.238/lcm/locker/api/v2/certificates/import
COPY
Request Body

certificateImportRequestDTO

CertificateImportRequestDTO of type(s) application/json
Required
{
    "alias": "cert2",
    "certificateChain": "-----BEGIN CERTIFICATE-----\\nMIIDzzCCAregAwIBAgIGAXON2rrTMA0GCSqGSIb3DQEBCwUAMFMxMzAxBgNVBAMM\\nKnZSZWFsaXplIFN1aXRlIExpZmVjeWNsZSBNYW5hZ2VyIExvY2tlciBDQTEPMA0G\\nA1UECgwGVk13YXJlMQswCQYDVQQGEwJJTjAeFw0yMDA3MjcwMTE5NDhaFw0yMjA3\\nMjcwMTE5NDhaMFoxDzANBgNVBAMMBnZtd2FyZTEPMA0GA1UECwwGdm13YXJlMQ8w\\nDQYDVQQKDAZ2bXdhcmUxCzAJBgNVBAcMAklOMQswCQYDVQQIDAJJTjELMAkGA1UE\\nBhMCSU4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCj4AcR4nEGFX07\\n7746gtcfDRSprywMHVvL7tw16T5NIW3aiZdAG0+Y1LHKP/ySi1y4Tw7puJDaCHQH\\n4Es40GcgdcjHJ9B5rcANI7suCelqSF0jWAEBVIz5+OMCX7KcgKbCnXnZFORk7BW6\\nsNnrQcdou89SzEAQWhbDQN/Gkewoac+XEsuxrf4TVXsSIzjDCnpXtA4bAoGYZMhl\\nMmpCi6KkIeboOfISFf2ndkArV5xImJRLGEipo9Rzb3o9fRAQ2h6yIew0ClXic7eN\\nxVWpMBkdscQBufDKXAJ00ugAF36thWG+rAL05P/4iWLVGLWG00o48O/sh44qVYFU\\nUmw/YU3rAgMBAAGjgaEwgZ4wHQYDVR0OBBYEFMKgidsQyZNHdWfQunuH1tN+klM7\\nMB8GA1UdIwQYMBaAFH3ByevtTx1c8uvqnjvv4yqZyWrMMBwGA1UdEQQVMBOHBArE\\nDw2CCyouc3FhLmxvY2F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SggAkK7j4lpTX3vXVS\\nL/NTJvjG4vufs9qwCUmKY8mnmmDarr4YKx+hucrANyIqNCXwoUi0ApzqqTkCOQiM\\neAYCQX45FPzV32QGKqNLcE5yHhkZUIHTAUiWdY34QQKBgCar2ZxEUn7eXqzu1hb+\\nhV3rGYYU0IiMp0lfhzHsdCu/E+oUlVypsgahmLSRzkY8arb2u4Ao2vf+qtZvd2O1\\n74BOKtClR4/gSHdleM1D4eRBwjQyquS8wmS7nh3XbJGYvNqetvZ66FFAKXRXnLlg\\nv88cSS1uhynUfPSzjb1+wDa5\\n-----END PRIVATE KEY-----\\n"
}
string
alias
Optional

Certificate alias

string
certificateChain
Optional

Certificate Chain

string
passphrase
Optional

Passphrase

string
privateKey
Optional

Private Key

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns Certificate of type(s) */*
{
    "alias": "string",
    "certChain": "string",
    "certInfo": {
        "algorithm": "SHA256WITHRSA",
        "issuer": "C=IN, O=VMware, CN=vRealize Suite Lifecycle Manager Locker CA",
        "keyAlgorithm": "RSA",
        "keyLength": 2048,
        "san": "DNS: *.vmware.com, DNS: *.dev.lcm.local",
        "sha1": "fea1cfee3532b23027e9f48de03c23d2fb0dc346",
        "sha256": "668430ffe699077b5555c482b3aeada10504f1331dd1a765e5448c55d446ba95",
        "subject": "C=IN, ST=KAR, L=BANGALORE, O=VMware, OU=CMBU, CN=VMware"
    },
    "key": "string",
    "leafCert": "string",
    "validations": [
        {
            "message": "string",
            "strict": false
        }
    ],
    "validity": {
        "expiresOn": "string",
        "healthy": false,
        "issuedOn": "string",
        "period": "1 year, 11 months and 25 days"
    },
    "vmid": "string"
}
string
alias
Optional

alias

string
certChain
Optional

certChain

certInfo
Optional

certInfo

string
key
Optional

key

string
leafCert
Optional

leafCert

validations
Optional

validations

validity
Optional

validity

string
vmid
Optional

vmid


201

Created

Operation doesn't return any data structure

400

Bad Request

Returns GenericErrorResponseDTO of type(s) */*
{
    "errorCode": "LCM_EXAMPLE_API_ERROR0000",
    "errorLabel": "Example Error!",
    "message": "Something went wrong!",
    "recommendations": []
}
string
errorCode
Optional

errorCode

string
errorLabel
Optional

errorLabel

string
message
Optional

message

array of string
recommendations
Optional

recommendations


401

Unauthorized

Operation doesn't return any data structure

403

Forbidden

Operation doesn't return any data structure

404

Not Found

Operation doesn't return any data structure

409

Conflict

Returns GenericErrorResponseDTO of type(s) */*
{
    "errorCode": "LCM_EXAMPLE_API_ERROR0000",
    "errorLabel": "Example Error!",
    "message": "Something went wrong!",
    "recommendations": []
}
string
errorCode
Optional

errorCode

string
errorLabel
Optional

errorLabel

string
message
Optional

message

array of string
recommendations
Optional

recommendations


500

Internal Server Error

Returns GenericErrorResponseDTO of type(s) */*
{
    "errorCode": "LCM_EXAMPLE_API_ERROR0000",
    "errorLabel": "Example Error!",
    "message": "Something went wrong!",
    "recommendations": []
}
string
errorCode
Optional

errorCode

string
errorLabel
Optional

errorLabel

string
message
Optional

message

array of string
recommendations
Optional

recommendations