DIGIT Core
PlatformDomainsAcademyDesign SystemFeedback
2.8
2.8
  • ☑️Introducing DIGIT Platform
    • DIGIT - Value Proposition
  • Platform
    • 🔎Overview
      • Principles
      • Architecture
        • Service Architecture
        • Infrastructure Architecture
        • Deployment Architecture
      • Technology
        • API Gateway
        • Open Source Tools
      • Checklists
        • API Checklist
        • Security Checklist
          • Security Guidelines Handbook
          • Security Flow - Exemplar
        • Performance Checklist
        • Deployment Checklist
      • UI Frameworks
        • React UI Framework
    • 🔧Core Services
      • Workflow Service
        • Setting Up Workflows
        • Configuring Workflows For An Entity
        • Workflow Auto Escalation
        • Migration To Workflow 2.0
      • Location Services
      • User Services
      • Access Control Services
      • PDF Generation Service
      • MDMS (Master Data Management Service)
        • Setting up Master Data
          • MDMS Overview
          • MDMS Rewritten
          • Configuring Tenants
          • Configuring Master Data
          • Adding New Master
          • State Level Vs City Level Master
      • Payment Gateway Service
      • User Session Management
      • Indexer Service
        • Indexer Configuration
      • URL Shortening Service
      • XState Core Chatbot
        • Xstate-Chatbot Message Localisation
        • XState-Chatbot Integration Document
      • NLP Engine Service
        • NLP Chatbot
      • SMS Template Approval Process
      • Telemetry Service
      • Document Uploader Service
      • Notification Enhancement Based On Different Channel
      • Report Service
        • Configuring New Reports
          • Impact Of Heavy Reports On Platform
          • Types Of Reports Used In Report Service
      • SMS Notification Service
        • Setting Up SMS Gateway
          • Using The Generic GET & POST SMS Gateway Interface
      • Survey Service
      • Persister Service
        • Persister Configuration
      • Encryption Service
        • Encryption Client Library
        • User Data Security Architecture
        • Guidelines for supporting User Privacy in a module
      • FileStore Service
      • ID Generation Service
      • Localization Service
        • Configuring Localization
          • Setup Base Product Localization
          • Configure SMS and Email
      • Email Notification Service
      • Searcher Service
      • Zuul Service
      • User OTP Service
      • OTP Service
      • Chatbot Service
      • National Dashboard Ingest
        • National Dashboard API Performance Testing Specs and Benchmark
        • National Dashboard: Steps for Index Creation
        • National Dashboard Adaptor Service
          • Deployment of Airflow DAG
          • Trigger Airflow DAG
          • Configure Airflow
          • Insert & Delete Data - Steps
          • Important Links & Credentials
          • Code Structure
          • KT Sessions
          • Pre-requisites For Enabling Adaptor
        • Revenue Maximisation
      • Audit Service
        • Signed Audit Performance Testing Results
      • Service Request
      • Self Contained Service Architecture (HLD)
      • Accelerators
        • Inbox Service
    • ✏️API Specifications
      • User
      • Access Control
      • Employee
      • Location
      • Localisation
      • Encryption
      • Indexer
      • File Store
      • Collection
      • DSS Ingest
      • HRMS
      • National Dashboard Ingest
      • WhatsApp Chatbot
      • Master Data Management
      • ID Generation
      • URL Shortner
      • Workflow Service
      • Workflow v2
      • Document Uploader Service
      • OTP Service
      • Reporting Service
      • PDF Generation Service
      • Payment Gateway Service
    • 🔐Data Protection & Privacy
      • Data Protection & Privacy Definitions
      • Legal Obligations For Privacy - eGov
      • Data Protection & Privacy - Global Best Practices
      • Guidelines
        • Platform Owner Guidelines
        • Implementing Agencies Guidelines
        • Admin Guidelines
        • Program Owner Guidelines
        • Data Security and Data Privacy
      • Data Privacy Policy Templates
        • eGov Data Privacy Policy
        • Implementing Agency Privacy Policy
        • Admin & Program Owner Privacy Policy
        • Supporting Agency Privacy Policy
      • Global Standards For All Roles
    • ▶️Get Started
      • Install DIGIT
      • Access DIGIT
      • Sandbox
      • Training and Certification
        • Training Resources
    • ⚒️Integrations
      • Payment
      • Notification
      • Transaction
      • Verification
      • View
      • Calculation
    • 🛣️Roadmap
    • 🎬Open Events
    • 👩‍💻Source Code
    • 👁️Project Plan
    • 📋Discussion Board
    • 🤝Contribute
  • Guides
    • 📓Installation Guide
      • DIGIT Deployment
      • Quick Setup
        • DIGIT Installation on Azure
        • DIGIT Installation on AWS
      • Production Setup
        • AWS
          • 1. Pre-requisites
          • 2. Understanding EKS
          • 3. Setup AWS Account
          • 4. Provisioning Infra Using Terraform
          • 5. Prepare Deployment Config
          • 6. Deploy DIGIT
          • 7. Bootstrap DIGIT
          • 8. Productionize DIGIT
          • FAQ
        • Azure
          • 1. Azure Pre-requisites
          • 2. Understanding AKS
          • 3. Infra-as-code (Terraform)
        • SDC
          • 1. SDC Pre-requisites
          • 2. Infra-as-code (Kubespray)
          • CI/CD Setup On SDC
        • CI/CD Set Up
          • CI/CD Build Job Pipeline Setup
        • Prepare Helm Release Chart
        • Deployment - Key Concepts
          • Security Practices
          • Readiness & Liveness
          • Resource Requests & Limits
          • Deploying DIGIT Services
          • Deployment Architecture
          • Routing Traffic
          • Backbone Deployment
    • 💽Data Setup Guide
      • User Module
      • Localisation Module
      • Location Module
    • 🚥Design Guide
      • Model Requirements
      • Design Services
      • Design User Interface
      • Checklists
    • ⚒️Developer Guide
      • Pre-requisites Training Resources
      • Backend Developer Guide
        • Section 0: Prep
          • Development Pre-requisites
          • Design Inputs
            • High Level Design
            • Low Level Design
          • Development Environment Setup
        • Section 1: Create Project
          • Generate Project Using API Specs
          • Create Database
          • Configure Application Properties
          • Import Core Models
          • Implement Repository Layer
          • Create Validation & Enrichment Layers
          • Implement Service Layer
          • Build The Web Layer
        • Section 2: Integrate Persister & Kafka
          • Add Kafka Configuration
          • Implement Kafka Producer & Consumer
          • Add Persister Configuration
          • Enable Signed Audit
          • Run Application
        • Section 3: Integrate Microservices
          • Integrate IDGen Service
          • Integrate User Service
          • Add MDMS Configuration
          • Integrate MDMS Service
          • Add Workflow Configuration
          • Integrate Workflow Service
          • Integrate URL Shortener Service
        • Section 4: Integrate Billing & Payment
          • Custom Calculator Service
          • Integrate Calculator Service
          • Payment Back Update
        • Section 5: Other Advanced Integrations
          • Add Indexer Configuration
          • Certificate Generation
        • Section 6: Run Final Application
        • Section 7: Build & Deploy Instructions
        • FAQs
      • Flutter UI Developer Guide
        • Introduction to Flutter
          • Flutter - Key Features
          • Flutter Architecture & Approach
          • Flutter Pre-Requisites
        • Setup Development Environment
          • Flutter Installation & Setup Guide
          • Setup Device Emulators/Simulators
          • Run Application
        • Build User Interfaces
          • Create Form Screen
        • Build Deploy & Publish
          • Build & Deploy Flutter Web Application
          • Generate Android APKs & App Bundles
          • Publishing App Bundle To Play Store
        • State Management With Provider & Bloc
          • Provider State Management
          • BloC State Management
        • Best Practices & Tips
        • Troubleshooting
      • UI Developer Guide
        • DIGIT-UI
        • Android Web View & How To Generate APK
        • DIGIT UI Development Pre-requisites
        • UI Configuration (DevOps)
        • Local Development Setup
        • Run Application
        • Create New Screen In DIGIT-UI
          • Create Screen (FormComposer)
          • Inbox/Search Screen
          • Workflow Component
        • Customisation
          • Integrate External Web Application/UI With DIGIT UI
          • Utility - Pre-Process MDMS Configuration
          • CSS Customisation
        • Citizen Module Setup
          • Sample screenshots
          • Project Structure
          • Install Dependency
          • Import Required Components
          • Write Citizen Module Code
          • Citizen Landing Screen
        • Employee Module Setup
          • Write Employee Module Code
        • Build & Deploy
        • Setup Monitoring Tools
        • FAQs
          • Troubleshoot Using Browser Network Tab
          • Debug Android App Using Chrome Browser
    • 🔄Operations Guide
      • DIGIT - Infra Overview
      • Setup Central Instance Infra
      • Central Monitoring Dashboard Setup
      • Kubernetes
        • RBAC Management
        • DB Dump - Playground
      • Setup Jenkins - Docker way
      • GitOps
        • Git Client installation
        • GitHub organization creation
        • Adding new SSH key to it
        • GitHub repo creation
        • GitHub Team creation
        • Enabling Branch protection:
        • CODEOWNER Reviewers
        • Adding Users to the Git
        • Setting up an OAuth with GitHub
        • Fork (Fork the mdms,config repo with a tenant-specific branch)
      • Working with Kubernetes
        • Installation of Kubectl
      • Containerizing application using Docker
        • Creation of Dockerhub account
      • Infra provisioning using Terraform
        • Installation of Terraform
      • Customization of existing tf templates
      • Cert-Manager
        • Obtaining SSL certificates with the help of cluster-issuer
      • Moving Docker Images
      • Pre and post deployment checklist
      • Multi-tenancy Setup
      • Availability
        • Infrastructure
        • Backbone services
          • Database
          • Kafka
          • Kafka Connect
          • Elastic search
            • ElasticSearch Direct Upgrade
            • Elastic Search Rolling Upgrade
        • Core services
        • DIGIT apps
        • DSS dashboard
      • Observability
        • ES-Curator to clear old logs/indices
        • Monitoring
        • Tracing
        • Jaeger Tracing Setup
        • Logging
        • eGov Monitoring & Alerting Setup
        • eGov Logging Setup
      • Performance
        • What to monitor?
          • Infrastructure
          • Backbone services
          • Core services
        • Identifying bottlenecks
        • Solutions
      • Handling errors
      • Security
      • Reliability and disaster recovery
      • Privacy
      • Skillsets/hiring
      • Incident management processes
      • Kafka Troubleshooting Guide
        • How to clean up Kafka logs
        • How to change or reset consumer offset in Kafka?
      • SRE Rituals
      • FAQs
        • I am unable to login to the citizen or employee portal. The UI shows a spinner.
        • My DSS dashboard is not reflecting accurate numbers? What can I do?
      • Deployment using helm
        • Helm installation:
        • Helm chart creation
        • Helm chart customization
      • How to Dump Elasticsearch Indexes
      • Deploy Nginx-Ingress-Controller
      • Deployment Job Pipeline Setup
      • OAuth2-Proxy Setup
      • Jira Ticket Creation
  • Reference
    • 👉Setup Basics
      • Setup Requirements
        • Tech Enablement Training - Essential Skills and Pre-requisites
        • Tech Enablement Training (eDCR) - Essential Skills and Prerequisites
          • Development Control Rules (Digit-DCR)
          • eDCR Approach Guide
        • DIGIT Rollout Program Governance
        • DevOps Skills Requirements
        • Infra Requirements
        • Team Composition for DIGIT Implementation
        • Infra Best Practices
        • Operational Best Practices
        • Why Kubernetes For DIGIT
      • Supported Clouds
        • Google Cloud
        • Azure
        • AWS
        • VSphere
        • SDC
      • Deployment - Key Concepts
        • Security Practices
        • CI/CD
        • Readiness & Liveness
        • Resource Requests & Limits
      • Understanding ERP Stack
        • ERP Monolithic Architecture
        • ERP Hybrid Architecture
        • ERP Coexistence Architecture
        • APMDP-HYBRID-INFRA ARCHITECTURE
        • eGov SmartCity eGovernance Suite
        • ERP Deployment Process
        • ERP Release Process
        • ERP User Guide
      • Deploying DIGIT Services
        • Deployment Architecture
        • Routing Traffic
        • Backbone Deployment
      • Troubleshooting
        • Distributed Tracing
        • Logging
        • Monitoring & Alerts
    • 📥Reference Reads
      • Analytics
      • DevSecOps
      • Low Code No Code
        • Application Specification
      • Beneficiary Eligibility
      • Government and Open Digital Platforms
      • Microservices and Low Code No Code
      • Registries
      • Platform Orientation - Overview
    • 🔏Data Security
      • Signed Data Audit
      • Encryption Techniques
      • Approaches to handle Encrypted Data
    • ❕Privacy
    • 🕹️DevOps
      • 1. How DNS works
      • 2. Load Balancer
      • 3. SSL/Cert-manager
      • 4.Ingress,WAF
      • 5.VPC
      • 6.Subnets
      • 7.EKS
      • 8.Worker Node Group
      • 9.RDS
      • 10.NAT
      • 11.Internet Gateway
      • 12.Block Storage (EBS Volumes)
      • 13.Object Storage (S3)
      • 14. Telemetry
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • Overview
  • Pre-requisites
  • Setup & Key Functionalities
  • Setup
  • Definitions
  • Functionalities
  • Deployment Details
  • Integration Details
  • Integration Scope
  • Integration Benefits
  • Integration Steps
  • API Details
  • Module-wise Index Properties & Ingest Curls
  • 1. Property Tax -
  • 2. Water and Sewerage -
  • 3. FireNOC -
  • 4. Public Grievance Redressal -
  • 5. Trade License -
  • 6. MCollect -
  • 7. Online Building Permission System -
  • 8. Common -

