Skip to main content

Data API

The Digital.ai Data API service provides you the details of indicators that suggest a change is likely to fail. Availability of Change failure probability facilitates better decision making that typically happens on the source system.

Customer will avail the Change Failure Predictions through the Digital.ai Data API.

Digital.ai manages the client credentials required by the customer for the Data API authentication using API Token. Customer’s source system will invoke the Data API to retrieve Change Failure Probability for a given Change(s) along with the contributing risk factors.

Change Failure Predictions

1. API Summary

The CRP Failure Prediction API provides insights into the likelihood of failure for changes and the contributing risk factors. It enables users to make informed decisions by leveraging machine learning models to predict change failure probabilities and credit scores. The API accepts business IDs as input and returns predictions, contributing features, and model details.

2. Base URL

  • Base URl: <host>:<port>/store/{project_name}/{model_name}
  • Method: POST

3. Authentication

API authentication is the process of verifying the identity of a user who is making an API request, usually treated like passwords.

Refer to the Access Tokens to generate a token and authenticate.

4. Request

  • Input: A list of business_ids representing the changes for which failure predictions are required.

  • Format: JSON object containing an array of business IDs.

    {
    "business_ids": ["CHG1", "invalid_id"]
    }

5. Response

  • Output: An array of prediction results for each business_id.

  • Details:

    • id: Represents the business ID and its value.
    • features: Lists the column name of an input variable, unique value assigned to the identifier field, and importance scores.
    • predictions: Provides probabilities for failure (probability_Y) and success (probability_N).
    • ml_model_id: Identifies the machine learning model used.
    • message: Indicates the status of the response (for example, success or error).
    • created_on: Timestamp of the response creation.
    [
    {
    "id": {
    "name": "business_id",
    "value": "CHG1"
    },
    "features": [
    {
    "name": "feature_1",
    "value": "feature_1_value",
    "feature_importance": 0.023064278053662977
    },
    {
    "name": "feature_2",
    "value": "feature_2_value",
    "feature_importance": 0.32746387262962945
    }
    ],
    "predictions": [
    {
    "name": "probability_N",
    "value": 0.6417114272690727
    },
    {
    "name": "probability_Y",
    "value": 0.35828857273092724
    }
    ],
    "ml_model_id": 42,
    "message": "Data retrieved successfully",
    "created_on": "2023-10-03T12:00:00Z",
    },
    {
    "id": {
    "name": "business_id",
    "value": null
    },
    "features": [
    {
    "name": "feature_1",
    "value": null,
    "feature_importance": null
    },
    {
    "name": "feature_2",
    "value": null,
    "feature_importance": null
    }
    ],
    "predictions": [
    {
    "name": "probability_N",
    "value": null,
    },
    {
    "name": "probability_Y",
    "value": null,
    }
    ],
    "ml_model_id": 42,
    "message": "Business id not found",
    "created_on": null
    },
    ]