| copyright |
|
||
|---|---|---|---|
| lastupdated | 2017-11-16 |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre}
To deploy or refresh a predictive model by using the service, you use an API call to upload a file that contains the scoring branch that was developed by using IBM® SPSS® Modeler. It is made available for scoring data in your applications. Each model file is given a context ID as a convenient alias to use for referencing the deployed model in subsequent service calls. If a model exists for a context ID, it is replaced by this PUT call as a means of refreshing the predictive analytics in use by your applications. {: shortdesc}
PUT http://{PA Bluemix load balancer
URL}/pm/v1/model/{contextId}?accesskey={access_key for this bound
application}
{: codeblock}
Request example:
Content-Type: multipart/form-data
Parameters:
Form parameters:
model_file: the model file to upload
Path parameters:
contextId: the unique identifier to assign to your model or a reference to the deployed model to refresh
Query Parameters:
accesskey: access_key from env.VCAP_SERVICES
{: codeblock}
Response when the deployment succeeds:
Content-Type: application/json
Status code: 200
body:
{
"flag":true,
"message":"detailed information"
}
{: codeblock}
Response when the deployment fails:
Content-Type: application/json
Status code: 200
body:
{
"flag":false,
"message":"reason"
}
{: codeblock}
Ready to get started? To create an instance of a service or bind an application, see Using the service with Spark and Python models or Using the service with IBM® SPSS® models.
For more information about the API, see Service API for Spark and Python models or Service API for IBM® SPSS® models.
For more information about IBM® SPSS® Modeler and the modeling algorithms it provides, see IBM Knowledge Center.
For more information about IBM Data Science Experience and the modeling algorithms it provides, see https://datascience.ibm.com.