API Method - getExpirySoonCertificate

Purpose

Use the “getExpirySoonCertificate” method to fetch the Certificates that are to expire soon based on the time duration and Subscriber ID.

Type of Method

POST

Request URL

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

Request Input Parameters

Parameter

Presence

Data Type

Description

subscriberId

O

String

Pass the subscriber Id to fetch “soon to be expired‟ certificate details of that specific subscriber (or) leave it blank to get “soon to be expired‟ details of all Subscribers.

signature

M

String

Pass Signed data you want to validate or verify.

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.

Sample JSON Object

requestData		
{
  "noOfDaysToExpirySoon": "XXX",
  "subscriberId": "XXXX"
"signature" : "MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSABIGLQ049dGh1bGFzaSxTRVJJQUxOVU1CRVI9QVZBUEc0MjAxQSxFPXRodWxhc2kuZ0BlbXVkaHJhLmNvbSxPPWVtdWRocmEsUz1LQSxDPUlOLFBvc3RhbENvZGU9NTYwMTAzLEtleUFsb2dpcnRobUFuZFNpemU9UlNBLTEwMjQsUGFzc3dvcmQ9MTIzNAAAAAAAAKCAMIIDpjCCAo6gAwIBAgIDTEtBMA0GCSqGSIb3DQEBCwUAMHQxJTAjBgNVBAMMHENlcnRpZmljYXRlTWFuYWdlciBSb290IDIwMTYxGDAWBgNVBAoMD2VNdWRocmEgTGltaXRlZDEQMA4GA1UECwwHZW11ZGhyYTESMBAGA1UECAwJQmFuZ2Fsb3JlMQswCQYDVQQGEwJJTjAeFw0xODA1MDMwNTUyNDNaFw0yMDA1MDIwNTUyNDNaMCgxFzAVBgNVBA8MDkF1dGhlbnRpY2F0aW9uMQ0wCwYDVQQDDARyYWNhMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm4k/r47G8+eRm/zftRSwxg8koTXLEHGJF5MKJZjUsPweASFbxxcj1RwixCHaAP75n3u0JCOFBuOVDMlPMu47j9w+x6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CSqGSIb3DQEJBTEPFw0xODA4MDgxMDU3NDFaMC8GCSqGSIb3DQEJBDEiBCCRCU2QQn8vWt9lA+SkB/8weIKlUaHaSgmDqE4GCgQZ0TANBgkqhkiG9w0BAQEFAASCAQAIjlSTHf+7EXSUuFV7S57vDdYyu5AhE5iJ2dJl03zo/Bc62yMRgWGPpLSTFBjo8102VQIACxfudcCNoV1pfPkTxTyhe/rMv/VnWaMcLLrJZ0JRu7WZgrfHkBZ7p1eIv6LRt/nja93Fuc2M8Jl8B00DeQDNkyjnIN3gVS+0Hr8/ZIfClYa3huxfm8h1PeQHupaZ53UZKONLe7rRVVJGIA2IZwRkXcxk/2Z47qw1hUFvtXokQBbqOj1rDhL3Dh6pOsU9XbXTKGXzmcs0I6RXSB3DHbwQtsPK7neEyJBbxS0IpiKxY7IZtF2+m+WXmjWQyg7ZIYK0/X96XkYA7W7rcEPjAAAAAAAA",
 "userName" : "username"
 "password" : "password "
“isSignedData”  : “true/false”
}     

Header Details

Key

Presence

Value

Description

Application / JSON

M

Content-Type

Type of request should be in JSON Format.

Authentication Ke

M

emKey

emKey is an encoded key (Refer section 4 for generating Authentication Key using command prompt).

Sample Request Data

Header: 
              Content-Type : application/json
Request Body:	
                        {
{  "requestData" : "DcojYlq57vrFInQ3TypNPKWGZiQ4GXBcIpEaW1hkQxe0qHi5AvBMKnz97dpVOEezet5CoX1UPugOXu25w4fqyPKOhnBLkhrg0SDPEJLvGHjFt37gGiL34CUIym5UAQTZKMlnVYTgL/TTnBCQ18oHl0zRoekr3oR9SbHqUGe5+HuSs7YVKNMkKvKNkoZ78luvs8ahK4vbkqzcLhM3x87q7mSUnZdvBn/8c3vm9EZizNbEXlSCIsGvyu3D5gErXckUTOgxCvlVEMEyqyc8kVPpDy5LvLdefoyP8cNjekJaGBF2DYZo/onkiesljtbwicj8ypGqBLi6351P8yTtYE3zSNRj1SpF+Fb86pkuiv4HJs6nj8j++GdYBHQVB3hnvv/b1JH/8ycos/8Xfi5+dMX95pcl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6li0cJDNEMlInQgUY9703Qykn1cEpcoH0vQ92pLCicQ0aRDAcdAotk1U42+dNR0yy7Hae1cmASMoqyLTEBqDVkU06Shl0nnPn/l6ZNSffEY5c8WJG6kLoXCC+bw1HSZVKBahTwJ8S0tmPK3G0+3LKep3s31YyrmlIgFAAdm+qGBf0N3sG0ARb7lLs7uRqUS3eb/q1+OU73ftuelEku8r2fsAlfDfShWH8ocdbvaLt3cQ7st/V53dVjzcfcHPZx40sw3prVEIBBwV01eV2BPn+RQgyQnB6sLdqUBzeunZEfCNx5jw5KGMbjAc1U+ZkB/KYj/EfUo2H4/KWvBJ9QzX7jcFrzZaeZY+FgtGp1wF+5eBZtB9XmHSPihwra28/JDGWqt1ow=="
}	
		}

Process

  • When request is received by emCA service, the system decrypts the request JSON Object with same AES key that is shared with the client.

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

  • emCA service will then validate the username, password and check if the IP Address used for request and registered with the user are same.

  • If request is registered with the same user, then the system checks if the certificates are available for the specified time period.

  1. If certificates are available for the specified time period, the certificate details ( Certificate Serial no and specified time period) will be displayed.

  2. If certificates are not available for the specified time period, the message “No Certificate is available for the specified time period” 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 Certificate details to be expired in the specified time period is fetched.

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

result

String

In case of Success: the Certificate details to be expired in the specified time period will be displayed.

In case of failure: Error message will be displayed.

subscriberId

String

Returns Subscriber Id

Response JSON Format

Sample:
Success:
      Response Body(if have certificate that to expired in specified time period)
     {
      "status":"success",
      "result":"Certificates serials no”s to be expired in the specified time period ,
      “subscriberId”:”XXX”
      "requestId": null,
     }	

 Response Body(if don’t have certificates that to expired in specified time period)
     {
      "status":"success",
      "result":"No certificate will be Expire in XX Days,
      “subscriberId”:”XXX”
      "requestId": null,
     }		
      Failure: 
    {
  "status": "failure",
  "result": "<Error message>,
  "subscriberId": null,
  "requestId": null
     }

Last updated