Skip to content

Latest commit

 

History

History
222 lines (141 loc) · 4.42 KB

DataApi.md

File metadata and controls

222 lines (141 loc) · 4.42 KB

algorithmhub.DataApi

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

Method HTTP request Description
deleteData DELETE /data/{did} Deletes the data object
downloadData GET /data/{did} Get the data object
getData GET /data/{did}/info Get information on the data
listData GET /data Return a list of data
uploadData POST /data Upload data

deleteData

deleteData(did)

Deletes the data object

Deletes the data object

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.DataApi();

var did = "did_example"; // String | The data id

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

Parameters

Name Type Description Notes
did String The data id

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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

downloadData

File downloadData(did)

Get the data object

Get the data object as a file

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.DataApi();

var did = "did_example"; // String | The data id

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

Parameters

Name Type Description Notes
did String The data id

Return type

File

Authorization

No authorization required

HTTP request headers

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

getData

InlineResponse20012 getData(did)

Get information on the data

Get information on the data object

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.DataApi();

var did = "did_example"; // String | The workspace base type.

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

Parameters

Name Type Description Notes
did String The workspace base type.

Return type

InlineResponse20012

Authorization

No authorization required

HTTP request headers

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

listData

[InlineResponse20012] listData()

Return a list of data

Return a list data objects owned by user

Example

var algorithmhub = require('algorithmhub');

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

[InlineResponse20012]

Authorization

No authorization required

HTTP request headers

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

uploadData

InlineResponse20013 uploadData(file)

Upload data

Upload a data file and get data id

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.DataApi();

var file = "/path/to/file.txt"; // File | The file to upload.

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

Parameters

Name Type Description Notes
file File The file to upload.

Return type

InlineResponse20013

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined