Get deployment detail API

You can use this API to get the detailed information of a deployment.

HTTP method and URI path

GET /v3/published_models/${modelId}/deployments/${deploymentId}

Query parameter

include_pending=true

This option will show items waiting approval in the dual control environment.

Standard headers

Use the following standard HTTP header with this request:

Content-Type: application/json

Authorization: <Bearer token>

Required authorizations

The user ID associated with the token which is specified in the request header needs to be granted with one of the following roles:

  • sysadm
  • mladm
  • appuser
  • apiuser (only if the deployment was created by the user)

Expected response

On completion, the service returns an HTTP response, which includes a status code that indicates whether your request is completed. Status code 200 indicates a successful completion. A status code of 4nn or 5nn indicates an error. The response is a deployment output with entity and metadata as described in Table 1.
Table 1. Response from a successful request

In this table, the Field column and Subfield columns list the returned fields, and the Description column provides a brief description of the field.

Field Subfield Description
entity name Name of the deployment created.
type Online or batch.
author

The author of the deployment creation.

  • name: The name of the author of the deployment. Generally, it was set to the token’s userid automatically when you call the Create online deployment API.
  • email: The author’s email.
description Description of the deployment.
status The deployment status. The status might be: UNKNOWN, INITIALIZING, ERROR, or ACTIVE.
input Batch input connection information, only set for batch deployments.
output Batch output connection information, only set for batch deployments.
spark_service Spark service instance data, only set for batch deployments.
model_type Type of the deployed model. The supported model types are: mllib, pmml, scikit-learn, xgboost, arima, sarimax, onyx, watfore.
runtime_environment Runtime environment for the deployed model, for example, spark, java.
deployed_version

The model and version used by the deployment.

  • guid: model version ID.
  • url: the URL of the model which contains the model ID and the version ID.
published_model

The information of the deployment model.

  • guid: the model ID.
  • url: the URL of the model which contains the model ID.
  • name: the model’s name.
  • created_at: the creation timestamp for this model.
  • author: the author’s name of the model.
scoring_url The scoring endpoint, only set for online deployment.
deploy_info

The deployment information.

  • scoringGroupId: The group ID of the scoring server the deployment is created to. For online scoring only.
  • versionSeq: model version sequence.
  • engineType: engine type, only set for online deployment, the supported engine types are spark, pmml, scikit, xgboost, arima, sarimax, onnx, watfore.
  • artifactVersionHref: the URI for the model to create online deployment. It contains the model ID and model version ID.
  • zaiu: Optional Boolean. Applicable only to ONNX models. When set to true, the deployment uses the z16™ on-chip AI accelerator for scoring. If both zaiu and telum2 are set to true, telum2 takes precedence. If neither flag is specified, the ONNX model runs on the CPU.
  • telum2: Optional Boolean. Applicable only to ONNX models. When set to true, the deployment uses the z17™ on-chip AI accelerator for scoring. If both zaiu and telum2 are set to true, telum2 takes precedence. If neither flag is specified, the ONNX model runs on the CPU.
  • batching: whether to enable online micro-batching, true or false. For ONNX model online scoring only.
  • maxLatencyInMs: maximum latency in milliseconds when batching is set to true.
  • maxBatchSize: maximum batch size when batching is set to true.
  • allSchema: A string of JSON describing input and output schemas of the deployment. Only for online deployment. It includes jsonSchema, swaggerSchema, and rawSchema.
  • predictionHorizon: The predictionHorizon parameter is effective only when the engineType is set to "watfore". It determines the number of future time steps for which the Watson Core Time Series model will generate predictions.
  • timeout: The timeout parameter specifies an optional duration, in milliseconds, for scoring requests in PMML and SnapML models with online scoring only. This parameter defines the maximum time a scoring request can run against the deployment before it is canceled. When a timeout is not specified, the timeout field is omitted from the response JSON.
    • Valid range: 1–60,000 milliseconds. For example, "timeout": 60000
    • Default value: not specified
      Note: By default, if the scoring timeout duration is not specified, scoring requests will run until completion. The timeout is not applicable to online batch scoring (JES).

    Once the timeout value is set, the specified timeout value is uniformly applied to all incoming online scoring requests for the deployment.

    • If a scoring request completes within the defined timeout duration, it returns a response as expected.
    • If a scoring request exceeds the defined timeout duration, it is canceled and a scoring request timed out error is returned.
