Skip to content

Latest commit

 

History

History
765 lines (488 loc) · 16.5 KB

ModelApi.md

File metadata and controls

765 lines (488 loc) · 16.5 KB

algorithmhub.ModelApi

All URIs are relative to http://localhost:10010/v2

Method HTTP request Description
createModel POST /model Create a new model
createModel_0 POST /service Create a new model
deleteModel DELETE /model/{mid} Delete details of model
deleteModelTrain DELETE /model/{mid}/train/{trid} Delete trained model
deleteModel_0 DELETE /service/{mid} Delete details of model
detailModel GET /model/{mid} Get details of model
detailModel_0 GET /service/{mid} Get details of model
editModel PUT /model/{mid} Edit a model
editModelTrain PUT /model/{mid}/train/{trid} Edit a trained model
editModel_0 PUT /service/{mid} Edit a model
fitModelTrain POST /model/{mid}/train Fit the model
listModelTrain GET /model/{mid}/train List out trained models
listModels GET /model Return models owned
listModels_0 GET /service Return models owned
runModel POST /model/{mid} Run a model
runModelTrain POST /model/{mid}/train/{trid} Run a training
runModel_0 POST /service/{mid} Run a model

createModel

InlineResponse2001 createModel(modelName)

Create a new model

Create a new model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var modelName = new algorithmhub.ModelName(); // ModelName | The model configuration

apiInstance.createModel(modelName).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
modelName ModelName The model configuration

Return type

InlineResponse2001

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

createModel_0

InlineResponse2001 createModel_0(modelName)

Create a new model

Create a new model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var modelName = new algorithmhub.ModelName1(); // ModelName1 | The model configuration

apiInstance.createModel_0(modelName).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
modelName ModelName1 The model configuration

Return type

InlineResponse2001

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

deleteModel

InlineResponse2003 deleteModel(mid)

Delete details of model

Deletes a single model based on the ID supplied

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | Deletes the model based on the model id provided

apiInstance.deleteModel(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String Deletes the model based on the model id provided

Return type

InlineResponse2003

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

deleteModelTrain

'String' deleteModelTrain(mid, trid)

Delete trained model

Deletes a single trained model based on the ID supplied

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | Deletes the trained model based on the model id provided

var trid = "trid_example"; // String | Deletes the trained model based on the model id provided

apiInstance.deleteModelTrain(mid, trid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String Deletes the trained model based on the model id provided
trid String Deletes the trained model based on the model id provided

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

deleteModel_0

InlineResponse2003 deleteModel_0(mid)

Delete details of model

Deletes a single model based on the ID supplied

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | Deletes the model based on the model id provided

apiInstance.deleteModel_0(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String Deletes the model based on the model id provided

Return type

InlineResponse2003

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

detailModel

InlineResponse2002 detailModel(mid)

Get details of model

Get details for an existing model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id

apiInstance.detailModel(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

InlineResponse2002

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

detailModel_0

InlineResponse2002 detailModel_0(mid)

Get details of model

Get details for an existing model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id

apiInstance.detailModel_0(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

InlineResponse2002

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

editModel

'String' editModel(mid, body)

Edit a model

Edit an existing model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id that needs to be edited

var body = new algorithmhub.Body(); // Body | The model configuration

apiInstance.editModel(mid, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id that needs to be edited
body Body The model configuration

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

editModelTrain

'String' editModelTrain(mid, trid)

Edit a trained model

Edit or update an existing training

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id

var trid = "trid_example"; // String | The train id that needs to be edited

apiInstance.editModelTrain(mid, trid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id
trid String The train id that needs to be edited

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

editModel_0

'String' editModel_0(mid, body)

Edit a model

Edit an existing model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id that needs to be edited

var body = new algorithmhub.Body1(); // Body1 | The model configuration

apiInstance.editModel_0(mid, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id that needs to be edited
body Body1 The model configuration

Return type

'String'

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

fitModelTrain

Object fitModelTrain(mid)

Fit the model

Fit the model with the data

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id

apiInstance.fitModelTrain(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

listModelTrain

Object listModelTrain(mid)

List out trained models

List out all the trained models

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id

apiInstance.listModelTrain(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

listModels

InlineResponse200 listModels()

Return models owned

Return list of models owned by user

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();
apiInstance.listModels().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse200

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

listModels_0

InlineResponse200 listModels_0()

Return models owned

Return list of models owned by user

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();
apiInstance.listModels_0().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse200

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

runModel

Object runModel(mid, input)

Run a model

Run an existing model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id to run

var input = [new algorithmhub.[ERRORUNKNOWN]()]; // [ERRORUNKNOWN] | Input into the model

apiInstance.runModel(mid, input).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id to run
input [ERRORUNKNOWN] Input into the model

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

runModelTrain

Object runModelTrain(mid, trid)

Run a training

Run an specific training

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id to train

var trid = "trid_example"; // String | The training id

apiInstance.runModelTrain(mid, trid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id to train
trid String The training id

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

runModel_0

Object runModel_0(mid, input)

Run a model

Run an existing model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.ModelApi();

var mid = "mid_example"; // String | The model id to run

var input = [new algorithmhub.[ERRORUNKNOWN]()]; // [ERRORUNKNOWN] | Input into the model

apiInstance.runModel_0(mid, input).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id to run
input [ERRORUNKNOWN] Input into the model

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined