Client
API client object.
Static Method Summary
Static Public Methods | ||
public static |
createUser(usersUrl: string, username: string, password: string, email: string, timeout: number): Promise<User> Create a new user account. |
|
public static |
Fetch a user's login authorization token from the REST API. |
|
public static |
runAsyncTask(taskGenerator: function*()) Helper method to run an asynchronous task defined by a task generator function. |
Constructor Summary
Public Constructor | ||
public |
constructor(url: string, auth: Object) Constructor |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
feedsUrl: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
adminCreateGroup(data: Object, timeout: number): Promise<Group> Create a new group resource through the REST API. |
|
public |
adminUploadPlugin(data: Object, pluginFileObj: Object, timeout: number): Promise<PluginAdmin> Upload a plugin representation file and create a new plugin admin resource through the REST API. |
|
public |
computeWorkflowNodesInfo(pipelineDefaultParameters: Object[], includeAllDefaults: boolean): Object[] Helper method to create the |
|
public |
createDownloadToken(timeout: number): Promise<DownloadToken> Create a new file download token resource through the REST API. |
|
public |
createFileBrowserFolder(data: Object, timeout: number): Promise<FileBrowserFolder> Create a new file browser folder resource through the REST API. |
|
public |
createPipeline(data: Object, timeout: number): Promise<Pipeline> Create a new pipeline resource through the REST API. |
|
public |
createPluginInstance(pluginId: number, data: Object, timeout: number): Promise<PluginInstance> Create a new plugin instance resource through the REST API. |
|
public |
createPluginInstanceSplit(pluginInstanceId: number, filter: string, cr_name: string, timeout: number): Promise<PluginInstanceSplit> Create a new plugin instance split resource through the REST API. |
|
public |
Create a new tag resource through the REST API. |
|
public |
Create a new workflow resource through the REST API. |
|
public |
getChrisInstance(timeout: number): Promise<ChrisInstance> Get the ChRIS instance resource object. |
|
public |
getComputeResource(id: number, timeout: number): Promise<ComputeResource|null> Get a compute resource object given its id. |
|
public |
getComputeResources(searchParams: Object, timeout: number): Promise<ComputeResourceList> Get a paginated list of compute resources from the REST API given query search parameters. |
|
public |
getDownloadToken(id: number, timeout: number): Promise<DownloadToken|null> Get a download token resource object given its id. |
|
public |
getDownloadTokens(searchParams: Object, timeout: number): Promise<DownloadTokenList> Get a paginated list of file download tokens for the authenticated user from the REST API given query search parameters. |
|
public |
Get a feed resource object given its id. |
|
public |
Get a paginated list of currently authenticated user's feeds from the REST API given query search parameters. If no search parameters then get the default first page. |
|
public |
getFileBrowserFolder(id: number, timeout: number): Promise<FileBrowserFolder|null> Get a file browser folder resource object given its id. |
|
public |
getFileBrowserFolderByPath(path: string, timeout: number): Promise<FileBrowserFolder|null> Get a file browser folder resource object given its path. |
|
public |
getFileBrowserFolders(searchParams: Object, timeout: number): Promise<FileBrowserFolderList> Get a list with the matching file browser folder (the returned list only has at most one element) from the REST API given query search parameters. |
|
public |
Get a group resource object given its id. |
|
public |
Get a paginated list of groups from the REST API given query search parameters. |
|
public |
Get a PACS file resource object given its id. |
|
public |
getPACSFiles(searchParams: Object, timeout: number): Promise<PACSFileList> Get a paginated list of PACS files from the REST API given query search parameters. |
|
public |
getPACSSeries(id: number, timeout: number): Promise<PACSSeries|null> Get a PACS series resource object given its id. |
|
public |
getPACSSeriesList(searchParams: Object, timeout: number): Promise<PACSSeriesList> Get a paginated list of PACS series from the REST API given query search parameters. |
|
public |
Get a pipeline resource object given its id. |
|
public |
getPipelineSourceFile(id: number, timeout: number): Promise<PipelineSourceFile|null> Get a pipeline source file resource object given its id. |
|
public |
getPipelineSourceFiles(searchParams: Object, timeout: number): Promise<PipelineSourceFileList> Get a paginated list of pipeline source files from the REST API given query search parameters. |
|
public |
getPipelines(searchParams: Object, timeout: number): Promise<PipelineList> Get a paginated list of pipelines from the REST API given query search parameters. |
|
public |
Get a plugin resource object given its id. |
|
public |
getPluginInstance(id: number, timeout: number): Promise<PluginInstance|null> Get a plugin instance resource object given its id. |
|
public |
getPluginInstances(searchParams: Object, timeout: number): Promise<AllPluginInstanceList> Get a paginated list of plugin instances from the REST API given query search parameters. |
|
public |
getPluginMeta(id: number, timeout: number): Promise<PluginMeta|null> Get a plugin meta resource object given its id. |
|
public |
getPluginMetas(searchParams: Object, timeout: number): Promise<PluginMetaList> Get a paginated list of plugin metas from the REST API given query search parameters. |
|
public |
getPlugins(searchParams: Object, timeout: number): Promise<PluginList> Get a paginated list of plugins from the REST API given query search parameters. |
|
public |
getPublicFeeds(searchParams: Object, timeout: number): Promise<PublicFeedList> Get a paginated list of public feeds from the REST API given query search parameters. |
|
public |
Get a tag resource object given its id. |
|
public |
Get a paginated list of tags from the REST API given query search parameters. |
|
public |
Get a user resource object for the currently authenticated user. |
|
public |
Get a user file resource object given its id. |
|
public |
getUserFiles(searchParams: Object, timeout: number): Promise<UserFileList> Get a paginated list of user files from the REST API given query search parameters. |
|
public |
Get a workflow resource object given its id. |
|
public |
getWorkflows(searchParams: Object, timeout: number): Promise<AllWorkflowList> Get a paginated list of workflows from the REST API given query search parameters. |
|
public |
Set the urls of the high level API resources. |
|
public |
Upload a file and create a new user file resource through the REST API. |
|
public |
uploadPipelineSourceFile(data: Object, uploadFileObj: Object, timeout: number): Promise<PipelineSourceFile> Upload a pipeline source file and create a new pipeline source file resource through the REST API. |
Private Methods | ||
private |
Internal method to fetch a high level resource through the REST API. |
Static Public Methods
public static createUser(usersUrl: string, username: string, password: string, email: string, timeout: number): Promise<User> source
Create a new user account.
public static getAuthToken(authUrl: string, username: string, password: string, timeout: number): Promise<string> source
Fetch a user's login authorization token from the REST API.
public static runAsyncTask(taskGenerator: function*()) source
Helper method to run an asynchronous task defined by a task generator function.
Params:
Name | Type | Attribute | Description |
taskGenerator | function*() | generator function |
Public Constructors
Public Members
public feedsUrl: * source
Public Methods
public adminCreateGroup(data: Object, timeout: number): Promise<Group> source
Create a new group resource through the REST API.
public adminUploadPlugin(data: Object, pluginFileObj: Object, timeout: number): Promise<PluginAdmin> source
Upload a plugin representation file and create a new plugin admin resource through the REST API.
Params:
Name | Type | Attribute | Description |
data | Object | request JSON data object |
|
data.compute_names | string | string representing a comma-separated list of names of already registered compute resources |
|
pluginFileObj | Object | custom file object |
|
pluginFileObj.fname | Object | plugin's file blob |
|
timeout | number |
|
request timeout |
public computeWorkflowNodesInfo(pipelineDefaultParameters: Object[], includeAllDefaults: boolean): Object[] source
Helper method to create the nodes_info
field required by createWorkflow
method's
data
argument to create a workflow from a pipeline's default parameters data array
tipically returned by Pipeline.getDefaultParameters().data
.
public createDownloadToken(timeout: number): Promise<DownloadToken> source
Create a new file download token resource through the REST API.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public createFileBrowserFolder(data: Object, timeout: number): Promise<FileBrowserFolder> source
Create a new file browser folder resource through the REST API.
public createPipeline(data: Object, timeout: number): Promise<Pipeline> source
Create a new pipeline resource through the REST API.
Params:
Name | Type | Attribute | Description |
data | Object | request data object |
|
data.name | string | pipeline name |
|
data.authors | string |
|
pipeline authors |
data.category | string |
|
pipeline category |
data.description | string |
|
pipeline description |
data.locked | boolean |
|
pipeline status |
data.plugin_tree | string |
|
JSON string containing a plugin tree list |
data.plugin_inst_id | number |
|
plugin instance id |
timeout | number |
|
request timeout |
public createPluginInstance(pluginId: number, data: Object, timeout: number): Promise<PluginInstance> source
Create a new plugin instance resource through the REST API.
Params:
Name | Type | Attribute | Description |
pluginId | number | plugin id |
|
data | Object | request data object which is plugin-specific |
|
data.previous_id | number |
|
id of the previous plugin instance |
data.title | string |
|
title |
data.compute_resource_name | string |
|
remote compute resource name |
data.cpu_limit | string |
|
cpu limit |
data.memory_limit | string |
|
memory limit |
data.number_of_workers | string |
|
number of workers |
data.gpu_limit | string |
|
gpu limit |
timeout | number |
|
request timeout |
public createPluginInstanceSplit(pluginInstanceId: number, filter: string, cr_name: string, timeout: number): Promise<PluginInstanceSplit> source
Create a new plugin instance split resource through the REST API.
public createTag(data: Object, timeout: number): Promise<Tag> source
Create a new tag resource through the REST API.
public createWorkflow(pipelineId: number, data: Object, timeout: number): Promise<Workflow> source
Create a new workflow resource through the REST API.
Params:
Name | Type | Attribute | Description |
pipelineId | number | pipeline id |
|
data | Object | request data object |
|
data.previous_plugin_inst_id | number | previous plugin instance id |
|
data.nodes_info | string | pipeline-specific JSON string encoding a list of objects.
Each object is a workflow node containing a |
|
timeout | number |
|
request timeout |
public getChrisInstance(timeout: number): Promise<ChrisInstance> source
Get the ChRIS instance resource object.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public getComputeResource(id: number, timeout: number): Promise<ComputeResource|null> source
Get a compute resource object given its id.
public getComputeResources(searchParams: Object, timeout: number): Promise<ComputeResourceList> source
Get a paginated list of compute resources from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match file id exactly with this number |
searchParams.name | string |
|
match compute resource's name containing this string |
searchParams.name_exact | string |
|
match compute resource's name exactly with this string |
searchParams.description | string |
|
match compute resource's description containing this string |
searchParams.plugin_id | string |
|
match plugin id exactly with this string for all the compute resources associated with the plugin |
timeout | number |
|
request timeout |
public getDownloadToken(id: number, timeout: number): Promise<DownloadToken|null> source
Get a download token resource object given its id.
public getDownloadTokens(searchParams: Object, timeout: number): Promise<DownloadTokenList> source
Get a paginated list of file download tokens for the authenticated user from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match file download token id exactly with this number |
timeout | number |
|
request timeout |
public getFeed(id: number, timeout: number): Promise<Feed|null> source
Get a feed resource object given its id.
public getFeeds(searchParams: Object, timeout: number): Promise<FeedList> source
Get a paginated list of currently authenticated user's feeds from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match feed id exactly with this number |
searchParams.min_id | number |
|
match feed id gte this number |
searchParams.max_id | number |
|
match feed id lte this number |
searchParams.name | string |
|
match feed name containing this string |
searchParams.name_exact | string |
|
match feed name exactly with this string |
searchParams.name_startswith | string |
|
match feed name starting with this string |
searchParams.files_fname_icontains | string |
|
match the feeds that have files containing all the substrings from the queried string (which in turn represents a white-space-separated list of query strings) case insensitive anywhere in their fname. |
searchParams.min_creation_date | number |
|
match feed creation date gte this date |
searchParams.max_creation_date | number |
|
match feed creation date lte this date |
timeout | number |
|
request timeout |
public getFileBrowserFolder(id: number, timeout: number): Promise<FileBrowserFolder|null> source
Get a file browser folder resource object given its id.
public getFileBrowserFolderByPath(path: string, timeout: number): Promise<FileBrowserFolder|null> source
Get a file browser folder resource object given its path.
public getFileBrowserFolders(searchParams: Object, timeout: number): Promise<FileBrowserFolderList> source
Get a list with the matching file browser folder (the returned list only has at most one element) from the REST API given query search parameters. If no search parameters then get a list with the default root folder.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match folder id exactly with this number |
searchParams.path | string |
|
match folder's path exactly with this string |
timeout | number |
|
request timeout |
public getGroup(id: number, timeout: number): Promise<Group|null> source
Get a group resource object given its id.
public getGroups(searchParams: Object, timeout: number): Promise<GroupList> source
Get a paginated list of groups from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match group id exactly with this number |
searchParams.name | string |
|
match group name exactly with this string |
searchParams.name_icontains | string |
|
match group name containing this string |
timeout | number |
|
request timeout |
public getPACSFile(id: number, timeout: number): Promise<PACSFile|null> source
Get a PACS file resource object given its id.
public getPACSFiles(searchParams: Object, timeout: number): Promise<PACSFileList> source
Get a paginated list of PACS files from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match file id exactly with this number |
searchParams.fname | string |
|
match file's path starting with this string |
searchParams.fname_exact | string |
|
match file's path exactly with this string |
searchParams.fname_icontains | string |
|
match file's path containing this string |
searchParams.fname_icontains_topdir_unique | string |
|
match file's path containing all the substrings from the queried string (which in turn represents a white-space-separated list of query strings) case insensitive anywhere in their fname. But only one file is returned per toplevel directory under SERVICES/PACS/pacs_name. This is useful to efficiently determine the top level directories containing a file that matches the query. |
searchParams.min_creation_date | string |
|
match file's creation_date greater than this date string |
searchParams.max_creation_date | string |
|
match file's creation_date lesser than this date string |
timeout | number |
|
request timeout |
public getPACSSeries(id: number, timeout: number): Promise<PACSSeries|null> source
Get a PACS series resource object given its id.
public getPACSSeriesList(searchParams: Object, timeout: number): Promise<PACSSeriesList> source
Get a paginated list of PACS series from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match file id exactly with this number |
searchParams.PatientID | string |
|
match file's PatientID exactly with this string |
searchParams.PatientName | string |
|
match file's PatientName containing this string |
searchParams.PatientSex | string |
|
match file's PatientSex exactly with this string |
searchParams.PatientAge | number |
|
match file's PatientAge exactly with this number |
searchParams.min_PatientAge | number |
|
match file's PatientAge greater than this number |
searchParams.max_PatientAge | number |
|
match file's PatientAge lesser than this number |
searchParams.PatientBirthDate | string |
|
match file's PatientBirthDate exactly with this date string |
searchParams.StudyDate | string |
|
match file's StudyDate exactly with this date string |
searchParams.AccessionNumber | string |
|
match file's AccessionNumber exactly with this string |
searchParams.ProtocolName | string |
|
match file's ProtocolName exactly with this string |
searchParams.StudyInstanceUID | string |
|
match file's StudyInstanceUID exactly with this string |
searchParams.StudyDescription | string |
|
match file's StudyDescription containing this string |
searchParams.SeriesInstanceUID | string |
|
match file's SeriesInstanceUID exactly with this string |
searchParams.SeriesDescription | string |
|
match file's SeriesDescription containing this string |
searchParams.min_creation_date | string |
|
match file's creation_date greater than this date string |
searchParams.max_creation_date | string |
|
match file's creation_date lesser than this date string |
searchParams.pacs_identifier | string |
|
match file's PACS exactly with this string |
timeout | number |
|
request timeout |
public getPipeline(id: number, timeout: number): Promise<Pipeline|null> source
Get a pipeline resource object given its id.
public getPipelineSourceFile(id: number, timeout: number): Promise<PipelineSourceFile|null> source
Get a pipeline source file resource object given its id.
Return:
Promise<PipelineSourceFile|null> | JS Promise, resolves to a |
public getPipelineSourceFiles(searchParams: Object, timeout: number): Promise<PipelineSourceFileList> source
Get a paginated list of pipeline source files from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match file id exactly with this number |
searchParams.fname | string |
|
match file's path starting with this string |
searchParams.fname_exact | string |
|
match file's path exactly with this string |
searchParams.fname_icontains | string |
|
match file's path containing this string |
searchParams.uploader_username | string |
|
match file's uploader username exactly with this string |
searchParams.min_creation_date | string |
|
match file's creation_date greater than this date string |
searchParams.max_creation_date | string |
|
match file's creation_date lesser than this date string |
timeout | number |
|
request timeout |
public getPipelines(searchParams: Object, timeout: number): Promise<PipelineList> source
Get a paginated list of pipelines from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match plugin id exactly with this number |
searchParams.name | string |
|
match plugin name containing this string |
searchParams.owner_username | string |
|
match pipeline's owner username exactly with this string |
searchParams.category | string |
|
match plugin category containing this string |
searchParams.description | string |
|
match plugin description containing this string |
searchParams.authors | string |
|
match plugin authors containing this string |
searchParams.min_creation_date | string |
|
match plugin creation date gte this date |
searchParams.max_creation_date | string |
|
match plugin creation date lte this date |
timeout | number |
|
request timeout |
public getPlugin(id: number, timeout: number): Promise<Plugin|null> source
Get a plugin resource object given its id.
public getPluginInstance(id: number, timeout: number): Promise<PluginInstance|null> source
Get a plugin instance resource object given its id.
public getPluginInstances(searchParams: Object, timeout: number): Promise<AllPluginInstanceList> source
Get a paginated list of plugin instances from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match plugin instance id exactly with this number |
searchParams.root_id | number |
|
match root plugin instance's id exactly with this number |
searchParams.previous_id | number |
|
match previous plugin instance's id exactly with this number |
searchParams.title | string |
|
match plugin instance title containing this string |
searchParams.status | string |
|
match plugin instance execution status exactly with this string |
searchParams.owner_username | string |
|
match plugin instances's owner username exactly with this string |
searchParams.feed_id | number |
|
match associated feed's id exactly with this number |
searchParams.workflow_id | number |
|
match associated workflows's id exactly with this number |
searchParams.plugin_id | number |
|
match associated plugin's id exactly with this number |
searchParams.plugin_name | number |
|
match associated plugin's name containing this string |
searchParams.plugin_name_exact | number |
|
match associated plugin's name exact with this string |
searchParams.plugin_version | number |
|
match associated plugin's verion exactly with this string |
searchParams.min_start_date | string |
|
match plugin instance's start date gte this date |
searchParams.max_start_date | string |
|
match plugin instance's start date lte this date |
searchParams.min_end_date | string |
|
match plugin instance's end date gte this date |
searchParams.max_end_date | string |
|
match plugin instance's end date lte this date |
timeout | number |
|
request timeout |
public getPluginMeta(id: number, timeout: number): Promise<PluginMeta|null> source
Get a plugin meta resource object given its id.
public getPluginMetas(searchParams: Object, timeout: number): Promise<PluginMetaList> source
Get a paginated list of plugin metas from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match plugin meta id exactly with this number |
searchParams.name | string |
|
match plugin meta name containing this string |
searchParams.name_exact | string |
|
match plugin meta name exactly with this string |
searchParams.title | string |
|
match plugin meta title containing this string |
searchParams.category | string |
|
match plugin meta category exactly with this string |
searchParams.type | string |
|
match plugin meta type exactly with this string |
searchParams.authors | string |
|
match plugin meta authors containing this string |
searchParams.min_creation_date | number |
|
match plugin meta creation date gte this date |
searchParams.max_creation_date | number |
|
match plugin meta creation date lte this date |
searchParams.name_title_category | string |
|
match plugin meta name, title or category containing this string |
searchParams.name_authors_category | string |
|
match plugin meta name, authors or category containing this string |
timeout | number |
|
request timeout |
public getPlugins(searchParams: Object, timeout: number): Promise<PluginList> source
Get a paginated list of plugins from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match plugin id exactly with this number |
searchParams.name | string |
|
match plugin name containing this string |
searchParams.name_exact | string |
|
match plugin name exactly with this string |
searchParams.version | string |
|
match plugin version exactly with this string |
searchParams.dock_image | string |
|
match plugin docker image exactly with this string |
searchParams.type | string |
|
match plugin type exactly with this string |
searchParams.category | string |
|
match plugin category containing this string |
searchParams.title | string |
|
match plugin title containing this string |
searchParams.description | string |
|
match plugin description containing this string |
searchParams.min_creation_date | string |
|
match plugin creation date gte this date |
searchParams.max_creation_date | string |
|
match plugin creation date lte this date |
searchParams.name_title_category | string |
|
match plugin name, title or category containing this string |
searchParams.compute_resource_id | number |
|
match plugin's compute resource id exactly with this number |
timeout | number |
|
request timeout |
public getPublicFeeds(searchParams: Object, timeout: number): Promise<PublicFeedList> source
Get a paginated list of public feeds from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match feed id exactly with this number |
searchParams.min_id | number |
|
match feed id gte this number |
searchParams.max_id | number |
|
match feed id lte this number |
searchParams.name | string |
|
match feed name containing this string |
searchParams.name_exact | string |
|
match feed name exactly with this string |
searchParams.name_startswith | string |
|
match feed name starting with this string |
searchParams.files_fname_icontains | string |
|
match the feeds that have files containing all the substrings from the queried string (which in turn represents a white-space-separated list of query strings) case insensitive anywhere in their fname. |
searchParams.min_creation_date | number |
|
match feed creation date gte this date |
searchParams.max_creation_date | number |
|
match feed creation date lte this date |
timeout | number |
|
request timeout |
public getTag(id: number, timeout: number): Promise<Tag|null> source
Get a tag resource object given its id.
public getTags(searchParams: Object, timeout: number): Promise<TagList> source
Get a paginated list of tags from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match tag id exactly with this number |
searchParams.name | string |
|
match tag name containing this string |
searchParams.owner_username | string |
|
match tag's owner username exactly with this string |
searchParams.color | string |
|
match plugin color containing this string |
timeout | number |
|
request timeout |
public getUser(timeout: number): Promise<User> source
Get a user resource object for the currently authenticated user.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public getUserFile(id: number, timeout: number): Promise<UserFile|null> source
Get a user file resource object given its id.
public getUserFiles(searchParams: Object, timeout: number): Promise<UserFileList> source
Get a paginated list of user files from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match file id exactly with this number |
searchParams.fname | string |
|
match file's path starting with this string |
searchParams.fname_exact | string |
|
match file's path exactly with this string |
searchParams.fname_icontains | string |
|
match file's path containing this string |
searchParams.fname_nslashes | string | number |
|
match file's path containing this number of slashes |
searchParams.owner_username | string |
|
match file's owner username exactly with this string |
searchParams.min_creation_date | string |
|
match file's creation_date greater than this date string |
searchParams.max_creation_date | string |
|
match file's creation_date lesser than this date string |
timeout | number |
|
request timeout |
public getWorkflow(id: number, timeout: number): Promise<Workflow> | null source
Get a workflow resource object given its id.
public getWorkflows(searchParams: Object, timeout: number): Promise<AllWorkflowList> source
Get a paginated list of workflows from the REST API given query search parameters. If no search parameters then get the default first page.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match workflow id exactly with this number |
searchParams.title | string |
|
match workflow title containing this string |
searchParams.owner_username | string |
|
match workflow's owner username exactly with this string |
searchParams.pipeline_name | string |
|
match associated pipeline name containing this string |
timeout | number |
|
request timeout |
public setUrls(timeout: number): Promise source
Set the urls of the high level API resources.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public uploadFile(data: Object, uploadFileObj: Object, timeout: number): Promise<UserFile> source
Upload a file and create a new user file resource through the REST API.
Params:
Name | Type | Attribute | Description |
data | Object | request data object |
|
data.upload_path | string | absolute path including file name where the file will be uploaded on the storage service |
|
uploadFileObj | Object | custom file object |
|
uploadFileObj.fname | Object | file blob |
|
timeout | number |
|
request timeout |
public uploadPipelineSourceFile(data: Object, uploadFileObj: Object, timeout: number): Promise<PipelineSourceFile> source
Upload a pipeline source file and create a new pipeline source file resource through the REST API. In addition, this creates a new pipeline resource based on the source of the uploaded file.