catalog

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

The Catalog interface allows to manage assets which are stored in Smart M.App Platform.

Methods

Name Summary
createFolder

Create folder in catalog

delete

Search items in catalog.

delete

Delete dataset or folder

get

Get dataset

getList

Get list of the available datasets and folders

upload

Upload dataset to the given folder

uploadAttachment

Upload dataset to the given folder

uploadFiles

Upload dataset to the given folder

Methods • Details

createFolder(options, callback, errback) → {void}(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Create folder in catalog

Parameters

Name Type Description
options Object
{
 "name": string,
 "path": string,
 "hidden": boolean
}

undefined

name

Name of folder

path optional

Parent folder path of folder. If null ROOT folder will be chosen as parent of created folder

hidden optional

Default value: false.

Should be hidden folder

callback
function callback(result: Object)
optional

Callback executed on a success

result

A result object

result.id

An id of the folder

errback optional

Callback executed on a failure

Returns

TypeDescription
void

delete(Payload, callback, errback)(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Search items in catalog.

Parameters

Name Type Description
Payload predicate

for search request

callback optional

Callback executed on a success

errback optional

Callback executed on a failure

delete(id, callback, errback)(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Delete dataset or folder

Parameters

Name Type Description
id string

An id of the dataset or folder

callback optional

Callback executed on a success

errback optional

Callback executed on a failure

get(id, callback, errback) → {void}(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Get dataset

Parameters

Name Type Description
id string

An id of the dataset

callback
function callback(result: Object)
optional

Callback executed on a success

result

A result object

result.id

An id of the dataset

result.title

A title of the dataset

result.footprint

A footprint object of the dataset

result.footprint.envelope

An envelope array of the dataset footprint

errback optional

Callback executed on a failure

Returns

TypeDescription
void

getList(callback, errback)(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Get list of the available datasets and folders

Parameters

Name Type Description
callback optional

Callback executed on a success

errback optional

Callback executed on a failure

upload(file, folderPath, callback, errback)(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Upload dataset to the given folder

Parameters

Name Type Description
file Object
{
 "content": Object,
 "mimeType": Object,
 "fileName": Object
}

A file to be uploaded

content

A content of the uploaded file

mimeType

A mime type of the uploaded file

fileName

A name of the uploaded file

folderPath String optional

A path of the folder

callback optional

Callback executed on a success

errback optional

Callback executed on a failure

uploadAttachment(file, itemId, callback, errback)(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Upload dataset to the given folder

Parameters

Name Type Description
file Object
{
 "content": Object,
 "mimeType": Object,
 "fileName": Object
}

A file to be uploaded

content

A content of the uploaded file

mimeType

A mime type of the uploaded file

fileName

A name of the uploaded file

itemId String optional

An id of the existing catalog item

callback optional

Callback executed on a success

errback optional

Callback executed on a failure

uploadFiles(files, folderPath, callback, errback)(static)

Available for:Map PanelBI Map PanelRecipe PanelCustom Panel

Upload dataset to the given folder

Parameters

Name Type Description
files Array.<Object>

An array of files to be uploaded

files[ Object

A content of the uploaded file

files[ Object

A mime type of the uploaded file

files[ Object

A name of the uploaded file

folderPath String optional

A path of the folder

callback optional

Callback executed on a success

errback optional

Callback executed on a failure