Skip to content

Latest commit

 

History

History
624 lines (397 loc) · 12.3 KB

RunApi.md

File metadata and controls

624 lines (397 loc) · 12.3 KB

algorithmhub.RunApi

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

Method HTTP request Description
addFileRun POST /run/{rid}/file PRIVATE
detailRun GET /run/{rid} Get info about run
getInput GET /run/{rid}/input Input parameters
getOutput GET /run/{rid}/output Get the output
getOutputFigure GET /run/{rid}/figure/{fid}/* Get figure as app
getOutputFile GET /run/{rid}/file/{filename} Get a file
getStatus GET /run/{rid}/status Get status of the run
listOutputFigures GET /run/{rid}/figures Get list of figures
listOutputFiles GET /run/{rid}/files Get list of output files
listRuns GET /run Get list of runs
postError POST /run/{rid}/error PRIVATE
postFigure POST /run/{rid}/figure PRIVATE
postStatus POST /run/{rid}/status PRIVATE
setSuccess POST /run/{rid} PRIVATE

addFileRun

'String' addFileRun(rid)

PRIVATE

Add a file to the run results

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

'String'

Authorization

No authorization required

HTTP request headers

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

detailRun

InlineResponse2005 detailRun(rid)

Get info about run

Get info about the run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse2005

Authorization

No authorization required

HTTP request headers

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

getInput

InlineResponse2006 getInput(rid)

Input parameters

Input parameters

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse2006

Authorization

No authorization required

HTTP request headers

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

getOutput

Object getOutput(rid)

Get the output

Get the output

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

Object

Authorization

No authorization required

HTTP request headers

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

getOutputFigure

File getOutputFigure(rid, fid)

Get figure as app

Get figure as app

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

var fid = "fid_example"; // String | The file id

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

Parameters

Name Type Description Notes
rid String The run id
fid String The file id

Return type

File

Authorization

No authorization required

HTTP request headers

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

getOutputFile

InlineResponse2008 getOutputFile(rid, filename)

Get a file

Get a file

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

var filename = "filename_example"; // String | The filename

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

Parameters

Name Type Description Notes
rid String The run id
filename String The filename

Return type

InlineResponse2008

Authorization

No authorization required

HTTP request headers

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

getStatus

'String' getStatus(rid)

Get status of the run

Get status of the run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

'String'

Authorization

No authorization required

HTTP request headers

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

listOutputFigures

InlineResponse2009 listOutputFigures(rid)

Get list of figures

Get list of figures

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse2009

Authorization

No authorization required

HTTP request headers

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

listOutputFiles

InlineResponse2007 listOutputFiles(rid)

Get list of output files

Get list of output files

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse2007

Authorization

No authorization required

HTTP request headers

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

listRuns

InlineResponse2004 listRuns()

Get list of runs

Get list of runs

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();
apiInstance.listRuns().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

InlineResponse2004

Authorization

No authorization required

HTTP request headers

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

postError

'String' postError(rid)

PRIVATE

Post that an error occured and close the run.

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The workspace base type.

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

Parameters

Name Type Description Notes
rid String The workspace base type.

Return type

'String'

Authorization

No authorization required

HTTP request headers

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

postFigure

'String' postFigure(rid)

PRIVATE

Add a figure from the run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The workspace base type.

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

Parameters

Name Type Description Notes
rid String The workspace base type.

Return type

'String'

Authorization

No authorization required

HTTP request headers

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

postStatus

'String' postStatus(rid)

PRIVATE

Post the status of run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

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

Parameters

Name Type Description Notes
rid String The run id

Return type

'String'

Authorization

No authorization required

HTTP request headers

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

setSuccess

setSuccess(rid)

PRIVATE

Send output.json and close the run as successful

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.RunApi();

var rid = "rid_example"; // String | The run id

apiInstance.setSuccess(rid).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
rid String The run id

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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