Was this helpful?

  1. Platform
  2. Core Services

National Dashboard Ingest

PreviousChatbot ServiceNextNational Dashboard API Performance Testing Specs and Benchmark

Last updated 2 years ago

Was this helpful?

Overview

The objectives of the national dashboard-ingest service are listed below.

  1. To provide a one-stop framework for ingesting data regardless of a data source based on configuration.

  2. To create provision for ingest based on module-wise requirements which directly or indirectly require aggregated data ingestion functionality.

Pre-requisites

  1. Prior knowledge of Java/J2EE.

  2. Prior knowledge of SpringBoot.

  3. Prior knowledge of PostgreSQL.

  4. Prior knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.

  5. Prior knowledge of ElasticSearch.

Setup & Key Functionalities

Setup

  1. Step 1: Define the index name for the module as per your requirement in module.index.mapping key present in the configuration here - .

  2. Step 2: Define the allowed metrics for the module as per your requirement in module.fields.mapping key present in the configuration here -

  3. Step 3: Define the allowed group-by fields for the module as per your requirement in module.allowed.groupby.fields.mapping key present in the configuration here -

  4. Step 4: Define the master data index name as per your requirement in master.data.index key present in the configuration here -

  5. Step 5: Define the allowed metrics for the master data index as per your requirement in master.module.fields.mapping key present in the configuration here -

  6. Step 6: Create Kafka connectors for all the modules that have been configured. A sample request for creating a trade license national dashboard Kafka connector is as follows -

