{
    "openapi":"3.0.0",
    "info":{
        "title":"REST API Reference for AI Services",
        "version":"2026.08.27",
        "description":"The REST API for AI and ML services allow you to create data sources, train models based on the configured data sources, and make predictions based on a customer's usage pattern. You use these APIs for applying and configuring different services.",
        "x-summary":"The REST API for AI and ML services allow you to create data sources, train models based on the configured data sources, and make predictions based on a customer's usage pattern."
    },
    "paths":{
        "/data/collect":{
            "post":{
                "tags":[
                    "Data Collection and Management"
                ],
                "summary":"Collect Data from Source",
                "description":"Collects data from your data source, such as a database, and stores it in an object file.",
                "operationId":"collectData",
                "requestBody":{
                    "$ref":"#/components/requestBodies/CollectRequest"
                },
                "responses":{
                    "200":{
                        "$ref":"#/components/responses/200_CollectResponse"
                    },
                    "400":{
                        "$ref":"#/components/responses/400"
                    },
                    "401":{
                        "$ref":"#/components/responses/401"
                    },
                    "403":{
                        "$ref":"#/components/responses/403"
                    },
                    "404":{
                        "$ref":"#/components/responses/404"
                    },
                    "405":{
                        "$ref":"#/components/responses/405"
                    },
                    "409":{
                        "$ref":"#/components/responses/409"
                    },
                    "500":{
                        "$ref":"#/components/responses/500"
                    },
                    "501":{
                        "$ref":"#/components/responses/501"
                    },
                    "503":{
                        "$ref":"#/components/responses/503"
                    }
                },
                "x-internal-id":"data-collect-post",
                "x-filename-id":"data-collect-post"
            }
        },
        "/data/fetch":{
            "post":{
                "tags":[
                    "Data Collection and Management"
                ],
                "summary":"Fetch Data from Cache",
                "description":"Retrieves the specified data from your data set and sends it to the client.",
                "operationId":"fetchData",
                "requestBody":{
                    "$ref":"#/components/requestBodies/FetchRequest"
                },
                "responses":{
                    "200":{
                        "$ref":"#/components/responses/200_FetchResponse"
                    },
                    "400":{
                        "$ref":"#/components/responses/400"
                    },
                    "401":{
                        "$ref":"#/components/responses/401"
                    },
                    "403":{
                        "$ref":"#/components/responses/403"
                    },
                    "404":{
                        "$ref":"#/components/responses/404"
                    },
                    "405":{
                        "$ref":"#/components/responses/405"
                    },
                    "409":{
                        "$ref":"#/components/responses/409"
                    },
                    "500":{
                        "$ref":"#/components/responses/500"
                    },
                    "501":{
                        "$ref":"#/components/responses/501"
                    },
                    "503":{
                        "$ref":"#/components/responses/503"
                    }
                },
                "x-internal-id":"data-fetch-post",
                "x-filename-id":"data-fetch-post"
            }
        },
        "/data/cache":{
            "post":{
                "tags":[
                    "Data Collection and Management"
                ],
                "summary":"Cache Persisted Data",
                "description":"Caches the specified data for use when required. <p>In the request body, the contents of <b>additional_data</b> depend on the <b>storage_type</b> value:</p><ul><li>When <b>storage_type</b> is set to <b>object_storage</b>, the <b>additional_data</b> object must include the <b>bucket</b> and <b>namespace</b> fields.</li><li>When <b>storage_type</b> is set to <b>pvc</b>, the <b>additional_data</b> object must include the <b>path</b> field set to the path of the <b>metadata.json</b> file.</li></ul>",
                "operationId":"cacheData",
                "requestBody":{
                    "$ref":"#/components/requestBodies/CacheRequest"
                },
                "responses":{
                    "200":{
                        "$ref":"#/components/responses/200_CacheResponse"
                    },
                    "400":{
                        "$ref":"#/components/responses/400"
                    },
                    "401":{
                        "$ref":"#/components/responses/401"
                    },
                    "403":{
                        "$ref":"#/components/responses/403"
                    },
                    "404":{
                        "$ref":"#/components/responses/404"
                    },
                    "405":{
                        "$ref":"#/components/responses/405"
                    },
                    "409":{
                        "$ref":"#/components/responses/409"
                    },
                    "500":{
                        "$ref":"#/components/responses/500"
                    },
                    "501":{
                        "$ref":"#/components/responses/501"
                    },
                    "503":{
                        "$ref":"#/components/responses/503"
                    }
                },
                "x-internal-id":"data-cache-post",
                "x-filename-id":"data-cache-post"
            }
        },
        "/utility/train":{
            "post":{
                "tags":[
                    "Model Training"
                ],
                "summary":"Train the Model",
                "description":"Trains the model based on the configurations set by you and the data acquired by the data service.<p>In the request body, the contents of <b>additional_data</b> depend on the <b>storage_type</b> value:</p><ul><li>When <b>storage_type</b> is set to <b>object_storage</b>, the <b>additional_data</b> object must include the <b>bucket</b> and <b>namespace</b> fields.</li><li>When <b>storage_type</b> is set to <b>pvc</b>, the <b>additional_data</b> object must include the <b>path</b> field set to the path of the <b>metadata.json</b> file.</li></ul>",
                "operationId":"trainModel",
                "requestBody":{
                    "$ref":"#/components/requestBodies/TrainRequest"
                },
                "responses":{
                    "200":{
                        "$ref":"#/components/responses/200_TrainResponse"
                    },
                    "400":{
                        "$ref":"#/components/responses/400"
                    },
                    "401":{
                        "$ref":"#/components/responses/401"
                    },
                    "403":{
                        "$ref":"#/components/responses/403"
                    },
                    "404":{
                        "$ref":"#/components/responses/404"
                    },
                    "405":{
                        "$ref":"#/components/responses/405"
                    },
                    "409":{
                        "$ref":"#/components/responses/409"
                    },
                    "500":{
                        "$ref":"#/components/responses/500"
                    },
                    "501":{
                        "$ref":"#/components/responses/501"
                    },
                    "503":{
                        "$ref":"#/components/responses/503"
                    }
                },
                "x-internal-id":"utility-train-post",
                "x-filename-id":"utility-train-post"
            }
        },
        "/recommend/predict":{
            "post":{
                "tags":[
                    "Next Best Offer Recommendation"
                ],
                "summary":"Get Predictions",
                "description":"Creates a prediction for an account using the specified algorithm.",
                "operationId":"recommendOffer",
                "requestBody":{
                    "$ref":"#/components/requestBodies/RecommendRequest"
                },
                "responses":{
                    "200":{
                        "$ref":"#/components/responses/200_RecommendResponse"
                    },
                    "400":{
                        "$ref":"#/components/responses/400"
                    },
                    "401":{
                        "$ref":"#/components/responses/401"
                    },
                    "403":{
                        "$ref":"#/components/responses/403"
                    },
                    "404":{
                        "$ref":"#/components/responses/404"
                    },
                    "405":{
                        "$ref":"#/components/responses/405"
                    },
                    "409":{
                        "$ref":"#/components/responses/409"
                    },
                    "500":{
                        "$ref":"#/components/responses/500"
                    },
                    "501":{
                        "$ref":"#/components/responses/501"
                    },
                    "503":{
                        "$ref":"#/components/responses/503"
                    }
                },
                "x-internal-id":"recommend-predict-post",
                "x-filename-id":"recommend-predict-post"
            }
        }
    },
    "components":{
        "schemas":{
            "CacheRequest":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the input parameters for the request.",
                        "required":[
                            "required_data",
                            "storage_type"
                        ],
                        "properties":{
                            "required_data":{
                                "description":"Specifies the data to retrieve.",
                                "type":"array",
                                "items":{
                                    "type":"string"
                                }
                            },
                            "storage_type":{
                                "description":"Specifies the third-party library to use for data collection.",
                                "type":"string"
                            },
                            "additional_data":{
                                "description":"Provides additional criteria used to filter the data.",
                                "type":"object",
                                "additionalProperties":true
                            }
                        }
                    }
                ]
            },
            "FetchRequest":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the input parameters for the request.",
                        "required":[
                            "required_data"
                        ],
                        "properties":{
                            "required_data":{
                                "description":"Specifies the data to retrieve.",
                                "type":"array",
                                "items":{
                                    "type":"string"
                                }
                            },
                            "additional_data":{
                                "description":"Provides additional criteria used to filter the data.",
                                "type":"object",
                                "additionalProperties":true
                            }
                        }
                    }
                ]
            },
            "CollectRequest":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the input parameters for the request.",
                        "required":[
                            "data_source_type",
                            "query_builder",
                            "tech_choice",
                            "delta_data"
                        ],
                        "properties":{
                            "data_source_type":{
                                "description":"Specifies the list of data sources.",
                                "type":"array",
                                "items":{
                                    "type":"string"
                                }
                            },
                            "query_builder":{
                                "description":"Specifies the list of queries and their join conditions.",
                                "type":"array",
                                "items":{
                                    "$ref":"#/components/schemas/QueryBuilder"
                                }
                            },
                            "storage_details":{
                                "description":"Specifies the data storage location and connection details.",
                                "type":"array",
                                "items":{
                                    "$ref":"#/components/schemas/StorageDetails"
                                }
                            },
                            "tech_choice":{
                                "description":"Specifies the third-party library to use for data collection&colon; <b>spark</b>, <b>dataflow</b>, or <b>datascience</b>.",
                                "type":"string"
                            },
                            "delta_data":{
                                "description":"Indicates whether newly fetched data should be appended to existing data. Set this to <b>true</b> if you need to append the training data. Set this to <b>false</b> if you want to fetch complete data without appending anything.",
                                "type":"boolean"
                            }
                        }
                    }
                ]
            },
            "QueryBuilder":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the queries and their join conditions.",
                        "required":[
                            "queries"
                        ],
                        "properties":{
                            "queries":{
                                "description":"Specifies the list of queries.",
                                "type":"array",
                                "items":{
                                    "$ref":"#/components/schemas/QueryList"
                                }
                            },
                            "join_condition":{
                                "description":"Specifies the join conditions used to construct the queries. This is an optional input which can be used to join the data from two queries.",
                                "type":"array",
                                "items":{
                                    "$ref":"#/components/schemas/JoinConditions"
                                }
                            }
                        }
                    }
                ]
            },
            "QueryList":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the list of queries to run.",
                        "required":[
                            "name",
                            "query"
                        ],
                        "properties":{
                            "name":{
                                "description":"Specifies the query name, which serves as a unique identifier.",
                                "type":"string"
                            },
                            "query":{
                                "description":"Specifies the query to run.",
                                "type":"string"
                            }
                        }
                    }
                ]
            },
            "JoinConditions":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"List of join conditions used to combine queries.",
                        "required":[
                            "name",
                            "join"
                        ],
                        "properties":{
                            "name":{
                                "description":"Specifies the query name, which serves as a unique identifier.",
                                "type":"string"
                            },
                            "join":{
                                "description":"Specifies the names of the queries to join.",
                                "type":"array",
                                "items":{
                                    "type":"string"
                                }
                            },
                            "join_type":{
                                "description":"Specifies the join type to use instead of the default (natural join).",
                                "type":"string"
                            },
                            "join_column":{
                                "description":"Specifies the column used to join the queries.",
                                "type":"array",
                                "items":{
                                    "type":"string"
                                }
                            }
                        }
                    }
                ]
            },
            "StorageDetails":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Defines the queries to run and the join conditions used to combine them.",
                        "required":[
                            "output_file_type"
                        ],
                        "properties":{
                            "path":{
                                "description":"Specifies the storage path where the data is saved.",
                                "type":"string"
                            },
                            "output_file_type":{
                                "description":"Specifies the file type to use when storing the data&colon; <b>json</b>, <b>csv</b>, or <b>pickle</b>.",
                                "type":"string"
                            },
                            "storage_type":{
                                "description":"Specifies the type of storage to use&colon; <b>pvc</b> or <b>object_storage</b>.",
                                "type":"string"
                            },
                            "storage_connection_details":{
                                "description":"Specifies the connection parameters for the storage location.",
                                "type":"array",
                                "items":{
                                    "type":"object",
                                    "additionalProperties":true
                                }
                            }
                        }
                    }
                ]
            },
            "CollectResponse":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the output returned by the operation.",
                        "required":[
                            "status"
                        ],
                        "properties":{
                            "status":{
                                "description":"Indicates the status of the data being fetched from the data source.",
                                "type":"string"
                            }
                        }
                    }
                ]
            },
            "FetchResponse":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the output returned by the operation.",
                        "required":[
                            "data"
                        ],
                        "properties":{
                            "data":{
                                "description":"Returns the data retrieved from storage.",
                                "type":"object",
                                "additionalProperties":true
                            }
                        }
                    }
                ]
            },
            "CacheResponse":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the output returned by the operation.",
                        "required":[
                            "status"
                        ],
                        "properties":{
                            "status":{
                                "description":"Indicates the current status of the service.",
                                "type":"string"
                            }
                        }
                    }
                ]
            },
            "Extensible":{
                "type":"object",
                "description":"Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.",
                "properties":{
                    "@type":{
                        "type":"string",
                        "description":"When subclassing, specifies the extensible name of the subclass."
                    },
                    "@baseType":{
                        "type":"string",
                        "description":"Specifies the superclass while subclassing."
                    },
                    "@schemaLocation":{
                        "type":"string",
                        "description":"Provides a URI to the JSON Schema file that defines additional attributes and relationships.",
                        "format":"uri"
                    }
                },
                "required":[
                    "@type"
                ],
                "discriminator":{
                    "propertyName":"@type",
                    "mapping":{
                        "CacheRequest":"#/components/schemas/CacheRequest",
                        "FetchRequest":"#/components/schemas/FetchRequest",
                        "CollectRequest":"#/components/schemas/CollectRequest",
                        "QueryBuilder":"#/components/schemas/QueryBuilder",
                        "QueryList":"#/components/schemas/QueryList",
                        "JoinConditions":"#/components/schemas/JoinConditions",
                        "StorageDetails":"#/components/schemas/StorageDetails",
                        "CollectResponse":"#/components/schemas/CollectResponse",
                        "FetchResponse":"#/components/schemas/FetchResponse",
                        "CacheResponse":"#/components/schemas/CacheResponse",
                        "Error":"#/components/schemas/Error"
                    }
                }
            },
            "Error":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).",
                        "required":[
                            "code",
                            "reason"
                        ],
                        "properties":{
                            "code":{
                                "type":"string",
                                "description":"Provides application-specific details, as defined by the API or a common list."
                            },
                            "reason":{
                                "type":"string",
                                "description":"Provides an explanation of the error to display to the client user."
                            },
                            "message":{
                                "type":"string",
                                "description":"Provides additional error details and recommended corrective actions to display to the client user."
                            },
                            "status":{
                                "type":"string",
                                "description":"Specifies the extended HTTP error code."
                            },
                            "referenceError":{
                                "type":"string",
                                "description":"Provides a URI to documentation that describes the error.",
                                "format":"uri"
                            }
                        }
                    }
                ]
            },
            "TrainRequest":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the input parameters for the request.",
                        "required":[
                            "algorithm",
                            "storage_details",
                            "sample"
                        ],
                        "properties":{
                            "algorithm":{
                                "type":"array",
                                "description":"Specifies the list of algorithms to train.",
                                "items":{
                                    "$ref":"#/components/schemas/Algorithms"
                                }
                            },
                            "storage_details":{
                                "type":"array",
                                "description":"Provides the storage location and access details for the stored data.",
                                "items":{
                                    "$ref":"#/components/schemas/StorageDetails"
                                }
                            },
                            "sample":{
                                "type":"boolean",
                                "description":"Indicates whether to apply sample preprocessing. Set this to <b>true</b> to use the default preprocessing script. Set this to <b>false</b> to use the sample script specified in the <b>trainUtilityProcessor.preprocessScript</b> key of your <b>values.yaml</b> file."
                            }
                        }
                    }
                ]
            },
            "Algorithms":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Defines an algorithm and its training configuration.",
                        "required":[
                            "algo",
                            "model_dir",
                            "model_name"
                        ],
                        "properties":{
                            "algo":{
                                "type":"string",
                                "description":"Specifies the algorithm name.",
                                "enum":[
                                    "knn",
                                    "dnn",
                                    "cosine",
                                    "random_forest",
                                    "iso"
                                ]
                            },
                            "model_dir":{
                                "type":"string",
                                "description":"Specifies the path to store the model files. This field accepts only alphanumeric and underscore (<b>_</b>) characters."
                            },
                            "model_name":{
                                "type":"string",
                                "description":"Specifies the name under which the model is stored."
                            },
                            "hyper_parameters":{
                                "type":"object",
                                "description":"Specifies hyperparameters to override the default values. Available parameters vary by algorithm.",
                                "additionalProperties":true
                            }
                        }
                    }
                ]
            },
            "TrainResponse":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the output returned by the operation.",
                        "required":[
                            "status"
                        ],
                        "properties":{
                            "status":{
                                "type":"string",
                                "description":"Indicates the current status of the service."
                            }
                        }
                    }
                ]
            },
            "RecommendRequest":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Specifies the input parameters for the request.",
                        "properties":{
                            "account_id":{
                                "description":"Specifies the customer account ID.",
                                "type":"string",
                                "minLength":1
                            },
                            "msisdn":{
                                "description":"Specifies the customer's MSISDN.",
                                "type":"string",
                                "minLength":1
                            },
                            "algorithms":{
                                "description":"Lists the algorithms to use for the prediction service&colon; <b>knn</b>, <b>dnn</b>, or <b>cosine</b>.",
                                "type":"array",
                                "items":{
                                    "type":"string",
                                    "enum":[
                                        "knn",
                                        "dnn",
                                        "cosine"
                                    ]
                                },
                                "minItems":1,
                                "uniqueItems":true
                            }
                        },
                        "required":[
                            "algorithms"
                        ],
                        "oneOf":[
                            {
                                "required":[
                                    "account_id"
                                ]
                            },
                            {
                                "required":[
                                    "msisdn"
                                ]
                            }
                        ]
                    }
                ]
            },
            "RecommendResponse":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Returns the result output.",
                        "required":[
                            "status",
                            "recommendations"
                        ],
                        "properties":{
                            "status":{
                                "description":"Indicates the current status of the service.",
                                "type":"string"
                            },
                            "recommendations":{
                                "description":"Recommendations returned by each algorithm.",
                                "type":"array",
                                "items":{
                                    "$ref":"#/components/schemas/RecommendationDetails"
                                }
                            }
                        }
                    }
                ]
            },
            "RecommendationDetails":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Provides the details for a recommendation.",
                        "required":[
                            "algorithm",
                            "account_id",
                            "present_deal",
                            "top_results"
                        ],
                        "properties":{
                            "algorithm":{
                                "description":"Specifies the algorithm used to generate the recommendation.",
                                "type":"string",
                                "enum":[
                                    "knn",
                                    "dnn",
                                    "cosine"
                                ]
                            },
                            "account_id":{
                                "description":"Specifies the user account ID.",
                                "type":"string"
                            },
                            "present_deal":{
                                "description":"Specifies the current deal to which the user is subscribed.",
                                "type":"string"
                            },
                            "top_results":{
                                "description":"Lists the recommendation results.",
                                "type":"array",
                                "items":{
                                    "$ref":"#/components/schemas/PredictDetails"
                                }
                            }
                        }
                    }
                ]
            },
            "PredictDetails":{
                "allOf":[
                    {
                        "$ref":"#/components/schemas/Extensible"
                    },
                    {
                        "type":"object",
                        "description":"Lists the predicted outcomes.",
                        "required":[
                            "prediction",
                            "probability_or_distance"
                        ],
                        "properties":{
                            "prediction":{
                                "description":"Returns the next best offer.",
                                "type":"string"
                            },
                            "probability_or_distance":{
                                "description":"Indicates the confidence score or distance for the recommendation.",
                                "type":"number"
                            }
                        }
                    }
                ]
            }
        },
        "requestBodies":{
            "CollectRequest":{
                "description":"Collects data from your data source, such as a database, and stores it in an object file.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/CollectRequest"
                        },
                        "examples":{
                            "CollectRequest":{
                                "$ref":"#/components/examples/CollectRequest"
                            }
                        }
                    }
                },
                "required":true
            },
            "FetchRequest":{
                "description":"Retrieves the specified data from your data set and sends it to the client.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/FetchRequest"
                        },
                        "examples":{
                            "FetchRequest":{
                                "$ref":"#/components/examples/FetchRequest"
                            }
                        }
                    }
                },
                "required":true
            },
            "CacheRequest":{
                "description":"Caches the specified data for use when required.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/CacheRequest"
                        },
                        "examples":{
                            "CacheRequest":{
                                "$ref":"#/components/examples/CacheRequest"
                            }
                        }
                    }
                },
                "required":true
            },
            "TrainRequest":{
                "description":"Trains models according to the provided configuration.",
                "required":true,
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/TrainRequest"
                        },
                        "examples":{
                            "TrainRequest":{
                                "$ref":"#/components/examples/TrainRequest"
                            }
                        }
                    }
                }
            },
            "RecommendRequest":{
                "description":"Provides a customer identifier and algorithms for generating next-best-offer recommendations.",
                "required":true,
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/RecommendRequest"
                        },
                        "examples":{
                            "RecommendRequestWithAccountId":{
                                "$ref":"#/components/examples/RecommendRequestWithAccountId"
                            },
                            "RecommendRequestWithMSISDN":{
                                "$ref":"#/components/examples/RecommendRequestWithMSISDN"
                            }
                        }
                    }
                }
            }
        },
        "responses":{
            "400":{
                "description":"The request could not be processed because it contains missing or invalid information.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "401":{
                "description":"The request is not authorized.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "403":{
                "description":"The user does not have authorization to perform this request.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "404":{
                "description":"The requested resource cannot be found.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "405":{
                "description":"The method is not allowed.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "409":{
                "description":"The request could not be processed due to a conflict with the existing state of the resource.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "500":{
                "description":"The system has encountered an internal server error.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "501":{
                "description":"The request was not implemented.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "503":{
                "description":"The service is unavailable.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/Error"
                        }
                    }
                }
            },
            "200_FetchResponse":{
                "description":"The request was completed successfully.",
                "content":{
                    "application/json":{
                        "schema":{
                            "type":"array",
                            "items":{
                                "$ref":"#/components/schemas/FetchResponse"
                            }
                        }
                    }
                }
            },
            "200_CollectResponse":{
                "description":"The request was completed successfully.",
                "content":{
                    "application/json":{
                        "schema":{
                            "type":"array",
                            "items":{
                                "$ref":"#/components/schemas/CollectResponse"
                            }
                        }
                    }
                }
            },
            "200_CacheResponse":{
                "description":"The request was completed successfully.",
                "content":{
                    "application/json":{
                        "schema":{
                            "type":"array",
                            "items":{
                                "$ref":"#/components/schemas/CacheResponse"
                            }
                        }
                    }
                }
            },
            "200_TrainResponse":{
                "description":"The request was completed successfully.",
                "content":{
                    "application/json":{
                        "schema":{
                            "type":"array",
                            "items":{
                                "$ref":"#/components/schemas/TrainResponse"
                            }
                        }
                    }
                }
            },
            "200_RecommendResponse":{
                "description":"The request was completed successfully.",
                "content":{
                    "application/json":{
                        "schema":{
                            "$ref":"#/components/schemas/RecommendResponse"
                        },
                        "examples":{
                            "RecommendResponseExample":{
                                "$ref":"#/components/examples/RecommendResponseExample"
                            }
                        }
                    }
                }
            }
        },
        "examples":{
            "FetchRequest":{
                "description":"Request payload for the Fetch API operation.",
                "value":{
                    "@type":"FetchRequest",
                    "required_data":[
                        "RequiredDataName-SubscriberData"
                    ],
                    "additional_data":{
                        "account_id":"2479437",
                        "sample":"true"
                    }
                }
            },
            "CacheRequest":{
                "description":"Request payload for the Cache API operation.",
                "value":{
                    "@type":"CacheRequest",
                    "required_data":[
                        "RequiredDataName-SubscriberData"
                    ],
                    "storage_type":"dataflow"
                }
            },
            "CollectRequest":{
                "description":"Request payload for the Collect API operation.",
                "value":{
                    "@type":"CollectRequest",
                    "data_source_type":[
                        "oracledb"
                    ],
                    "delta_data":false,
                    "tech_choice":"spark / dataflow / datascience",
                    "storage_details":[
                        {
                            "@type":"StorageDetails",
                            "path":"/mnt/sample/new/",
                            "output_file_type":"df",
                            "storage_type":"pvc"
                        }
                    ],
                    "query_builder":[
                        {
                            "@type":"QueryBuilder",
                            "queries":[
                                {
                                    "@type":"QueryList",
                                    "name":"account_data",
                                    "query":"select a.poid_id0 as acct_cd, a.currency as crncy_cd, b.country as cntry_name, b.state as state_name, b.city as city_name from account_t a left join account_nameinfo_t b on b.obj_id0 = a.poid_id0 where b.country <> 'null'"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"balance_group_data",
                                    "query":"select d.poid_id0 as bal_grp_cd, d.ACCOUNT_OBJ_ID0 as acct_cd, b.rec_id2 as acct_bal_typ_cd, b.VALID_TO as bal_expry_dt, e.VALID_FROM as bal_begin_dt, e.CURRENT_BAL as bal_amt, e.GRANTED_BAL as orgnl_bkt_amt, e.GRANTOR_OBJ_ID0 as prod_sbrp_cd, e.GRANTOR_OBJ_TYPE as prod_sbrp_typ_cd from bal_grp_t d left join bal_grp_sub_bals_t e on e.obj_id0 = d.poid_id0 inner join (select rec_id2, max(valid_to) as valid_to from bal_grp_sub_bals_t group by rec_id2) b on e.rec_id2 = b.rec_id2 and e.valid_to = b.valid_to"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"service_data",
                                    "query":"select ACCOUNT_OBJ_ID0 as acct_cd, BAL_GRP_OBJ_ID0 as bal_grp_cd, poid_id0 as ser_srvc_cd, poid_type as ser_srvc_typ_cd, name as  ser_srvc_name from service_t where poid_type not like '%/pcm_client' and poid_type not like '%/admin_client'"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"purchased_product_data",
                                    "query":"select ACCOUNT_OBJ_ID0 as acct_cd, CYCLE_START_T as cycl_strt_dt, CYCLE_END_T as cycl_end_dt, PLAN_OBJ_ID0 as prod_ofr_cd, PRODUCT_OBJ_ID0 as prod_spec_cd, POID_ID0 as prod_sbrp_cd, PURCHASE_START_T as prod_sbrp_strt_dt, PURCHASE_END_T as prod_sbrp_end_dt, SERVICE_OBJ_ID0 as ser_srvc_cd, DEAL_OBJ_ID0 as deal_cd from purchased_product_t"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"product_data",
                                    "query":"select poid_id0 as prod_spec_cd, name as shrt_name, permitted from product_t"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"deal_data",
                                    "query":"select d.poid_id0 as deal_cd, d.permitted, d.name, p.PRODUCT_OBJ_ID0 as prod_spec_cd from deal_t d left join deal_products_t p on p.obj_id0 = d.poid_id0"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"plan_data",
                                    "query":"select distinct p.POID_ID0 as prod_ofr_cd, p.NAME as prod_ofr_name, d.PERMITTED as srvc_typ_cd, pd.DEAL_OBJ_ID0 as deal_cd from PLAN_T p left join PLAN_SERVICES_DEALS_T pd on pd.OBJ_ID0 = p.POID_ID0 left join DEAL_T d on d.POID_ID0 = pd.DEAL_OBJ_ID0"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"rate_data",
                                    "query":"select r.POID_ID0 as prod_ofr_price_cd, r.RATE_PLAN_OBJ_ID0 as prod_ofr_price_typ_cd, rp.PRODUCT_OBJ_ID0 as prod_spec_cd, rp.EVENT_TYPE as evt_typ_cd, rb.ELEMENT_ID as elmnt_cd, rb.SCALED_AMOUNT as scaled_amt from rate_t r left join rate_plan_t rp on rp.POID_ID0 = r.RATE_PLAN_OBJ_ID0 left join rate_bal_impacts_t rb on rb.obj_id0 = r.POID_ID0"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"event_data",
                                    "query":"select i.ACCOUNT_OBJ_ID0 as acct_cd, i.OFFERING_OBJ_ID0 as prod_ofr_cd, i.PRODUCT_OBJ_ID0 as prod_spec_cd, i.RESOURCE_ID as acct_bal_typ_cd, e.SERVICE_OBJ_TYPE as service_type, sum(e.net_quantity) as usage from event_t e left join event_bal_impacts_t i on i.OBJ_ID0 = e.POID_ID0 where i.OFFERING_OBJ_ID0 <> 0 group by i.ACCOUNT_OBJ_ID0, i.OFFERING_OBJ_ID0, i.PRODUCT_OBJ_ID0, i.RESOURCE_ID, e.SERVICE_OBJ_TYPE"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"deal_data_2",
                                    "query":"select i.ACCOUNT_OBJ_ID0 as acct_cd, i.OFFERING_OBJ_ID0 as prod_ofr_cd, p.DEAL_OBJ_ID0 as deal_cd from event_bal_impacts_t i left join event_t e on i.OBJ_ID0 = e.POID_ID0 left join purchased_product_t p on p.POID_ID0 = i.OFFERING_OBJ_ID0 where e.POID_TYPE = '/event/billing/product/fee/cycle/cycle_forward_monthly' and i.OFFERING_OBJ_ID0 <> 0"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"over_usage_data",
                                    "query":"select i.ACCOUNT_OBJ_ID0 as acct_cd, i.OFFERING_OBJ_ID0 as prod_ofr_cd, i.PRODUCT_OBJ_ID0 as prod_spec_cd, EXTRACT(MONTH FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400)) as MONTH, EXTRACT(YEAR FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400)) as YEAR, e.SERVICE_OBJ_ID0 as srvc_cd, sum(i.AMOUNT) as amt, sum (e.NET_QUANTITY) / ABS(NULLIF(rb.SCALED_AMOUNT, 0)) as USAGE_OVER_GRANT from event_bal_impacts_t i left join event_t e on i.OBJ_ID0 = e.POID_ID0 left join rate_plan_t rp on rp.PRODUCT_OBJ_ID0 = i.PRODUCT_OBJ_ID0 left join rate_t r on rp.POID_ID0 = r.RATE_PLAN_OBJ_ID0 left join rate_bal_impacts_t rb on rb.obj_id0 = r.poid_id0 where rp.event_type = '/event/billing/product/fee/cycle/cycle_forward_monthly' and e.POID_TYPE like '/event/session%' and e.service_obj_type <> '/service/pcm_client' and i.OFFERING_OBJ_ID0 <> 0 group by i.ACCOUNT_OBJ_ID0, i.OFFERING_OBJ_ID0, e.SERVICE_OBJ_ID0, i.PRODUCT_OBJ_ID0, rb.SCALED_AMOUNT, EXTRACT(MONTH FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400)), EXTRACT(YEAR FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400))"
                                },
                                {
                                    "@type":"QueryList",
                                    "name":"usage_data",
                                    "query":"select i.ACCOUNT_OBJ_ID0 as acct_cd, i.OFFERING_OBJ_ID0 as prod_ofr_cd, i.PRODUCT_OBJ_ID0 as prod_spec_cd, i.RESOURCE_ID as acct_bal_typ_cd, EXTRACT(MONTH FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400)) as MONTH, EXTRACT(YEAR FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400)) as YEAR, e.SERVICE_OBJ_ID0 as srvc_cd, substr(e.SERVICE_OBJ_TYPE, instr (e.SERVICE_OBJ_TYPE, '/', -1) + 1) as ser_srvc_name, sum (e.NET_QUANTITY) / ABS(NULLIF(rb.SCALED_AMOUNT, 0)) as USAGE from event_bal_impacts_t i left join event_t e on i.OBJ_ID0 = e.POID_ID0 left join rate_plan_t rp on rp.PRODUCT_OBJ_ID0 = i.PRODUCT_OBJ_ID0 left join rate_t r on rp.POID_ID0 = r.RATE_PLAN_OBJ_ID0 left join rate_bal_impacts_t rb on rb.obj_id0 = r.poid_id0 where rp.event_type = '/event/billing/product/fee/cycle/cycle_forward_monthly' and e.POID_TYPE like '/event/session%' and i.RESOURCE_ID <> 840 and e.service_obj_type <> '/service/pcm_client' and i.OFFERING_OBJ_ID0 <> 0 group by i.ACCOUNT_OBJ_ID0, i.OFFERING_OBJ_ID0, e.SERVICE_OBJ_ID0, i.PRODUCT_OBJ_ID0, rb.SCALED_AMOUNT, e.SERVICE_OBJ_TYPE, i.RESOURCE_ID, EXTRACT(MONTH FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400)), EXTRACT(YEAR FROM (TO_DATE('01/01/1970', 'dd/mm/yyyy') + e.CREATED_T/86400))"
                                }
                            ],
                            "join_condition":[
                                {
                                    "@type":"JoinConditions",
                                    "name":"joined_query",
                                    "join":[
                                        "serv_query",
                                        "freq_query"
                                    ]
                                },
                                {
                                    "@type":"JoinConditions",
                                    "name":"left_join_1",
                                    "join":[
                                        "event_query",
                                        "acc_info_query"
                                    ],
                                    "join_type":"left",
                                    "join_column":[
                                        "acct_cd"
                                    ]
                                }
                            ]
                        }
                    ]
                }
            },
            "TrainRequest":{
                "summary":"Train a DNN model using data stored on a persistent volume.",
                "description":"Request payload for the Train API operation.",
                "value":{
                    "@type":"TrainRequest",
                    "algorithm":[
                        {
                            "@type":"Algorithms",
                            "algo":"dnn",
                            "model_dir":"model/",
                            "model_name":"dnn",
                            "hyper_parameters":{
                                "test_size":0.2,
                                "epochs":15,
                                "batch_size":16,
                                "loss":"categorical_crossentropy",
                                "optimizer":"rmsprop"
                            }
                        }
                    ],
                    "storage_details":[
                        {
                            "@type":"StorageDetails",
                            "storage_type":"pvc",
                            "additional_details":{
                                "path":"/mnt/data_services/",
                                "file_type":"json"
                            },
                            "required_data":[
                                "acc_query",
                                "over_usage_query"
                            ]
                        }
                    ],
                    "sample":true
                }
            },
            "RecommendRequestWithAccountId":{
                "description":"Specifies a recommendation request that uses account_id as the input identifier.",
                "value":{
                    "@type":"RecommendRequest",
                    "account_id":"2479437",
                    "algorithms":[
                        "knn",
                        "cosine",
                        "dnn"
                    ]
                }
            },
            "RecommendRequestWithMSISDN":{
                "description":"Specifies a recommendation request that uses MSISDN as the input.",
                "value":{
                    "@type":"RecommendRequest",
                    "msisdn":"+1234567890",
                    "algorithms":[
                        "knn",
                        "cosine",
                        "dnn"
                    ]
                }
            },
            "RecommendResponseExample":{
                "description":"Specifies a successful recommendation response.",
                "value":{
                    "@type":"RecommendResponse",
                    "status":"Success",
                    "recommendations":[
                        {
                            "@type":"RecommendationDetails",
                            "algorithm":"knn",
                            "account_id":"2824533",
                            "present_deal":"Deal 10 - Data Storm",
                            "top_results":[
                                {
                                    "@type":"PredictDetails",
                                    "prediction":"Deal 12 - Data Mini",
                                    "probability_or_distance":0
                                }
                            ]
                        }
                    ]
                }
            }
        }
    },
    "tags":[
        {
            "name":"Data Collection and Management",
            "description":"The operations from the Data Collection and Management category."
        },
        {
            "name":"Model Training",
            "description":"The operations from the Model Training category."
        },
        {
            "name":"Next Best Offer Recommendation",
            "description":"Recommends the next best offer based on a customer's historical usage, subscriptions, and demographics data."
        }
    ]
}