AutoML real-time predictions

Use your ML deployment to generate real-time results returned as JSON in a synchronous manner to predict future outcomes on new data.

Download specification

Generate predictions

Generates predictions in a synchronous request and response.

Facts

Rate limit Special (300 requests per minute)
Categories build

Query Parameters

  • includeNotPredictedReasonboolean

    If true, will include a column with the reason why a prediction was not produced.

  • includeShapboolean

    If true, the shapley values will be included in the response.

  • includeSourceboolean

    If true, the source data will be included in the response

  • indexstring

    The name of the feature in the source data to use as an index in the response data. The column will be included with its original name and values. This is intended to allow the caller to join results with source data.

Path Parameters

  • deploymentIdstring
    Required

    The ID of the ML deployed model that will be employed to produce predictions.

Request Body

application/json

  • application/jsonobject
    Show application/json properties
    • rowsarray of arrays

      The rows of the dataset to produce predictions from.

    • schemaarray of objects

      The schema of the input dataset.

      Show schema properties
      • namestring

        The name of a feature in the dataset.

Responses

200

Stream of combined prediction output returned successfully.

400

application/json

Received a bad argument

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
        Required

        The unique code for the error

      • metaobject
        Show meta properties
        • detailsstring

          Extra details for what may have caused the error

        • errorIdstring

          The unique id of the error instance

        • argumentstring

          The argument

        • resourcestring

          The resource type that the error occurred on

        • resourceIdstring

          The resource id that the error occurred on

      • issuestring

        The issue code

      • titlestring

        A summary of what went wrong

      • errorIdstring

        The unique id of the error instance

      • argumentstring

        The argument

      • resourcestring

        The resource type that the error occurred on

      • resourceIdstring

        The resource id that the error occurred on

401

application/json

Unauthorized

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
        Required

        The unique code for the error

      • metaobject
        Show meta properties
        • detailsstring

          Extra details for what may have caused the error

        • errorIdstring

          The unique id of the error instance

        • argumentstring

          The argument

        • resourcestring

          The resource type that the error occurred on

        • resourceIdstring

          The resource id that the error occurred on

      • issuestring

        The issue code

      • titlestring

        A summary of what went wrong

      • errorIdstring

        The unique id of the error instance

      • argumentstring

        The argument

      • resourcestring

        The resource type that the error occurred on

      • resourceIdstring

        The resource id that the error occurred on

403

application/json

Access forbidden

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
        Required

        The unique code for the error

      • metaobject
        Show meta properties
        • detailsstring

          Extra details for what may have caused the error

        • errorIdstring

          The unique id of the error instance

        • argumentstring

          The argument

        • resourcestring

          The resource type that the error occurred on

        • resourceIdstring

          The resource id that the error occurred on

      • issuestring

        The issue code

      • titlestring

        A summary of what went wrong

      • errorIdstring

        The unique id of the error instance

      • argumentstring

        The argument

      • resourcestring

        The resource type that the error occurred on

      • resourceIdstring

        The resource id that the error occurred on

404

application/json

Resource not found.

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
        Required

        The unique code for the error

      • metaobject
        Show meta properties
        • detailsstring

          Extra details for what may have caused the error

        • errorIdstring

          The unique id of the error instance

        • argumentstring

          The argument

        • resourcestring

          The resource type that the error occurred on

        • resourceIdstring

          The resource id that the error occurred on

      • issuestring

        The issue code

      • titlestring

        A summary of what went wrong

      • errorIdstring

        The unique id of the error instance

      • argumentstring

        The argument

      • resourcestring

        The resource type that the error occurred on

      • resourceIdstring

        The resource id that the error occurred on

409

application/json

Resource conflict

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
        Required

        The unique code for the error

      • metaobject
        Show meta properties
        • detailsstring

          Extra details for what may have caused the error

        • errorIdstring

          The unique id of the error instance

        • argumentstring

          The argument

        • resourcestring

          The resource type that the error occurred on

        • resourceIdstring

          The resource id that the error occurred on

      • issuestring

        The issue code

      • titlestring

        A summary of what went wrong

      • errorIdstring

        The unique id of the error instance

      • argumentstring

        The argument

      • resourcestring

        The resource type that the error occurred on

      • resourceIdstring

        The resource id that the error occurred on

503

application/json

Resource unavailable

  • application/jsonobject
    Show application/json properties
    • errorsarray of objects
      Show errors properties
      • codestring
        Required

        The unique code for the error

      • metaobject
        Show meta properties
        • detailsstring

          Extra details for what may have caused the error

        • errorIdstring

          The unique id of the error instance

        • argumentstring

          The argument

        • resourcestring

          The resource type that the error occurred on

        • resourceIdstring

          The resource id that the error occurred on

      • issuestring

        The issue code

      • titlestring

        A summary of what went wrong

      • errorIdstring

        The unique id of the error instance

      • argumentstring

        The argument

      • resourcestring

        The resource type that the error occurred on

      • resourceIdstring

        The resource id that the error occurred on

POST /v1/automl-deployments/{deploymentId}/realtime-predictions
curl "https://your-tenant.us.qlikcloud.com/api/v1/automl-deployments/{deploymentId}/realtime-predictions" \
-X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{"rows":[["string"]],"schema":[{"name":"string"}]}'
const https = require('https')
  const data = JSON.stringify({"rows":[["string"]],"schema":[{"name":"string"}]})
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/automl-deployments/{deploymentId}/realtime-predictions',
    'method': 'POST',
    'headers': {
      'Content-type': 'application/json',
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  req.write(data)
  
This API is not included yet in qlik-cli

Request

{
  "rows": [
    [
      "string"
    ]
  ],
  "schema": [
    {
      "name": "string"
    }
  ]
}