approval_status PENDING_DEPLOY_MODEL This deployment needs to be approved.
PENDING_REMOVE_MODEL_DEPLOYMENT The model is deployed. A deletion request has been submitted.
metadata guid The deployment ID.
created_at The creation timestamp for this deployment.
modified_at The modified timestamp for this deployment.
url The deployment URL which contains the model ID and the deployment ID.
Response example of a successful request:
  • For online deployment
    {
        "metadata": {
            "url": "https://127.0.0.0:9999/v3/published_models/179e5d7e-05a8-4ec9-bf23-381456663565/deployments/6aa759cf-715b-4472-8079-1f6b49dea784",
            "guid": "6aa759cf-715b-4472-8079-1f6b49dea784",
            "modified_at": "2022-12-29T02:12:12.200Z",
            "model_status": [],
            "created_at": "2022-12-29T02:12:05.823Z"
        },
        "entity": {
            "author": {
                "email": "",
                "name": "wmlz11"
            },
            "deploy_info": {
                "allSchema": {
                    "jsonSchema": {
                        "inputSchema": {
                            "$schema": "http://json-schema.org/schema#",
                            "additionalProperties": false,
                            "description": "Input JSON schema",
                            "properties": {
                                "ACTIVITY": {
                                    "additionalProperties": false,
                                    "description": "field ACTIVITY, type int",
                                    "pattern": "",
                                    "type": "integer"
                                },
                                "AGE": {
                                    "additionalProperties": false,
                                    "description": "field AGE, type int",
                                    "pattern": "",
                                    "type": "integer"
                                },
                                "EDUCATION": {
                                    "additionalProperties": false,
                                    "description": "field EDUCATION, type int",
                                    "pattern": "",
                                    "type": "integer"
                                },
                                "INCOME": {
                                    "additionalProperties": false,
                                    "description": "field INCOME, type double",
                                    "pattern": "",
                                    "type": "number"
                                },
                                "NEGTWEETS": {
                                    "additionalProperties": false,
                                    "description": "field NEGTWEETS, type int",
                                    "pattern": "",
                                    "type": "integer"
                                },
                                "SEX": {
                                    "additionalProperties": false,
                                    "description": "field SEX, type string",
                                    "pattern": "",
                                    "type": "string"
                                },
                                "STATE": {
                                    "additionalProperties": false,
                                    "description": "field STATE, type string",
                                    "pattern": "",
                                    "type": "string"
                                }
                            },
                            "required": [
                                "NEGTWEETS",
                                "SEX",
                                "EDUCATION",
                                "AGE",
                                "ACTIVITY",
                                "STATE",
                                "INCOME"
                            ],
                            "type": "object"
                        },
                        "outputSchema": {
                            "$schema": "http://json-schema.org/schema#",
                            "properties": {
                                "prediction": {
                                    "additionalProperties": false,
                                    "description": "field prediction, type double",
                                    "pattern": "",
                                    "type": "number"
                                },
                                "probability": {
                                    "description": "field probability, type array[double]",
                                    "items": {
                                        "type": "number"
                                    },
                                    "maxItems": 2,
                                    "minItems": 2,
                                    "type": "array"
                                }
                            },
                            "required": [
                                "probability",
                                "prediction"
                            ],
                            "type": "object"
                        }
                    },
                    "rawSchema": {
                        "inputSchema": {
                            "fields": [
                                {
                                    "name": "AGE",
                                    "type": "integer"
                                },
                                {
                                    "name": "ACTIVITY",
                                    "type": "integer"
                                },
                                {
                                    "name": "EDUCATION",
                                    "type": "integer"
                                },
                                {
                                    "name": "SEX",
                                    "type": "string"
                                },
                                {
                                    "name": "STATE",
                                    "type": "string"
                                },
                                {
                                    "name": "NEGTWEETS",
                                    "type": "integer"
                                },
                                {
                                    "name": "INCOME",
                                    "type": "double"
                                }
                            ]
                        },
                        "outputSchema": {
                            "fields": [
                                {
                                    "name": "probability",
                                    "type": {
                                        "base": "double",
                                        "dimensions": [
                                            2
                                        ],
                                        "type": "tensor"
                                    }
                                },
                                {
                                    "name": "prediction",
                                    "type": {
                                        "base": "double",
                                        "isNullable": false,
                                        "type": "basic"
                                    }
                                }
                            ]
                        }
                    },
                    "swaggerSchema": {
                        "inputSchema": {
                            "properties": {
                                "ACTIVITY": {
                                    "type": "integer"
                                },
                                "AGE": {
                                    "type": "integer"
                                },
                                "EDUCATION": {
                                    "type": "integer"
                                },
                                "INCOME": {
                                    "format": "double",
                                    "type": "number"
                                },
                                "NEGTWEETS": {
                                    "type": "integer"
                                },
                                "SEX": {
                                    "type": "string"
                                },
                                "STATE": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "NEGTWEETS",
                                "SEX",
                                "EDUCATION",
                                "AGE",
                                "ACTIVITY",
                                "STATE",
                                "INCOME"
                            ],
                            "type": "object"
                        },
                        "outputSchema": {
                            "properties": {
                                "prediction": {
                                    "format": "double",
                                    "type": "number"
                                },
                                "probability": {
                                    "items": {
                                        "format": "double",
                                        "type": "number"
                                    },
                                    "type": "array"
                                }
                            },
                            "required": [
                                "probability",
                                "prediction"
                            ],
                            "type": "object"
                        }
                    }
                },
                "artifactVersionHref": "/v3/ml_assets/models/179e5d7e-05a8-4ec9-bf23-381456663565/versions/4dd86b2c-c09e-4328-acc1-999a57ab09eb",
                "engineType": "mleap",
                "nextFire": "0",
                "scheduleStatus": "",
                "scoringGroupId": "a9955c98-2a95-429c-9413-9c86edbe2017",
                "versionSeq": "1"
            },
            "deployed_version": {
                "guid": "4dd86b2c-c09e-4328-acc1-999a57ab09eb",
                "url": "/v3/ml_assets/models/179e5d7e-05a8-4ec9-bf23-381456663565/versions/4dd86b2c-c09e-4328-acc1-999a57ab09eb"
            },
            "description": "description",
            "model_type": "mllib-mleap",
            "name": "churn_online",
            "published_model": {
                "author": {
                    "name": "wmlz11"
                },
                "created_at": "2022-12-23T04:57:16.375Z",
                "description": "",
                "guid": "179e5d7e-05a8-4ec9-bf23-381456663565",
                "name": "churn",
                "url": "https://127.0.0.0:9999/v3/published_models/179e5d7e-05a8-4ec9-bf23-381456663565"
            },
            "runtime_environment": "spark",
            "scoring_url": "https://127.0.0.0:15779/iml/v2/scoring/online/6aa759cf-715b-4472-8079-1f6b49dea784",
            "status": "ACTIVE",
            "type": "online"
        }
    }
     
  • For batch deployment
    {
        "metadata": {
            "url": "https://127.0.0.1:9999/v3/published_models/f8f38f45-7643-4a61-a40c-af652fc398fc/deployments/cfd31273-aa78-43c0-9f1f-046c85f019c6",
            "guid": "cfd31273-aa78-43c0-9f1f-046c85f019c6",
            "modified_at": "2023-01-12T07:21:28.211Z",
            "model_status": [],
            "created_at": "2023-01-12T07:21:19.219Z"
        },
        "entity": {
            "author": {
                "email": "john.smith@example.com",
                "name": "wmlz11"
            },
            "batch_url": "https://127.0.0.1:9999/v2/batch/deployments/c85aa447-0f3a-422b-a38f-fab43853d411",
            "deploy_info": {
                "artifactVersionHref": "/v3/ml_assets/models/f8f38f45-7643-4a61-a40c-af652fc398fc/versions/ab14b5c7-0ef1-481f-b20c-acee5b643a82",
                "nextFire": "0",
                "scheduleStatus": "",
                "versionSeq": "1"
            },
            "deployed_version": {
                "guid": "ab14b5c7-0ef1-481f-b20c-acee5b643a82",
                "url": "/v3/ml_assets/models/f8f38f45-7643-4a61-a40c-af652fc398fc/versions/ab14b5c7-0ef1-481f-b20c-acee5b643a82"
            },
            "description": "This is batch deployment created for tests",
            "input": {
                "connection": {
                    "dbtable": "SA.CUST_SUM",
                    "driver": "com.ibm.db2.jcc.DB2Driver",
                    "url": "jdbc:db2://127.0.0.1:50000/DBLOC",
                    },
                "source": {
                    "type": "jdbc"
                }
            },
            "model_type": "mllib-mleap",
            "name": "churn-batch",
            "output": {
                "connection": {
                    "dbtable": "SA.CUST_SUM_OUTPUT",
                    "driver": "com.ibm.db2.jcc.DB2Driver",
                    "mode": "overwrite",
                    "url": "jdbc:db2://127.0.0.1:50000/DBLOC",
                   },
                "target": {
                    "type": "jdbc"
                }
            },
            "published_model": {
                "author": {
                    "name": "wmlz11"
                },
                "created_at": "2023-01-10T02:22:40.673Z",
                "description": "",
                "guid": "f8f38f45-7643-4a61-a40c-af652fc398fc",
                "name": "churn",
                "url": "https://127.0.0.1:9999/v3/published_models/f8f38f45-7643-4a61-a40c-af652fc398fc"
            },
            "runtime_environment": "spark",
            "spark_service": {
                "credentials": {
                    "cluster_master_url": "http://127.0.0.1:8889",
                    "instance_id": "fake-instance_id",
                    "plan": "fake-plan",
                    "tenant_id": "fake-tenant_id",
                    "tenant_id_full": "fake-tenant_id_full",
                    "tenant_secret": "fake-tenant_secret"
                },
                "version": "2.1"
            },
            "status": "COMPLETED",
            "status_message": "SUCCESS",
            "type": "batch"
        }
    }