Sign a CSR
This API signs an existing CSR in PAM360 using a selected root or intermediate certificate. By providing the CSR ID along with signing details such as the root certificate’s common name, serial number, and validity period, the API generates a signed SSL certificate and returns the signing status.
Request URL
https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/api/pki/restapi/signCSR
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":{
"signType": "signWithRoot",
"rootCertificateCommonName": "testroot",
"rootCertificateSerialNumber": "1879376424c",
"Validity": 100,
"isIntermediate": "true",
"CSR_ID": "303"
}
}
}| Parameters | Description | Values |
|---|---|---|
signType | Defines the type of signing operation to perform. | Default Value : MSCA |
rootCertificateCommonName | The common name of the root certificate used for signing. | Default Value : N/A |
rootCertificateSerialNumber | The serial number of the root certificate used for signing. | Default Value : N/A |
Validity | The validity period (in days) for the newly generated certificate. | Default Value : N/A |
isIntermediate | Specify "true" if the generated certificate should be treated as an intermediate certificate. | Default Value : N/A |
CSR_ID | The ID of the CSR to be signed. | Default Value : N/A |
Sample Request
curl -X POST https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/api/pki/restapi/signCSR -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H 'Content-Type: application/json' -d INPUT_DATA={"operation":{"Details":{"signType":"signWithRoot","rootCertificateCommonName":"mytestcert","rootCertificateSerialNumber":"19a581cb50d","Validity:100,"isIntermediate":"true","CSR_ID":"303"}}}
import requests url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/api/pki/restapi/signCSR" data = { "INPUT_DATA": '{"operation":{"Details":{"signType":"signWithRoot","rootCertificateCommonName":"mytestcert","rootCertificateSerialNumber":"19a67e99488","Validity":88,"isIntermediate":"true","CSR_ID":"2"}}}' } 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/signCSR" # Headers with AUTHTOKEN $headers = @{ "AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"; "Content-Type" = "application/x-www-form-urlencoded" } # Input JSON $inputData = @{ operation = @{ Details = @{ signType = "signWithRoot"; # default = "MSCA" rootCertificateCommonName = "rootcert"; rootCertificateSerialNumber = "123XXXX"; Validity = "100"; isIntermediate = "true"; CSR_ID = "301" } } } | ConvertTo-Json -Compress # Encode as body parameter $params = @{ INPUT_DATA = $inputData } # Sign CSR $response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers -Body $params $response | ConvertTo-Json -Depth 5 $response.Content
Sample Response
{
"result": {
"message": "Certificate csrtest successfully signed with mytestcert.",
"status": "Success"
},
"name": "SignCSR",
"details": [
{
"commonName": "csrtest",
"Certificate_ID": 309,
"serialNumber": "b7d5fcb7"
}
]
}