curl --location --request POST 'http://kafka-connect.kafka-cluster:8083/connectors/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "cms-case-es-sink9128",
    "config": {
        "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
        "connection.url": "http://elasticsearch-data-v1.es-cluster:9200/",
        "type.name": "nss",
        "topics": "tl-national-dashboard",
        "key.ignore": true,
        "schemas.enable": false,
        "schema.ignore": true,
        "value.converter.schemas.enable": false,
        "key.converter": "org.apache.kafka.connect.storage.StringConverter",
        "value.converter": "org.apache.kafka.connect.json.JsonConverter",
        "batch.size": 10,
        "max.buffered.records": 500,
        "flush.timeout.ms": 600000,
        "retry.backoff.ms": 5000,
        "read.timout.ms": 10000,
        "linger.ms": 100,
        "max.in.flight.requests": 2,
        "errors.log.enable": true,
        "errors.deadletterqueue.topic.name": "nss-es-failed",
        "tasks.max": 1
    }
}'

7. Step 7: Run the national-dashboard-ingest application along with the national-dashboard-ingest-kafka-pipeline.

Definitions

  1. Config file - A YAML (xyz.yml) file which contains configuration for running national dashboard ingest.

  2. API - A REST endpoint to post data based on the configuration.

Functionalities

  1. When the national dashboard ingests metrics API is hit, all the data payload lookup keys are first checked against the db to determine whether they already exist or not. The db table currently being used for storing lookup keys is nss-ingest-data.

  2. If the record for a given date and area details is not present, the payload is then flattened and pushed to nss-ingest-keydata topic.

  3. National dashboard ingest Kafka pipeline consumer listens on nss-ingest-keydata topic and according to the module to which the data belongs, pushes it to the respective topic defined in the module.index.mapping key.

  4. Once the national dashboard ingests the Kafka pipeline and pushes data to the respective topic, a Kafka connector then takes the flattened records from that topic and ingests into ElasticSearch.

Deployment Details

  1. Add configs for different modules required for National Dashboard Ingest Service and National Dashboard Kafka Pipeline service.

  2. Deploy the latest version of National Dashboard Ingest and National dashboard Kafka pipeline service.

  3. Add role-action mapping for APIs.

Integration Details

Integration Scope

The national dashboard service is used to push aggregated data present in systems and persisting them onto elasticsearch on top of which dashboards can be built for visualizing and analyzing data.

Integration Benefits

  • Can perform service-specific business logic without impacting the other module.

  • In the future, if we want to expose the application to citizens then it can be done easily.

Integration Steps

  1. To integrate, the host of the national-dashboard-ingest-service module should be overwritten in the helm chart.

  2. national-dashboard/metric/_ingest should be added as the search endpoint for the config added.

  3. national-dashboard/masterdata/_ingest should be added as the search endpoint for the config added.

API Details

URI: The format of the ingest API to be used to ingest data using national-dashboard-ingest is as follows: national-dashboard/metric/_ingest

Example ingest request body -

{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "82c7da0d-da73-4c35-8ea7-5b231369b4cd",
        "userInfo": {
        "id": 41737,
        "uuid": "9a81233f-e212-4035-a831-320b70e93b82",
        "userName": "NDSS1",
        "name": "National Dashboard Viewer",
        "mobileNumber": "7777888813",
        "emailId": null,
        "locale": null,
        "type": "EMPLOYEE",
        "roles": [
            {
                "name": "Employee",
                "code": "SUPERUSER",
                "tenantId": "pb.amritsar"
            },
            {
                "name": "National Dashboard Admin",
                "code": "NATADMIN",
                "tenantId": "pb.amritsar"
            },
            {
                "name": "FSM Employee Dashboard Viewer",
                "code": "FSM_DASHBOARD_VIEWER",
                "tenantId": "pb.amritsar"
            },
            {
                "name": "National Dashboard Admin",
                "code": "NATADMIN",
                "tenantId": "pb"
            }
        ],
        "active": true,
        "tenantId": "pb.amritsar",
        "permanentCity": null
    }
    },
    "Data": [
        {
        "date": "14-01-2017",
        "module": "MCOLLECT",
        "ward": "GODOWN AREA (BHABAT) - B14-SECTOR-13 - A1",
        "ulb": "pb.amritsar",
        "region": "Amritsar-MC",
        "state": "Punjab",
        "metrics": {
            "numberOfCategories": 240,
            "todaysCollection": [
                {
                    "groupBy": "paymentMode",
                    "buckets": [
                        {
                            "name": "UPI",
                            "value": 70
                        },
                        {
                            "name": "CASH",
                            "value": 45
                        },
                        {
                            "name": "DEBIT_CARD",
                            "value": 20
                        }
                    ]
                },
                {
                    "groupBy": "status",
                    "buckets": [
                        {
                            "name": "NEW",
                            "value": 70
                        },
                        {
                            "name": "DEPOSITED",
                            "value": 20
                        },
                        {
                            "name": "DISHONOURED",
                            "value": 45
                        }
                    ]
                },
                {
                    "groupBy": "category",
                    "buckets": [
                        {
                            "name": "COMMON_MASTERS_HOARDING",
                            "value": 50
                        },
                        {
                            "name": "COMMON_MASTERS_ROAD_SHOW",
                            "value": 20
                        },
                        {
                            "name": "COMMON_MASTERS_UNIPOLLS",
                            "value": 5
                        },
                        {
                            "name": "COMMON_MASTERS_AUCTION_FEE",
                            "value": 25
                        },
                        {
                            "name": "COMMON_MASTERS_USER_FEES",
                            "value": 35
                        }
                    ]
                }
            ],
            "numberOfReceipts": [
                {
                    "groupBy": "status",
                    "buckets": [
                        {
                            "name": "NEW",
                            "value": 70
                        },
                        {
                            "name": "DEPOSITED",
                            "value": 105
                        },
                        {
                            "name": "DISHONOURED",
                            "value": 50
                        }
                    ]
                },
                {
                    "groupBy": "paymentMode",
                    "buckets": [
                        {
                            "name": "CASH",
                            "value": 70
                        },
                        {
                            "name": "CHEQUE",
                            "value": 105
                        },
                        {
                            "name": "DEBIT_CARD",
                            "value": 35
                        },
                        {
                            "name": "ONLINE",
                            "value": 15
                        }
                    ]
                },
                {
                    "groupBy": "category",
                    "buckets": [
                        {
                            "name": "COMMON_MASTERS_HOARDING",
                            "value": 50
                        },
                        {
                            "name": "COMMON_MASTERS_ROAD_SHOW",
                            "value": 40
                        },
                        {
                            "name": "COMMON_MASTERS_UNIPOLLS",
                            "value": 45
                        },
                        {
                            "name": "COMMON_MASTERS_AUCTION_FEE",
                            "value": 55
                        },
                        {
                            "name": "COMMON_MASTERS_USER_FEES",
                            "value": 35
                        }
                    ]
                }
            ],
            "numberOfChallans": [
                {
                    "groupBy": "challanStatus",
                    "buckets": [
                        {
                            "name": "PAID",
                            "value": 50
                        },
                        {
                            "name": "CANCELLED",
                            "value": 105
                        },
                        {
                            "name": "ACTIVE",
                            "value": 35
                        }
                    ]
                },
                {
                    "groupBy": "category",
                    "buckets": [
                        {
                            "name": "COMMON_MASTERS_HOARDING",
                            "value": 50
                        },
                        {
                            "name": "COMMON_MASTERS_ROAD_SHOW",
                            "value": 40
                        },
                        {
                            "name": "COMMON_MASTERS_UNIPOLLS",
                            "value": 45
                        },
                        {
                            "name": "COMMON_MASTERS_AUCTION_FEE",
                            "value": 20
                        },
                        {
                            "name": "COMMON_MASTERS_USER_FEES",
                            "value": 35
                        }
                    ]
                }
            ]
        }
    }]
}

Module-wise Index Properties & Ingest Curls

The following section contains module-wise index names, index mapping and ingest curls for ingesting data to national dashboard indexes.

1. Property Tax -

a. Index - pt-national-dashboard

b. Index mapping -

