Create an SSL Certificate
This API creates a new SSL certificate in PAM360. By providing the required certificate details, the API generates and stores the certificate in the PAM360 repository.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/api/pki/restapi/createCertificate
Header Parameters
{
"AUTHTOKEN" : "<<Authtoken-generated-from-PAM360>>",
"orgName" : "<<org display name>>"
} | Parameter | Description | Values |
|---|---|---|
AUTHTOKEN | Authentication token for the user to authorize the API request. | Default Value : N/A |
orgName | Organization name available in PAM360. | Default Value : The organization to which the user belongs. |
Body Parameters
INPUT_DATA={
"operation":{
"Details":{
"CNAME": "mytestcert",
"ALT_NAMES": "test",
"ORGUNIT": "zohocorp",
"ORG": "manageengine",
"LOCATION": "chennai",
"STATE": "Tamilnadu",
"COUNTRY": "IN",
"PASSWORD": "zohocorp",
"VALIDITY": "888",
"VALIDITY_TYPE": "days",
"ALG": "RSA",
"LEN": "4096",
"SIGALG": "SHA256",
"StoreType": "PKCS12"
}
}
} | Parameters | Description | Values |
|---|---|---|
CNAME | Common Name for the certificate. | Default Value : N/A |
ALT_NAMES | Subject Alternative Names for the certificate. | Default Value : N/A |
ORGUNIT | Organizational Unit for the certificate. | Default Value : N/A |
ORG | Organization for the certificate. | Default Value : N/A |
LOCATION | Location of the organization. | Default Value : N/A |
STATE | State of the organization. | Default Value : N/A |
COUNTRY | Country of the organization. | Default Value : N/A |
PASSWORD | Password for the certificate keystore. | Default Value : N/A |
VALIDITY | Validity period for the certificate. | Default Value : N/A |
VALIDITY_TYPE | Type of validity period. | Default Value : N/A |
ALG | Algorithm used for the key. | Default Value : N/A |
LEN | Length of the key in bits. | Default Value : N/A |
SIGALG | Signature algorithm for the certificate. | Default Value : N/A |
StoreType | Keystore type to store the certificate. | Default Value : N/A |
Sample Request
curl -X POST https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/api/pki/restapi/createCertificate -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H 'Content-Type: application/json' -d INPUT_DATA={"operation":{"Details":{"CNAME":"mytestcert","ALT_NAMES":"test","ORGUNIT":"zohocorp","ORG":"manageengine","LOCATION":"chennai","STATE":"Tamilnadu","COUNTRY":"IN","PASSWORD":"zohocorp","VALIDITY":"888","VALIDITY_TYPE":"days","ALG":"RSA","LEN":"4096","SIGALG":"SHA256","StoreType":"PKCS12"}}}
import requests url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/api/pki/restapi/createCertificate" data = { "INPUT_DATA": '{"operation":{"Details":{"CNAME":"mytestcert","ALT_NAMES":"test","ORGUNIT":"zohocorp","ORG":"manageengine","LOCATION":"chennai","STATE":"Tamilnadu","COUNTRY":"IN","PASSWORD":"zohocorp","VALIDITY":"888","VALIDITY_TYPE":"days","ALG":"RSA","LEN":"4096","SIGALG":"SHA256","StoreType":"PKCS12"}}}' } headers = { "AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>" } response = requests.post(url, headers=headers, data=data, verify=True) print("Response:", response.text)
# Define URL $url = "https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/api/pki/restapi/createCertificate" # Headers with AUTHTOKEN $headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"; "Content-Type" = "application/x-www-form-urlencoded" } # Input JSON $inputData = @{ operation = @{ Details = @{ CNAME = "mytestcert"; ALT_NAMES = "testk,www.test.com"; ORGUNIT = "IT Department"; ORG = "Test Organization"; LOCATION = "Chennai"; STATE = "Tamil Nadu"; COUNTRY = "IN"; PASSWORD = "SecurePassword123"; VALIDITY = "365"; VALIDITY_TYPE = "days"; ALG = "RSA"; LEN = "2048";SIGALG = "SHA256"; StoreType = "PKCS12" } } } | ConvertTo-Json -Compress # Encode as query parameter $params = @{ INPUT_DATA = $inputData } # Create SSL Certificate $response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers -Body $params $response | ConvertTo-Json -Depth 5
Sample Response
{
"result": {
"message": "Certificate saved successfully",
"status": "Success"
},
"name": "CreateCertificate",
"details": [
{
"SSL_RESOURCEID": 304
}
],
"totalRows": 1
}