API Method - getProfileinfoByProfilename

Purpose

Use the “getProfileinfoByProfilename ‟ method for fetching Certificates created under a specific Profile by using the Profile name.

Type of Method

POST

Request URL

http://www.example.com/emCAServices/rest/getProfileinfoByProfilename

Request Input Parameters

Parameter

Presence

Data Type

Description

userName

M

String

Pass Username that is registered with emCA for API process.

password

M

String

Pass the password that is registered with emCA for API process.

signature

M

String

Pass the Signed data you want to validate or verify.

Sample JSON Object

requestData
{
"signature" :
"MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSABAxlTXVk aHJhIGRlbW8AAAAAAACggDCCA7cwggKfoAMCAQICEFcqUaCTmZDPwWG14f20A1cwDQYJKoZIhvcNAQELB
QAwdDElMCMGA1UEAwwcQ2VydGlmaWNhdGVNYW5hZ2VyIFJvb3QgMjAxNjEYMBYGA1UECgwPZU11ZGhyYS BMaW1pdGVkMRAwDgYDVQQLDAdlbXVkaHJhMRIwEAYDVQQIDAlCYW5nYWxvcmUxCzAJBgNVBAYTAklOMB4 XDTIxMDkwMzA1MzMzM1oXDTMxMDkwMTA1MzMzM1owLDEXMBUGA1UEDwwOQXV0aGVudGljYXRpb24xETAP
BgNVBAMMCEphZ2FkaXNoMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkLMjR+X1HXNdwI6UY
jcgVSyYrsKfpCqVuHslMjmIIlvL9VsnadfA7BcOCp+MUNDSRMeB0VnjQKbM3Li68JOQgtP86pfoNcuC8l 7aPMFSb9Y7G3FFp6C+mFlCj/l/DtW41Eg+Vft72gig71roam7jIS0Seiwnx7VUbGM4S7tlfWVyl3Kgli6 zLaNvSresMbwrHzI+Yba/ugcteso8RSxiewJZXKl/0XFR4692EUCM/LgvgH5f9k65gIAm14ZYOWMKaZG/
/2k9mpGmyiDDw2APGg+Q8sZsb8fWkGMrNnLb/71W+0b5GvEXROzRbNM6Gbnpxq2RjTL7qvklnKn4e0Y+O QIDAQABo4GMMIGJ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lGNnYCFFVq/WtAWpVrbtr1k77wk4u8LmTlWUIaUjfF7c6gEViklfQul6l W5DkwmpkG46ECw6fVNGFBevA9mFM0yJoBKgL5PnUtPbr4jMvU5dnKLrbtOwSQs/sZ6VJNrzudGyvQxC3s toK4fRCLz7uqfN6jMxh8lTIszTJV8vKrKo4rzOmFsgq3tWgQYRKIMycMgul8dXX8XWmZT6NVanuy2zlDC dQAAAAAAAA=",
"userName" : "username", "password" : "password "
}

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.

Header Details

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).

Sample Request Data

Header:


Request Body:
{
 
Content-Type	: application/json
emKey	: 47b54594063957de22fce0aeddd51a6adf4a80aa
 
"requestData" : "DcojYlq57vrFInQ3TypNPKWGZiQ4GXBcIpEaW1hkQxe0qHi5AvBMKnz97dpVOEezet5CoX1UPugOXu2 5w4fqyPKOhnBLkhrg0SDPEJLvGHgvZNBN5uTQ6RWXA4FHnjWIE67SytYHgeQ56lEFxrh1YccIRIwxVUT wxSLDKLQO+gMV1XfvOE1dlQATFBeFeYtFihfTrWIyDdOLbV7OhxGnWdsRxPYou92H3vnRTnL5ooyHWsa zrtlQcoKlLkN+xE5YvE0HW6De2ZSeYzlq1YeKjROz5a4ApoVrXFwTIVbymvdu8n/mjWy2MgjCErZ8Qcw DXYJJWrpiG+RPt9K/rXIs/G8S82QNbRAVJ5z8M+1RwkKEXLEqDJ5DPxRUn4WBtBSGzb9Iu9XTqeCAZgF
XHxrQ8U0CSzOfdVhEyRYbIFGy8zYZWwBWhggXlAmeGCgnk8d5JG/t9QSN0DncPaR4JnBRVNIB2cRvxic v6ayZS9ixPKxoOSdMRfJHQw4Wx5HxFpxkOCrCv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lB9Z5AaIE7vw/L9SPAye23/HsCQB7Yd7FOLb Pi769+8MqmTEZgkRFNQYP9Fz29sAwlWQs7JrV8r8gHMXlYWl0L9/GQek5FObb+HMMdxXVTHjBLGVPCXO
8i+isDsqgFmrenPR9Bke9Xyav2DnIuDcAFe0Lm2GNC1WgfZKYccDCO3eWFGImQ4mY01pE0dWjz7tEych OutEFQcWAnFD4jEoquF0oK2AV+cIbEBZuG1yrmCCdqd4SO67fcgJbFevnm7F0uzwyQsn9uAmhSEWAsCW SLsk/0Q=="
"userName":"username"
}

Process

  • When request is received by emCA service, the request JSON Object will be decrypted with same AES key that is shared to the client.

  • After successful decryption, request JSON object (Username + Password + Signature (Profile name)) is retrieved.

  • First emCA service will validate username and password and check if the IP Address used and registered with the user are same.If request is registered with same user, then the system checks if any user profiles are available with the requested profile name.

  1. If a user profile with requested profile name is found, the Certificate related information of that User profile will be displayed.

Response Parameters

Parameter

Data Type

Description

response

String

Returns JSON Object

JSON Object Contains below parameters

Parameter

Data Type

Description

status

String

Returns Status of the request as “Success‟, when the Certificates related information to that Certificate Profile is displayed.

Returns Status of the request as “Failure‟, when authentication fails or unregistered user tries to call the API.

result

String

Returns

In case of “Success‟: The Certificate related information of that Certificate Profile will be displayed.

In case of “Failure‟: Error message will be displayed.

subscriberId

String

Returns Subscriber Id

Response JSON Format

Sample:
Success:
Response Body
{
"status":"success",
"result":"Certificate related information of	requested profile name”, “subscriberId”:”XXX”
"requestId": null
}
Failure:
{
"status": "failure", "result": "<Error message>, "subscriberId": null, "requestId": null
}

Error Messages

Error Message

Description

Invalid Certificate Profile name

If the given certificate profile name is invalid

Signature verification failed

If signature parameter (CSR) is not signed by the pfx shared by eMudhra

Last updated