"properties" : {
          "assessedPropertiesForUsageCategory" : {
            "type" : "long"
          },
          "assessments" : {
            "type" : "long"
          },
          "cessForUsageCategory" : {
            "type" : "long"
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "financialYear" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "interestForUsageCategory" : {
            "type" : "long"
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "penaltyForUsageCategory" : {
            "type" : "long"
          },
          "propertiesRegisteredForFinancialYear" : {
            "type" : "long"
          },
          "propertyTaxForUsageCategory" : {
            "type" : "long"
          },
          "rebateForUsageCategory" : {
            "type" : "long"
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "todaysClosedApplications" : {
            "type" : "long"
          },
          "noOfPropertiesPaidToday" : {
            "type" : "long"
          },
          "todaysCollectionForUsageCategory" : {
            "type" : "long"
          },
          "todaysTotalApplications" : {
            "type" : "long"
          },
          "transactionsForUsageCategory" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "usageCategory" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "null",
        "userInfo": {
            "id": 11131,
            "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
            "userName": "NDSS",
            "name": "Lata",
            "mobileNumber": "7897807878",
            "emailId": null,
            "locale": null,
            "type": "EMPLOYEE",
            "roles": [
                {
                    "name": "National Dashboard Admin",
                    "code": "NATADMIN",
                    "tenantId": "pg"
                }
            ],
            "active": true,
            "tenantId": "uk.rishikesh",
            "permanentCity": null
        }
    },
    "Data": [
        {
            "date": "23-03-2022",
            "module": "PT",
            "ward": "Block 1",
            "ulb": "uk.rishikesh",
            "region": "Rishikesh-MC",
            "state": "Uttarakhand",
            "metrics": {
                "assessments": 29,
                "todaysTotalApplications": 62,
                "todaysClosedApplications": 21,
                "propertiesRegistered": [
                    {
                        "groupBy": "financialYear",
                        "buckets": [
                            {
                                "name": "2018-19",
                                "value": 12
                            },
                            {
                                "name": "2019-20",
                                "value": 18
                            },
                            {
                                "name": "2020-21",
                                "value": 21
                            }
                        ]
                    }
                ],
                "assessedProperties": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 21
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 11
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 13
                            }
                        ]
                    }
                ],
                "transactions": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 19
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 13
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 13
                            }
                        ]
                    }
                ],
                "todaysCollection": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 16000
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 22500
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 26000
                            }
                        ]
                    }
                ],
                "propertyTax": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 1200
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 2100
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 100
                            }
                        ]
                    }
                ],
                "cess": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 1300
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 1900
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 1000
                            }
                        ]
                    }
                ],
                "rebate": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": -500
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": -1200
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": -900
                            }
                        ]
                    }
                ],
                "penalty": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 1300
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 1500
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 1500
                            }
                        ]
                    }
                ],
                "interest": [
                    {
                        "groupBy": "usageCategory",
                        "buckets": [
                            {
                                "name": "RESIDENTIAL",
                                "value": 1900
                            },
                            {
                                "name": "COMMERCIAL",
                                "value": 1800
                            },
                            {
                                "name": "INDUSTRIAL",
                                "value": 600
                            }
                        ]
                    }
                ]
            }
        }
    ]
}'

2. Water and Sewerage -

a. Index name - ws-national-dashboard

b. Index mapping -

