Skip to main content

Criticality


Overview:This provides detailed information about the APIs for Criticality Calculation, including endpoints, request payloads, responses. All calculations are performed within the onboarding service .

Base URL

https://api-onboarding-dev.bynry.com/api/onboarding/config-map/criticality/

Endpoints

1. GET Criticality

·        Description: Retrieve the list of IT criticality data.

·        URL:

·        GET /api/onboarding/configmap/criticality/?remote_utility_id={id}&show_inactive={true/false}

·        Parameters:

Example Request:

GET /api/onboarding/config-map/criticality/?remote_utility_id=68&show_inactive=true

Example Response:

{

  "result": [

    {

      "name": "yyt",

      "score": 3,

      "is_active": true,

      "created_by": "Kaushal Kolhe",

      "created_date": "18-03-2025",

      "code": "yyt#10",

      "weightage": 0.091

    },

    {

      "name": "Commercial 1",

      "score": 4,

      "is_active": true,

      "created_by": "Jack",

      "created_date": "21-01-2025",

      "code": "Commercial 1#9",

      "weightage": 0.121

    }

  ]

}

 

2. POST  Criticality

Description: Create a new IT criticality entry.

URL:

POST /api/onboarding/config-map/criticality/

Headers:

Content-Type: application/json

Authorization: Bearer <token>

Request Body:

{

"name": "yyt",

"score": 3,

"code": "yyt",

"remote_utility_id": 68

}

Field

Type

Required

Description

name

String

Yes

The name of the criticality entry.

score

Integer

Yes

Criticality score (e.g., 1-5).

code

String

Yes

Unique code identifier.

remote_utility_id

Integer

Yes

Identifier for the remote utility.

 

  • Example Response:

{

  "result": "Data added successfully"

}

 

Field Requirements

  • Parameter Name: Mandatory, text input.
  • Score: Mandatory, numerical input, valid range [1-5].

Validation Rules

  • Parameter Name cannot be empty.
  • Score must be an integer between 1 and 5 and selected from a dropdown.

Weightage Calculation

  • The system dynamically recalculates weightages whenever a new parameter is added.
  • Weightage Formula:
  • Weightage = Score of the Parameter / Sum of Scores of All Parameters

Screenshot 2025-03-21 123323.png

 

Manual Calculation Example:

  • Added Parameters:
    • Parameter 1: Score = 3
    • Parameter 2: Score = 2
    • Parameter 3: Score = 5
  • Total Score:
  • Total Score = 3 + 2 + 5 = 10
  • Weightage Calculation:

Parameter

Score

Weightage (Score / Total Score)

Parameter 1

3

3 / 10 = 0.300

Parameter 2

2

2 / 10 = 0.200

Parameter 3

5

5 / 10 = 0.500