API Guide For Sunbird-RC

The APIs used in the certificate generation process are listed below. Kindly find the Postman collection file in the below link

https://github.com/Sunbird-Lern/lms-service/blob/release-8.0.0/api-tests/Collection/Sunbird-RC-Certificate-APIs.postman_collection.json

Create certificate

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: { "recipient": { "id": {{user id}}, "name": {{user name}}, "type": "user" }, "issuer": { "url": {{issure url}}, "name": {{issure name}}, "kid": {{Public key osid}} }, "training": { "id": {{course id}}, "name": {{course name}}, "type": "Course", "batchId": {{batch id}} }, "templateUrl": {{template url}}, "status": "ACTIVE", "signatory": [ { "name": "commissioner", "image": {{base64 signatory}}, "designation": "CEO", "id": "CEO/CEO" } ], "oldId": {{old certificate id if certificate is reissue}}, "certificateLabel": {{certificate name}}, "issuedOn": {{issued time}} }
Responses
200

OK

application/json
Responseobject
post
/registry-service/api/v1/TrainingCertificate
200

OK

Create PublicKey

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: {"value":"{{key}}"}
Responses
200

OK

application/json
Responseobject
post
/registry-service/api/v1/PublicKey
200

OK

Download certificate PDF

get
Path parameters
osidstringRequired
Header parameters
AcceptstringOptionalExample: image/svg+xml
AuthorizationstringOptionalExample: {{rc_api_key}}
templatestringOptionalExample: {{template_url}}
Responses
get
/registry-service/api/v1/TrainingCertificate/{osid}
undefined

Update certificate

put
Path parameters
osidstringRequired
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: { /// updated fields }
Responses
200

OK

application/json
Responseobject
put
/registry-service/api/v1/TrainingCertificate/{osid}
200

OK

delete certificate

delete
Path parameters
osidstringRequired
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Responses
200

OK

application/json
Responseobject
delete
/registry-service/api/v1/TrainingCertificate/{osid}
200

OK

Search Certificate

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: { "filters": { // fields } }
Responses
200

OK

application/json
Responseobject
post
/registry-service/api/v1/TrainingCertificate/search
200

OK

Public key Search

post
Header parameters
AuthorizationstringOptionalExample: {{rc_api_key}}
Body
objectOptionalExample: {"filters":{}}
Responses
200

Successful response

application/json
post
/registry-service/api/v1/PublicKey/search
200

Successful response

No content

Last updated

Was this helpful?