"properties" : {
          "channelType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "connectionType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "connectionsCreatedForChannelType" : {
            "type" : "long"
          },
          "connectionsCreatedForConnectionType" : {
            "type" : "long"
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "duration" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "meterType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "paymentChannelType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "pendingConnectionsForDuration" : {
            "type" : "long"
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "sewerageConnectionsForChannelType" : {
            "type" : "long"
          },
          "sewerageConnectionsForUsageType" : {
            "type" : "long"
          },
          "slaCompliance" : {
            "type" : "long"
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "taxHeads" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "tenantId" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "todaysClosedApplications" : {
            "type" : "long"
          },
          "todaysCollectionForChannelType" : {
            "type" : "long"
          },
          "todaysCollectionForConnectionType" : {
            "type" : "long"
          },
          "todaysCollectionForPaymentChannelType" : {
            "type" : "long"
          },
          "todaysCollectionForTaxHeads" : {
            "type" : "long"
          },
          "todaysCollectionForUsageType" : {
            "type" : "long"
          },
          "todaysCompletedApplicationsWithinSLA" : {
            "type" : "long"
          },
          "todaysTotalApplications" : {
            "type" : "long"
          },
          "transactions" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "usageType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "waterConnectionsForChannelType" : {
            "type" : "long"
          },
          "waterConnectionsForMeterType" : {
            "type" : "long"
          },
          "waterConnectionsForUsageType" : {
            "type" : "long"
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "{{access_token}}",
         "userInfo": {
             "id": 11131,
        "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
        "userName": "NDSS",
        "name": "Lata",
        "mobileNumber": "7897807878",
        "emailId": null,
        "locale": null,
        "type": "EMPLOYEE",
        "roles": [
            {
                "name": "National Dashboard Admin",
                "code": "NATADMIN",
                "tenantId": "pg"
            }
        ],
        "active": true,
        "tenantId": "pb.amritsar",
        "permanentCity": null
        }
    },
    "Data": [
      {
            "date": "20-02-2022",
            "module": "WS",
            "ward": "Ward 1",
            "ulb": "pb.amritsar",
            "region": "Amritsar-MC",
            "state": "Punjab",
            "metrics": {
                "transactions": 2345,
                "connectionsCreated": [
                    {
                        "groupBy": "connectionType",
                        "buckets": [
                            {
                                "name": "WATER.METERED",
                                "value": 110
                            },
                            {
                                "name": "WATER.NONMETERED",
                                "value": 50
                            },
                            {
                                "name": "SEWERAGE",
                                "value": 50
                            }
                        ]
                    },
                    {
                        "groupBy": "channelType",
                        "buckets": [
                            {
                                "name": "Counter",
                                "value": 60
                            },
                            {
                                "name": "Online",
                                "value": 70
                            },
                            {
                                "name": "System",
                                "value": 50
                            },
                            {
                                "name": "CSC",
                                "value": 30
                            }
                        ]
                    }
                ],
                "todaysCollection": [
                    {
                        "groupBy": "usageType",
                        "buckets": [
                            {
                                "name": "Domestic",
                                "value": 11000
                            },
                            {
                                "name": "Commercial",
                                "value": 5000
                            },
                            {
                                "name": "Institutional",
                                "value": 5600
                            },
                            {
                                "name": "Domestic SLC",
                                "value": 7200
                            },
                            {
                                "name": "Domestic Exempted",
                                "value": 3800
                            },
                            {
                                "name": "Commercial Motor",
                                "value": 4800
                            }
                        ]
                    },
                    {
                        "groupBy": "paymentChannelType",
                        "buckets": [
                            {
                                "name": "System",
                                "value": 8000
                            },
                            {
                                "name": "Paytm",
                                "value": 7000
                            },
                            {
                                "name": "Field",
                                "value": 3700
                            },
                            {
                                "name": "Razorpay",
                                "value": 2200
                            },
                            {
                                "name": "PayU",
                                "value": 1000
                            },
                            {
                                "name": "BBPS",
                                "value": 1400
                            },
                            {
                                "name": "POS",
                                "value": 5100
                            },
                            {
                                "name": "Sewakendra",
                                "value": 5600
                            },
                            {
                                "name": "Freecharge",
                                "value": 3400
                            }
                        ]
                    },
                    {
                        "groupBy": "taxHeads",
                        "buckets": [
                            {
                                "name": "INTEREST",
                                "value": 7000
                            },
                            {
                                "name": "LATE.CHARGES",
                                "value": 8500
                            },
                            {
                                "name": "ADVANCE",
                                "value": 3700
                            },
                            {
                                "name": "CURRENT.CHARGES",
                                "value": 12422
                            },
                            {
                                "name": "ARREAR.CHARGES",
                                "value": 5778
                            }
                        ]
                    },
                    {
                        "groupBy": "connectionType",
                        "buckets": [
                            {
                                "name": "WATER.METERED",
                                "value": 18700
                            },
                            {
                                "name": "WATER.NONMETERED",
                                "value": 8500
                            },
                            {
                                "name": "SEWERAGE",
                                "value": 10200
                            }
                        ]
                    }
                ],
                "sewerageConnections": [
                    {
                        "groupBy": "channelType",
                        "buckets": [
                            {
                                "name": "ONLINE",
                                "value": 30
                            },
                            {
                                "name": "CSC",
                                "value": 11
                            },
                            {
                                "name": "SYSTEM",
                                "value": 9
                            }
                        ]
                    },
                    {
                        "groupBy": "usageType",
                        "buckets": [
                            {
                                "name": "Domestic",
                                "value": 11
                            },
                            {
                                "name": "Commercial",
                                "value": 10
                            },
                            {
                                "name": "Residential",
                                "value": 14
                            },
                            {
                                "name": "Institutional",
                                "value": 6
                            },
                            {
                                "name": "Domestic Exempted",
                                "value": 9
                            }
                        ]
                    }
                ],
                "waterConnections": [
                    {
                        "groupBy": "channelType",
                        "buckets": [
                            {
                                "name": "Counter",
                                "value": 47
                            },
                            {
                                "name": "ONLINE",
                                "value": 53
                            },
                            {
                                "name": "CSC",
                                "value": 15
                            },
                            {
                                "name": "SYSTEM",
                                "value": 45
                            }
                        ]
                    },
                    {
                        "groupBy": "usageType",
                        "buckets": [
                            {
                                "name": "Domestic",
                                "value": 123
                            },
                            {
                                "name": "Commercial",
                                "value": 22
                            },
                            {
                                "name": "Domestic Exempted",
                                "value": 15
                            }
                        ]
                    },
                    {
                        "groupBy": "meterType",
                        "buckets": [
                            {
                                "name": "METERED",
                                "value": 110
                            },
                            {
                                "name": "NON.METERED",
                                "value": 50
                            }
                        ]
                    }
                ],
                "pendingConnections": [
                    {
                        "groupBy": "duration",
                        "buckets": [
                            {
                                "name": "0to3Days",
                                "value": 11
                            },
                            {
                                "name": "3to7Days",
                                "value": 50
                            },
                            {
                                "name": "7to15Days",
                                "value": 5
                            },
                            {
                                "name": "MoreThan15Days",
                                "value": 2
                            }
                        ]
                    }
                ],
                "slaCompliance": 24,
                "todaysTotalApplications": 35,
                "todaysClosedApplications": 33,
                "todaysCompletedApplicationsWithinSLA": 46
            }
        }
    ]
}'

3. FireNOC -

a. Index name - firenoc-national-dashboard

b. Index mapping -

"properties" : {
          "actualNOCIssuedByDeptForDepartment" : {
            "type" : "long"
          },
          "actualNOCIssuedForDepartment" : {
            "type" : "long"
          },
          "actualNOCIssuedForUsageType" : {
            "type" : "long"
          },
          "applicationType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "avgDaysToIssueActualNOCForDepartment" : {
            "type" : "long"
          },
          "avgDaysToIssueProvisionalNOCForDepartment" : {
            "type" : "long"
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis"
          },
          "department" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "nocIssuedTodayForType" : {
            "type" : "long"
          },
          "paymentMode" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "provisionalNOCIssuedForDepartment" : {
            "type" : "long"
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "slaComplianceActualForDepartment" : {
            "type" : "long"
          },
          "slaComplianceProvisionalForDepartment" : {
            "type" : "long"
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "tenantId" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "todaysApplicationsForApplicationType" : {
            "type" : "long"
          },
          "todaysApplicationsForDepartment" : {
            "type" : "long"
          },
          "todaysClosedApplications" : {
            "type" : "long"
          },
          "todaysCollectionForDepartment" : {
            "type" : "long"
          },
          "todaysCollectionForPaymentMode" : {
            "type" : "long"
          },
          "todaysCompletedApplicationsWithinSLA" : {
            "type" : "long"
          },
          "type" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "usageType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "81ee8cb1-713c-40b3-a935-d9ae66d547af",
        "userInfo": {
            "id": 11131,
            "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
            "userName": "NDSS",
            "name": "Lata",
            "mobileNumber": "7897807878",
            "emailId": null,
            "locale": null,
            "type": "EMPLOYEE",
            "roles": [
                {
                    "name": "National Dashboard Admin",
                    "code": "NATADMIN",
                    "tenantId": "pg"
                }
            ],
            "active": true,
            "tenantId": "pb.amritsar",
            "permanentCity": null
        }
    },
    "Data": [
        {
            "date": "25-02-2022",
            "module": "FIRENOC",
            "ward": "Ward 1",
            "ulb": "pb.amritsar",
            "region": "Amritsar-MC",
            "state": "Punjab",
            "metrics": {
                "todaysClosedApplications": 18,
                "todaysCompletedApplicationsWithinSLA": 32,
                "todaysApplications": [
                    {
                        "groupBy": "applicationType",
                        "buckets": [
                            {
                                "name": "ACTUAL",
                                "value": 30
                            },
                            {
                                "name": "PROVISIONAL",
                                "value": 54
                            }
                        ]
                    },
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 35
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 49
                            }
                        ]
                    }
                ],
                "todaysCollection": [
                    {
                        "groupBy": "paymentMode",
                        "buckets": [
                            {
                                "name": "CASH",
                                "value": 5465
                            },
                            {
                                "name": "CHEQUE",
                                "value": 1300
                            },
                            {
                                "name": "DEBIT_CARD",
                                "value": 1400
                            },
                            {
                                "name": "ONLINE",
                                "value": 7570
                            }
                        ]
                    },
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 11767
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 3968
                            }
                        ]
                    }
                ],
                "nocIssuedToday": [
                    {
                        "groupBy": "type",
                        "buckets": [
                            {
                                "name": "ACTUAL",
                                "value": 13
                            },
                            {
                                "name": "PROVISIONAL",
                                "value": 65
                            }
                        ]
                    }
                ],
                "provisionalNOCIssued": [
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 30
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 23
                            }
                        ]
                    }
                ],
                "actualNOCIssued": [
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 56
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 43
                            }
                        ]
                    },
                    {
                        "groupBy": "usageType",
                      "buckets": [
                            {
                                "name": "GROUP_A_RESIDENTIAL.SUBDIVISIONA-1",
                                "value": 20
                            },
                            {
                                "name": "GROUP_B_EDUCATIONAL.SUBDIVISIONB-1",
                                "value": 30
                            },
                            {
                                "name": "GROUP_C_INSTITUTIONAL.SUBDIVISIONC-1",
                                "value": 50
                            },
                            {
                                "name": "GROUP_A_RESIDENTIAL.SUBDIVISIONA-2",
                                "value": 60
                            },
                            {
                                "name": "GROUP_B_EDUCATIONAL.SUBDIVISIONB-2",
                                "value": 70
                            },
                            {
                                "name": "GROUP_C_INSTITUTIONAL.SUBDIVISIONC-2",
                                "value": 80
                            }
                        ]
                    }
                ],
                "avgDaysToIssueProvisionalNOC": [
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 54
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 43
                            }
                        ]
                    }
                ],
                "slaComplianceActual": [
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 65
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 33
                            }
                        ]
                    }
                ],
                "slaComplianceProvisional": [
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 23
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 34
                            }
                        ]
                    }
                ],
                "avgDaysToIssueActualNOC": [
                    {
                        "groupBy": "department",
                        "buckets": [
                            {
                                "name": "DEPARTMENT1",
                                "value": 43
                            },
                            {
                                "name": "DEPARTMENT2",
                                "value": 12
                            }
                        ]
                    }
                ]
            }
        }
    ]
}'

