Open karntrehan opened 1 week ago
DB Requirement: To map templates to verified templates. Since this is expected to be an extremely small dataset, a minimal db for this can be discussed.
/schema
APIs/schema/?{schemaId}
schemaID
to retrieve a specific schema/template
APIsGET /template
ID
or schemaID
.ID
or schemaID
.POST /template
DELETE /template
PUT /template
/certificate
APIsGET /certificate
certID
, templateID
, or schemaID
.PATCH /certificate
id
.id
(required) - The ID of the certificate to update.status
(required) - The new status of the certificate. Acceptable values are "enable"
or "disable"
.status
value.POST /certificate
templateId
, returning a link for sharing.templateId
(required) - The ID of the template to use for rendering.puppeteerConfig
(optional) - Configuration object to override the default PDF rendering settings.POST /certificate/preview
templateId
(required) - The ID of the template to use for rendering.puppeteerConfig
(optional) - Configuration object to override the default PDF rendering settings.Example of puppeteerConfig
:
{
"height": 1130.67,
"width": 760,
"scale": 1.33,
"landscape": true,
"displayHeaderFooter": false,
"printBackground": true
}
Note: The puppeteerConfig
parameter allows overriding default settings, such as height, width, scale, landscape orientation, and more, giving flexibility for fine-tuning during template iteration.
/certificate
/rcw/verify/{credentialID}
API/rcw/verify/{credentialID}
credentialID
(required) - The unique ID of the credential to verify and render.Great work @KDwevedi !
Just some suggestions:
GET /template
?certificate/disable
& certificate/enable
should be a PATCH
? Preferably passing the status in body.POST /certificate
we would have to pass the template ID as well I guess?Also, what would be the ETA of this implementation? Would be good to have visibility on that as well.
Since we're aiming for swagger to be our UI, we can do basic auth using a password, other methods would require the user to juggle API responses with various auth tokens
@karntrehan I should be able to deliver on the updated APIs in 2 days time, having a PR ready for review with code modifications, swagger setup, and basic tests by Thursday noon.
@KDwevedi can you pls share an update here?
@KDwevedi to finish this by 22nd November - @MohitNSamagra to check with him again
Ready by 22nd November - update to be given on the 22nd standup
Requirements:
To do: