How to generate a request JSON Object

Java code for all API methods

RACARequest racarequest = new RACARequest(); racarequest.setRequestData(encodedString);
racarequest.setUserName(userName);
// Converting the CertUtil class object to Json ObjectWriter ow1 = new
ObjectMapper().writer().withDefaultPrettyPrinter();
String json1 = ow1.writeValueAsString(racarequest);

encodedString

M

String

You need to pass BASE 64 encoded JSON object which is output of section 6.

userName

M

String

You need to pass username that is registered with emCA for API process.

.Net Code for All API methods

string jsonrequestData = "{\"requestData\":\"" + < encodedString> + "\”," + "\" userName\":\"" + < userName > +"\"}";

encodedString

M

String

You need to pass BASE 64 encoded JSON object which is output of section 6.

userName

M

String

You need to pass username that is registered with emCA for API process.

Common Error Message

Invalid parameter

If input parameter is missing

Invalid input data

If decryption of request input data failed due to incorrect AES key used for encryption. etc.

Invalid request details found

If the Authentication failed i.e., incorrect username/password/IP Address

Internal server error

Server-side error (if any)

Last updated