4. Public Grievance Redressal -

a. Index name - pgr-national-dashboard

b. Index mapping -

"properties" : {
          "averageSolutionTimeForDepartment" : {
            "type" : "long"
          },
          "category" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "channel" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "closedComplaints" : {
            "type" : "long"
          },
          "completionRate" : {
            "type" : "long"
          },
          "completionRateForDepartment" : {
            "type" : "long"
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "department" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "resolvedComplaints" : {
            "type" : "long"
          },
          "slaAchievement" : {
            "type" : "long"
          },
          "slaAchievementForDepartment" : {
            "type" : "long"
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "status" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "todaysAssignedComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysClosedComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysComplaintsForCategory" : {
            "type" : "long"
          },
          "todaysComplaintsForChannel" : {
            "type" : "long"
          },
          "todaysComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysComplaintsForStatus" : {
            "type" : "long"
          },
          "todaysOpenComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysReassignRequestedComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysReassignedComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysRejectedComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysReopenedComplaintsForDepartment" : {
            "type" : "long"
          },
          "todaysResolvedComplaintsForDepartment" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "uniqueCitizens" : {
            "type" : "long"
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "{{access_token}}",
         "userInfo": {
             "id": 11131,
        "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
        "userName": "NDSS",
        "name": "Lata",
        "mobileNumber": "7897807878",
        "emailId": null,
        "locale": null,
        "type": "EMPLOYEE",
        "roles": [
            {
                "name": "National Dashboard Admin",
                "code": "NATADMIN",
                "tenantId": "pg"
            }
        ],
        "active": true,
        "tenantId": "pb.amritsar",
        "permanentCity": null
        }
    },
    "Data": [
      {
            "date": "20-02-2022",
            "module": "WS",
            "ward": "Ward 1",
            "ulb": "pb.amritsar",
            "region": "Amritsar-MC",
            "state": "Punjab",
            "metrics": {
                "transactions": 2345,
                "connectionsCreated": [
                    {
                        "groupBy": "connectionType",
                        "buckets": [
                            {
                                "name": "WATER.METERED",
                                "value": 110
                            },
                            {
                                "name": "WATER.NONMETERED",
                                "value": 50
                            },
                            {
                                "name": "SEWERAGE",
                                "value": 50
                            }
                        ]
                    },
                    {
                        "groupBy": "channelType",
                        "buckets": [
                            {
                                "name": "Counter",
                                "value": 60
                            },
                            {
                                "name": "Online",
                                "value": 70
                            },
                            {
                                "name": "System",
                                "value": 50
                            },
                            {
                                "name": "CSC",
                                "value": 30
                            }
                        ]
                    }
                ],
                "todaysCollection": [
                    {
                        "groupBy": "usageType",
                        "buckets": [
                            {
                                "name": "Domestic",
                                "value": 11000
                            },
                            {
                                "name": "Commercial",
                                "value": 5000
                            },
                            {
                                "name": "Institutional",
                                "value": 5600
                            },
                            {
                                "name": "Domestic SLC",
                                "value": 7200
                            },
                            {
                                "name": "Domestic Exempted",
                                "value": 3800
                            },
                            {
                                "name": "Commercial Motor",
                                "value": 4800
                            }
                        ]
                    },
                    {
                        "groupBy": "paymentChannelType",
                        "buckets": [
                            {
                                "name": "System",
                                "value": 8000
                            },
                            {
                                "name": "Paytm",
                                "value": 7000
                            },
                            {
                                "name": "Field",
                                "value": 3700
                            },
                            {
                                "name": "Razorpay",
                                "value": 2200
                            },
                            {
                                "name": "PayU",
                                "value": 1000
                            },
                            {
                                "name": "BBPS",
                                "value": 1400
                            },
                            {
                                "name": "POS",
                                "value": 5100
                            },
                            {
                                "name": "Sewakendra",
                                "value": 5600
                            },
                            {
                                "name": "Freecharge",
                                "value": 3400
                            }
                        ]
                    },
                    {
                        "groupBy": "taxHeads",
                        "buckets": [
                            {
                                "name": "INTEREST",
                                "value": 7000
                            },
                            {
                                "name": "LATE.CHARGES",
                                "value": 8500
                            },
                            {
                                "name": "ADVANCE",
                                "value": 3700
                            },
                            {
                                "name": "CURRENT.CHARGES",
                                "value": 12422
                            },
                            {
                                "name": "ARREAR.CHARGES",
                                "value": 5778
                            }
                        ]
                    },
                    {
                        "groupBy": "connectionType",
                        "buckets": [
                            {
                                "name": "WATER.METERED",
                                "value": 18700
                            },
                            {
                                "name": "WATER.NONMETERED",
                                "value": 8500
                            },
                            {
                                "name": "SEWERAGE",
                                "value": 10200
                            }
                        ]
                    }
                ],
                "sewerageConnections": [
                    {
                        "groupBy": "channelType",
                        "buckets": [
                            {
                                "name": "ONLINE",
                                "value": 30
                            },
                            {
                                "name": "CSC",
                                "value": 11
                            },
                            {
                                "name": "SYSTEM",
                                "value": 9
                            }
                        ]
                    },
                    {
                        "groupBy": "usageType",
                        "buckets": [
                            {
                                "name": "Domestic",
                                "value": 11
                            },
                            {
                                "name": "Commercial",
                                "value": 10
                            },
                            {
                                "name": "Residential",
                                "value": 14
                            },
                            {
                                "name": "Institutional",
                                "value": 6
                            },
                            {
                                "name": "Domestic Exempted",
                                "value": 9
                            }
                        ]
                    }
                ],
                "waterConnections": [
                    {
                        "groupBy": "channelType",
                        "buckets": [
                            {
                                "name": "Counter",
                                "value": 47
                            },
                            {
                                "name": "ONLINE",
                                "value": 53
                            },
                            {
                                "name": "CSC",
                                "value": 15
                            },
                            {
                                "name": "SYSTEM",
                                "value": 45
                            }
                        ]
                    },
                    {
                        "groupBy": "usageType",
                        "buckets": [
                            {
                                "name": "Domestic",
                                "value": 123
                            },
                            {
                                "name": "Commercial",
                                "value": 22
                            },
                            {
                                "name": "Domestic Exempted",
                                "value": 15
                            }
                        ]
                    },
                    {
                        "groupBy": "meterType",
                        "buckets": [
                            {
                                "name": "METERED",
                                "value": 110
                            },
                            {
                                "name": "NON.METERED",
                                "value": 50
                            }
                        ]
                    }
                ],
                "pendingConnections": [
                    {
                        "groupBy": "duration",
                        "buckets": [
                            {
                                "name": "0to3Days",
                                "value": 11
                            },
                            {
                                "name": "3to7Days",
                                "value": 50
                            },
                            {
                                "name": "7to15Days",
                                "value": 5
                            },
                            {
                                "name": "MoreThan15Days",
                                "value": 2
                            }
                        ]
                    }
                ],
                "slaCompliance": 24,
                "todaysTotalApplications": 35,
                "todaysClosedApplications": 33,
                "todaysCompletedApplicationsWithinSLA": 46
            }
        }
    ]
}'

5. Trade License -

a. Index name - tl-national-dashboard

b. Index mapping -

"properties" : {
          "adhocPenalty" : {
            "type" : "long"
          },
          "adhocRebate" : {
            "type" : "long"
          },
          "applicationsMovedTodayForStatus" : {
            "type" : "long"
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "status" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "tlTax" : {
            "type" : "long"
          },
          "todaysApplications" : {
            "type" : "long"
          },
          "todaysCollectionForTradeType" : {
            "type" : "long"
          },
          "todaysLicenseIssuedWithinSLA" : {
            "type" : "long"
          },
          "todaysTradeLicensesForStatus" : {
            "type" : "long"
          },
          "tradeType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "transactions" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "{{access_token_loc}}",
        "userInfo": {
            "id": 11131,
            "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
            "userName": "NDSS",
            "name": "Lata",
            "mobileNumber": "7897807878",
            "emailId": null,
            "locale": null,
            "type": "EMPLOYEE",
            "roles": [
                {
                    "name": "National Dashboard Admin",
                    "code": "NATADMIN",
                    "tenantId": "pg"
                }
            ],
            "active": true,
            "tenantId": "uk.kedarnath",
            "permanentCity": null
        }
    },
    "Data": [
        {
            "date": "29-12-2021",
            "module": "TL",
            "ward": "Ward 2",
            "ulb": "uk.kedarnath",
            "region": "Kedarnath-MC",
            "state": "Uttarakhand",
            "metrics": {
                "transactions": 29,
                "todaysApplications": 179,
                "tlTax": 50000,
                "adhocPenalty": 6000,
                "adhocRebate": 2000,
                "todaysLicenseIssuedWithinSLA": 41,
                "todaysCollection": [
                    {
                        "groupBy": "tradeType",
                        "buckets": [
                            {
                                "name": "BRICKFIELD",
                                "value": 21000
                            },
                            {
                                "name": "GROCERYSTORES",
                                "value": 20000
                            },
                            {
                                "name": "CHARCOAL_KLIN",
                                "value": 13000
                            }
                        ]
                    }
                ],
                "todaysTradeLicenses": [
                    {
                        "groupBy": "status",
                        "buckets": [
                            {
                                "name": "INITIATED",
                                "value": 31
                            },
                            {
                                "name": "APPLIED",
                                "value": 56
                            },
                            {
                                "name": "FIELDINSPECTION",
                                "value": 32
                            },
                            {
                                "name": "PENDINGAPPROVAL",
                                "value": 44
                            },
                            {
                                "name": "PENDINGPAYMENT",
                                "value": 29
                            },
                            {
                                "name": "APPROVED",
                                "value": 23
                            },
                            {
                                "name": "REJECTED",
                                "value": 1
                            },
                            {
                                "name": "EXPIRED",
                                "value": 1
                            }
                        ]
                    }
                ],
                "applicationsMovedToday": [
                    {
                        "groupBy": "status",
                        "buckets": [
                            {
                                "name": "INITIATED",
                                "value": 31
                            },
                            {
                                "name": "APPLIED",
                                "value": 56
                            },
                            {
                                "name": "FIELDINSPECTION",
                                "value": 32
                            },
                            {
                                "name": "PENDINGAPPROVAL",
                                "value": 44
                            },
                            {
                                "name": "PENDINGPAYMENT",
                                "value": 29
                            },
                            {
                                "name": "APPROVED",
                                "value": 23
                            },
                            {
                                "name": "REJECTED",
                                "value": 1
                            },
                            {
                                "name": "EXPIRED",
                                "value": 1
                            }
                        ]
                    }
                ]
            }
        }
    ]
}'

6. MCollect -

a. Index name - mcollect-national-dashboard

b. Index mapping -

"properties" : {
          "category" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "challanStatus" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "numberOfCategories" : {
            "type" : "long"
          },
          "numberOfChallansForCategory" : {
            "type" : "long"
          },
          "numberOfChallansForChallanStatus" : {
            "type" : "long"
          },
          "numberOfReceiptsForCategory" : {
            "type" : "long"
          },
          "numberOfReceiptsForPaymentMode" : {
            "type" : "long"
          },
          "numberOfReceiptsForStatus" : {
            "type" : "long"
          },
          "paymentMode" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "status" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "todaysCollectionForCategory" : {
            "type" : "long"
          },
          "todaysCollectionForPaymentMode" : {
            "type" : "long"
          },
          "todaysCollectionForStatus" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "{{access_token_loc}}",
        "userInfo": {
            "id": 11131,
            "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
            "userName": "NDSS",
            "name": "Lata",
            "mobileNumber": "7897807878",
            "emailId": null,
            "locale": null,
            "type": "EMPLOYEE",
            "roles": [
                {
                    "name": "National Dashboard Admin",
                    "code": "NATADMIN",
                    "tenantId": "pg"
                }
            ],
            "active": true,
            "tenantId": "pb.amritsar",
            "permanentCity": null
        }
    },
    "Data": [
        {
            "date": "29-10-2021",
            "module": "MCOLLECT",
"ward": "Ward 1",
"ulb": "pb.amritsar",
"region": "Amritsar-MC",
"state": "Punjab",
            "metrics": {
                "numberOfCategories": 9,
                "todaysCollection": [
                    {
                        "groupBy": "paymentMode",
                        "buckets": [
                         {"name": "UPI","value":1765},{"name": "CASH","value":2415},{"name": "DEBIT_CARD","value":165}
                        ]
                    },
                    {
                        "groupBy": "status",
                        "buckets": [
                        {"name": "NEW","value":1835},{"name": "DEPOSITED","value":1425},{"name": "DISHONOURED","value":1085}
                        ]
                    },
                    {
                        "groupBy": "category",
                        "buckets": [
                           {"name": "COMMON_MASTERS_HOARDING","value":135},{"name": "COMMON_MASTERS_ROAD_SHOW","value":805},{"name": "COMMON_MASTERS_UNIPOLLS","value":795},{"name": "COMMON_MASTERS_AUCTION_FEE","value":655},{"name": "COMMON_MASTERS_USER_FEES","value":495},{"name": "COMMON_MASTERS_MUNICIPAL_SHOPS_RENT","value":305},{"name": "COMMON_MASTERS_PARKING_FEE","value":555},{"name": "COMMON_MASTERS_TOWER_ANNUAL_RENT","value":505},{"name": "COMMON_MASTERS_TOWER_INSTALLATION","value":95}
                        ]
                    }
                ],
                "numberOfReceipts": [
                    {
                        "groupBy": "status",
                        "buckets": [
                          {"name": "NEW","value":174},{"name": "DEPOSITED","value":284},{"name": "DISHONOURED","value":187}
                        ]
                    },
                    {
                        "groupBy": "paymentMode",
                        "buckets": [
                           {"name": "CASH","value":163},{"name": "CHEQUE","value":140},{"name": "DEBIT_CARD","value":156},{"name": "ONLINE","value":186}
                        ]
                    },
                    {
                        "groupBy": "category",
                        "buckets": [
                           {"name": "COMMON_MASTERS_HOARDING","value":56},{"name": "COMMON_MASTERS_ROAD_SHOW","value":51},{"name": "COMMON_MASTERS_UNIPOLLS","value":82},{"name": "COMMON_MASTERS_AUCTION_FEE","value":77},{"name": "COMMON_MASTERS_USER_FEES","value":46},{"name": "COMMON_MASTERS_MUNICIPAL_SHOPS_RENT","value":66},{"name": "COMMON_MASTERS_PARKING_FEE","value":63},{"name": "COMMON_MASTERS_TOWER_ANNUAL_RENT","value":103},{"name": "COMMON_MASTERS_TOWER_INSTALLATION","value":101}
                        ]
                    }
                ],
                "numberOfChallans": [
                    {
                        "groupBy": "challanStatus",
                        "buckets": [
                         {"name": "PAID","value":151},{"name": "CANCELLED","value":41},{"name": "ACTIVE","value":341}
                        ]
                    },
                    {
                        "groupBy": "category",
                        "buckets": [
                         {"name": "COMMON_MASTERS_HOARDING","value":45},{"name": "COMMON_MASTERS_ROAD_SHOW","value":70},{"name": "COMMON_MASTERS_UNIPOLLS","value":71},{"name": "COMMON_MASTERS_AUCTION_FEE","value":65},{"name": "COMMON_MASTERS_USER_FEES","value":75},{"name": "COMMON_MASTERS_MUNICIPAL_SHOPS_RENT","value":30},{"name": "COMMON_MASTERS_PARKING_FEE","value":61},{"name": "COMMON_MASTERS_TOWER_ANNUAL_RENT","value":56},{"name": "COMMON_MASTERS_TOWER_INSTALLATION","value":60}
                        ]
                    }
                ]
            }
        }
    ]
}'

7. Online Building Permission System -

a. Index name - obps-national-dashboard

b. Index mapping -

"mappings" : {
      "nss" : {
        "properties" : {
          "applicationsSubmitted" : {
            "type" : "long"
          },
          "applicationsWithDeviation" : {
            "type" : "long"
          },
          "averageDaysToIssueOC" : {
            "type" : "long"
          },
          "averageDaysToIssuePermit" : {
            "type" : "long"
          },
          "averageDeviation" : {
            "type" : "long"
          },
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "landAreaAppliedInSystemForBPA" : {
            "type" : "long"
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ocIssued" : {
            "type" : "long"
          },
          "ocPlansScrutinized" : {
            "type" : "long"
          },
          "ocSubmitted" : {
            "type" : "long"
          },
          "ocWithDeviation" : {
            "type" : "long"
          },
          "occupancyType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "paymentMode" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "permitsIssuedForOccupancyType" : {
            "type" : "long"
          },
          "permitsIssuedForRiskType" : {
            "type" : "long"
          },
          "permitsIssuedForSubOccupancyType" : {
            "type" : "long"
          },
          "plansScrutinized" : {
            "type" : "long"
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "riskType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "slaComplianceOC" : {
            "type" : "long"
          },
          "slaCompliancePermit" : {
            "type" : "long"
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "subOccupancyType" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "tenantId" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "todaysClosedApplicationsOC" : {
            "type" : "long"
          },
          "todaysClosedApplicationsPermit" : {
            "type" : "long"
          },
          "todaysCollectionForPaymentMode" : {
            "type" : "long"
          },
          "todaysCompletedApplicationsWithinSLAOC" : {
            "type" : "long"
          },
          "todaysCompletedApplicationsWithinSLAPermit" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }
      }
    }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "7112c6a3-41d4-42d0-9ae9-7d2ec08d1a4f"
    },
    "Data": [ {
        "date": "05-01-2022",
        "module": "OBPS",
        "ward": "Ajit Nagar",
        "ulb": "pb.amritsar",
        "region": "amritsar-MC",
        "state": "Punjab",
        "metrics": {
            "ocPlansScrutinized": 120,
            "plansScrutinized": 540,
            "ocSubmitted": 50,
            "applicationsSubmitted": 50,
            "ocIssued": 19,
            "landAreaAppliedInSystemForBPA": 23442,
            "averageDaysToIssuePermit": 10,
            "averageDaysToIssueOC": 8,
            "todaysClosedApplicationsOC":10 ,
            "todaysCompletedApplicationsWithinSLAOC":5 ,
            "todaysClosedApplicationsPermit": 20,
            "todaysCompletedApplicationsWithinSLAPermit":10,
            "slaComplianceOC": 20,
            "slaCompliancePermit": 40,
            "applicationsWithDeviation": 20,
            "averageDeviation": 10,
            "ocWithDeviation": 30,
            "todaysCollection": [
                {
                    "groupBy": "paymentMode",
                    "buckets": [
                        {
                            "name": "UPI",
                            "value": 10000
                        },
                        {
                            "name": "DEBIT.CARD",
                            "value": 15000
                        },
                        {
                            "name": "CREDIT.CARD",
                            "value": 8500
                        }
                    ]
                }
            ],
            "permitsIssued": [
                {
                    "groupBy": "riskType",
                    "buckets": [
                        {
                            "name": "LOW",
                            "value": 150
                        },
                        {
                            "name": "MEDIUM",
                            "value": 300
                        },
                        {
                            "name": "HIGH",
                            "value": 600
                        }
                    ]
                } ,
                 {
                    "groupBy": "occupancyType",
                    "buckets": [
                        {
                            "name": "RESIDENTIAL",
                            "value": 150
                        },
                        {
                            "name": "INSTITUTIONAL",
                            "value": 180
                        }
                    ]
                },
                   {
                    "groupBy": "subOccupancyType",
                    "buckets": [
                        {
                            "name": "RESIDENTIAL.INDIVIDUAL",
                            "value": 50
                        },
                        {
                            "name": "RESIDENTIAL.SHARED",
                            "value": 20
                        },
                        {
                            "name": "INSITUTIONAL.SHARED",
                            "value": 120
                        }
                    ]
                }
            ]
        }
    }
    ]
}'

