Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Introduction

This wiki explains the design for fetching QR code images via DIAL Service

Background & Problem Statement

At the moment LERN is connecting to cassandra ‘dialcodes.dialcode_images’ table for fetching QR Code Image URLs. Ideally this information should be fetched from DIAL service owned by Knowlg BB as this keyspace is owned by knowlgBB. Hence, an API is to be developed where an image or multiple QR code Images information can be fetched from DIAL service.

Design

To resolve above problem, new API can be published in DIAL Service ({{host}}/api/dialcode/v2/image/list) which will accept request in below format, reads data from cassandra ‘dialcodes.dialcode_images’ table and provides response in below format. Number of QR Codes as input to be controlled via a configuration 'qrimage_request_limit'.

{
    "request": {
        "dialcodes": ["Q1I5I3"]
    }
}
{
    "id": "sunbird.dialcode.images.list",
    "ver": "3.0",
    "ts": "2023-02-01T12:16:52Z+05:30",
    "params": {
        "resmsgid": "505bce18-1feb-44c3-91c3-07b8324de4f9",
        "msgid": null,
        "err": null,
        "status": "successful",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "qrcodeImagesInfo": [
            {
                "filename": "0_Q1I5I3",
                "channel": "b00bc992ef25f1a9a8d63291e20efc8d",
                "config": {},
                "createdOn": null,
                "dialcode": "Q1I5I3",
                "publisher": null,
                "status": 0,
                "url": "https://sunbirddev.blob.core.windows.net/sunbird-content-dev/in.ekstep/0_Q1I5I3.png"
            }
        ]
    }
}
  • No labels