DIGIT Docs
v0.3
  • DIGIT Knowledge Base
  • Local Governance
v0.3
  • Introducing HCM Console
  • Release Notes
    • v0.3: Release Notes
      • v0.3 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
      • HCM Console Test Cases V0.3
      • Gate 2 Release Checklist
        • Release Showcase
    • v0.2: Release Notes
      • v0.2 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
    • v0.1: Release Notes
      • v0.1 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
      • Gate 2 Release Checklist
  • PRODUCT SPECIFICATION
    • User Manual
    • Product Requirement Document (PRD)
    • Functional Specifications
  • TECHNOLOGY
    • Architecture
      • High Level Design
        • Project Factory
      • Low Level Design
        • Project Factory (Campaign Manager)
          • Create Campaign
          • Update Campaign
          • Manage Resources
        • Admin Console
          • Campaign Creation Flow
          • Campaign Updation Flow
          • Checklist Management
      • Services
        • Project Factory
          • Manage Campaign APIs
            • Microplan Integration
            • Update an Ongoing Campaign
          • Manage Data APIs
            • Target Upload
          • Manage Boundary APIs
            • Boundary Generation
            • Boundary Management
            • Boundary Management Through GeoJson
        • HCM Console Web
          • User Interface Design
          • Manage Campaign
            • Setup Campaign (New Campaign)
              • Campaign Details
              • Boundary Details
              • Delivery Details
              • Resource Upload Details
              • Summary Screen
              • Setup Campaign from Microplan
              • Setup and Implementation of Campaign
              • IRS Console Support
            • My Campaign
              • My Campaign Actions
              • Campaign Timeline
              • Update Campaign (Boundary/ Resources)
              • Update Campaign Dates
          • Boundary Data Management
          • Manage Checklist
            • Default Templates
  • SETUP
    • Installation
    • Configuration
      • UI Configurations
      • Steps to Enable a New Campaign Type in Console
      • Advanced Configurations
    • Quality Assurance Testing
      • Automation - Run HCM Console Script
        • User
        • Target
        • Facility
      • Performance Testing
  • GENERAL
    • Product Roadmap
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

Was this helpful?

Export as PDF
  1. TECHNOLOGY
  2. Architecture
  3. Services
  4. Project Factory
  5. Manage Data APIs

Target Upload

Target Upload API

API Overview

Base URL: project-factory/v1/

Endpoint: /data/_create

  • Method: POST

Request Structure:

  • Body Parameters:

    • RequestInfo: Object Containing RequestInfo

    • ResourceDetails: Details of a given Resource

      • type: Type of resource to create (e.g., boundarywithTarget)

      • tenantId: Tenant

      • fileStoreId: FileStoreId of Target Upload Sheet

      • action: Action to perform (e.g., validate for target upload)

      • hierarchyType: Name of Boundary Hierarchy

      • campaignId: CampaignId

      • additionalDetails: Additional details (optional)

Response Structure:

  • Success Response:

    • ResponseInfo: Object Containing ResponseInfo

    • ResourceDetails: Details of the created resource

Flow:

  1. Client Initiates Request:

    • The client sends a POST request to /data/_create endpoint with action: validate.

  2. Validation of Request:

    • Resource Details Validation:

      • Check if request.body.ResourceDetails exists and is not empty.

      • Throw a validation error if missing or empty with the message "ResourceDetails is missing or empty or null".

    • Schema Validation:

      • Validate request.body.ResourceDetails against createRequestSchema.

    • Hierarchy Type Validation:

      • Validate hierarchyType in request.body.ResourceDetails using validateHierarchyType function.

    • Tenant ID Validation:

      • Ensure that request.body.ResourceDetails.tenantId matches request.body.RequestInfo.userInfo.tenantId.

      • Throw a validation error if they do not match with the message "tenantId is not matching with userInfo".

  3. Different Tab Headers Validation:

    • Validate whether headers are according to the template across all tabs of different districts.

  4. Target Sheet Validation:

    • All validations will be on Sheets other than the ReadMe Sheet and Boundary Data Sheet.

    • Immediate validations:

      • District Tabs Validation:

        • Validate whether all district tabs are present in the Target Sheet uploaded.

      • Empty Sheet Validation:

        • Throw a validation error if any Target Sheet is empty.

      • Root (District) level boundary validation:

        • Throw a validation error if the root column (District) is empty in any row.

    • Validations for each row:

      • Boundary Codes Validation:

        • Check for missing or empty boundary codes in any row of any sheet.

        • Check for boundary code columns to be of type string.

        • Check for the presence of more than one boundary code in a given row of a given Target Sheet.

        • Check for duplicacy of the boundary code within the given Target Sheet.

      • Boundary Targets Validation:

        • Ensure that Target values are not missing and are positive numbers less than 1 Million.

PreviousManage Data APIsNextManage Boundary APIs

Was this helpful?