Get Predictions

post

/recommend/predict

Creates a prediction for an account using the specified algorithm.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Match All
Specifies the input parameters for the request.
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • type
    Specifies the input parameters for the request.
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : type
Type: object
Specifies the input parameters for the request.
Show Source
Match One Schema
Show Source
Nested Schema : algorithms
Type: array
Minimum Number of Items: 1
Unique Items Required: true
Lists the algorithms to use for the prediction service: knn, dnn, or cosine.
Show Source
Examples

Back to Top

Response

200 Response

The request was completed successfully.
Body ()
Root Schema : RecommendResponse
Match All
Returns the result output.
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • RecommendResponse-allOf[1]
    Returns the result output.
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : RecommendResponse-allOf[1]
Type: object
Returns the result output.
Show Source
Nested Schema : recommendations
Type: array
Recommendations returned by each algorithm.
Show Source
Nested Schema : RecommendationDetails
Match All
Provides the details for a recommendation.
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • RecommendationDetails-allOf[1]
    Provides the details for a recommendation.
Nested Schema : RecommendationDetails-allOf[1]
Type: object
Provides the details for a recommendation.
Show Source
Nested Schema : top_results
Type: array
Lists the recommendation results.
Show Source
Nested Schema : PredictDetails
Match All
Lists the predicted outcomes.
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • PredictDetails-allOf[1]
    Lists the predicted outcomes.
Nested Schema : PredictDetails-allOf[1]
Type: object
Lists the predicted outcomes.
Show Source
Examples

400 Response

The request could not be processed because it contains missing or invalid information.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

401 Response

The request is not authorized.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

403 Response

The user does not have authorization to perform this request.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

404 Response

The requested resource cannot be found.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

405 Response

The method is not allowed.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

409 Response

The request could not be processed due to a conflict with the existing state of the resource.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

500 Response

The system has encountered an internal server error.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

501 Response

The request was not implemented.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source

503 Response

The service is unavailable.
Body ()
Root Schema : Error
Match All
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
  • Discriminator: @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" } }
    Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
  • Error-allOf[1]
    Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Nested Schema : Discriminator: @type
Type: object
Discriminator: @type

Discriminator Values

Base extensible schema for use with TM Forum Open APIs. When used in a schema, the entity must be extended by specifying `@type`.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Indicates an error response from the API, usually accompanied by an HTTP status code (3xx, 4xx, or 5xx).
Show Source
Back to Top

Examples

This example shows the cURL command for sending a Create a Prediction request:

curl -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_TOKEN" -H "Accept: application/json" -X POST -d @file.json 'http://hostname:port/recommend/predict'

where:

  • your_token is your client application's OAuth 2.0 access token.

  • file.json is the JSON file that specifies the details of the data to collect.
  • hostname is the host name for the application server.

  • port is the port for the application server.

Example of Request Body

Following is a sample request body.

{
  "@type": "RecommendRequest",
  "account_id": "2824533",
  "algorithms": [
    "knn",
    "dnn"
  ]
}

Example of Response Body

If successful, the response code 200 is returned with a response body. For example:

{
  "@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.0
        },
        {
          "@type": "PredictDetails",
          "prediction": "Deal 4 - SMS Special",
          "probability_or_distance": 0.0
        },
        {
          "@type": "PredictDetails",
          "prediction": "Deal 3 - CO for Voice 40",
          "probability_or_distance": 0.0
        }
      ]
    },
    {
      "@type": "RecommendationDetails",
      "algorithm": "dnn",
      "account_id": "2824533",
      "present_deal": "Deal 10 - Data Storm",
      "top_results": [
        {
          "@type": "PredictDetails",
          "prediction": "Deal 1 - Data 30",
          "probability_or_distance": 0.11470177
        },
        {
          "@type": "PredictDetails",
          "prediction": "Deal 11 - Data Blaze",
          "probability_or_distance": 0.11470167
        },
        {
          "@type": "PredictDetails",
          "prediction": "Deal 10 - Data Storm",
          "probability_or_distance": 0.11470162
        }
      ]
    }
  ]
}
Back to Top