API Method-getCertificateByRequestID
Last updated
Last updated
Use the “getCertificateByRequestID” method to request for the certificate/pfx/P7B/rekey after the officer manually authorizes the Certificate
POST
http://www.example.com/emCAServices/rest/getCertificateByRequestID
Header Details
When request is received by the emCA service, we will decrypt the request JSON Object with the same AES key that is shared with the client.
After successful decryption, request JSON object (Signed data (request id) + Username + Password) is retrieved.
First emCA service will validate username and password and check if the IP Address used for request and registered with the user and are same.
If it is same then signed data (signature) is validated by trust verification, CRL verification and expiry.
If validation fails at any point in processing the request, the emCA service will throw error/failure message.
JSON Object Contains below parameters
Parameter
Presence
Data Type
Description
userName
M
String
You need to pass username that is registered with emCA for API process.
password
M
String
You need to pass the password that is registered with emCA for API process.
signature
M
String
Pass the signed data in section 5 i.e., PKCS#7 data (it should be request id)
Signed RequestID
Parameter
Presence
Data Type
Description
requestData
M
String
All the request input parameters mentioned above should be converted to JSON object and encrypted with AES 256 key shared with you by the emCA team.
Pass Encrypted JSON Object.
userName
M
String
You need to pass username that is registered with emCA for API process.
Key
Presence
Value
Description
Application / JSON
M
Content-Type
Type of request should be in JSON Format.
Authentication Key
M
emKey
emKey is an encoded key (Refer section 4 for generating Authentication Key using command prompt).
Parameter
Data Type
Description
response
String
Returns JSON Object
Parameter
Data Type
Description
status
Srting
Returns Status of the request as “Pending” if user has not got the certificate approved from the officer.
Returns Status of the request as “Rejected” if officer has rejected the certificate
Returns Status of the request as “Success” if certificate is approved by the officer and will get the corresponding certificate
Returns status of the request as “failure” when authentication fails or unregistered user tries to call the API
result
String
Returns
In case of Pending: “Request Accepted Successfully but not Processed” message will be displayed.
In case of Rejected: “Reason of the Rejection”
message will be displayed.
In case of success: “Certificate data based on the type of request” message will be displayed.
In case of failure: error message will be displayed
subscriberId
String
Return Subscriber ID.
requestId
String
Return request ID when request accepted successfully otherwise return null.
Error Message
Description
Invalid Request Id
If invalid request id given by user “No data found for request Id” message will be displayed