8. Common -

a. Index name - common-national-dashboard

b. Index mapping -

"properties" : {
          "createdBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "createdTime" : {
            "type" : "long"
          },
          "date" : {
            "type" : "date",
            "format" : "dd-MM-yyyy HH:mm:ss||dd-MM-yyyy||epoch_millis||dd-MM-yyyy'T'HH:mm:ss.SSSZ"
          },
          "lastModifiedBy" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "lastModifiedTime" : {
            "type" : "long"
          },
          "liveUlbsCountForServiceModuleCode" : {
            "type" : "long"
          },
          "module" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "onboardedUlbsCount" : {
            "type" : "long"
          },
          "region" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "serviceModuleCode" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "slaAchievement" : {
            "type" : "long"
          },
          "state" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "status" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "totalCitizensCount" : {
            "type" : "long"
          },
          "totalLiveUlbsCount" : {
            "type" : "long"
          },
          "totalUlbCount" : {
            "type" : "long"
          },
          "ulb" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          },
          "ward" : {
            "type" : "text",
            "fields" : {
              "keyword" : {
                "type" : "keyword",
                "ignore_above" : 256
              }
            }
          }
        }

c. Ingest curl -

curl --location --request POST 'https://qa.digit.org/national-dashboard/metric/_ingest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "ac024e05-2b0e-4341-b294-681c5d72fcaf",
        "userInfo": {
            "id": 11131,
            "uuid": "0a8ef1d4-ef5c-4061-aea5-0ac4a410b87f",
            "userName": "NDSS",
            "name": "Lata",
            "mobileNumber": "7897807878",
            "emailId": null,
            "locale": null,
            "type": "EMPLOYEE",
            "roles": [
                {
                    "name": "National Dashboard Admin",
                    "code": "NATADMIN",
                    "tenantId": "pg"
                }
            ],
            "active": true,
            "tenantId": "pb.amritsar",
            "permanentCity": null
        }
    },
    "Data": [
        {
            "date": "06-02-2022",
            "module": "COMMON",
            "ward": "Ward 1",
            "ulb": "pb.amritsar",
            "region": "Amritsar-MC",
            "state": "Punjab",
            "metrics": {
                "status": "Live",
                "onboardedUlbsCount": 12,
                "totalCitizensCount": 1250,
                "totalLiveUlbsCount": 15,
                "totalUlbCount": 22,
                "slaAchievement": 75,
                "liveUlbsCount": [
                    {
                        "groupBy": "serviceModuleCode",
                        "buckets": [
                            {
                                "name": "PT",
                                "value": 12
                            },
                            {
                                "name": "TL",
                                "value": 10
                            },
                            {
                                "name": "FIRENOC",
                                "value": 8
                            },
                            {
                                "name": "PGR",
                                "value": 22
                            },
                            {
                                "name": "WS",
                                "value": 12
                            }
                        ]
                    }
                ]
            }
        }
    ]
}'

Body: The body consists of 2 parts: RequestInfo and Data. Data is where the aggregated data to be ingested resides. The keys given under the metrics object here are metrics provided in module.fields.mapping present in the configuration here -

The steps required for the creation of the index and adding the index mapping for the same can be found here - .

🔧
DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps
DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps
DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps
DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps
https://github.com/egovernments/DIGIT-DevOps/blob/master/deploy-as-code/helm/environments/qa.yaml#L367
National Dashboard: Steps for Index Creation
DIGIT-DevOps/qa.yaml at master · egovernments/DIGIT-DevOps