Skip to main content

SpacesDataSource

Data source for working with Spaces - hierarchical containers for organizing entities and files. Spaces support nested subspaces, file storage, and can contain various entities like scripts, queries, etc.

Extends

Constructors

new SpacesDataSource()

new SpacesDataSource(s): SpacesDataSource

Parameters

ParameterType
sany

Returns

SpacesDataSource

Overrides

HttpDataSource . constructor

Source

src/dapi.ts:797

Properties

PropertyTypeInherited from
clsNamestringHttpDataSource.clsName
dartanyHttpDataSource.dart

Methods

allPackageVersions()

allPackageVersions(): HttpDataSource <Project>

Turns off package versions isolation. This DataSource will return all entities in all versions, not only the current one *

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . allPackageVersions

Source

src/dapi.ts:301


by()

by(i): HttpDataSource <Project>

Parameters

ParameterType
inumber

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . by

Source

src/dapi.ts:306


count()

count(): Promise<number>

Counts entities that satisfy the filtering criteria (see filter). See examples: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/smart-search

Returns

Promise<number>

Inherited from

HttpDataSource . count

Source

src/dapi.ts:272


createRootSpace()

createRootSpace(name): Promise <Project>

Parameters

ParameterType
namestring

Returns

Promise <Project>

Source

src/dapi.ts:801


delete()

delete(e): Promise<void>

Deletes an entity.

Parameters

ParameterType
eEntity

Returns

Promise<void>

Inherited from

HttpDataSource . delete

Source

src/dapi.ts:296


filter()

filter(w): HttpDataSource <Project>

Applies filter to current request. Also can be set with list method "options" parameter See example: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/navigation/views/browse#entity-search

Parameters

ParameterType
wstring

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . filter

Source

src/dapi.ts:329


find()

find(id): Promise <Project>

Returns an entity with the specified id. Throws an exception if an entity does not exist, or is not accessible in the current context. Sample: https://public.datagrok.ai/js/samples/data-access/save-and-load-df

Parameters

ParameterTypeDescription
idstringGUID of the corresponding object

Returns

Promise <Project>

{Promise<object>} - entity.

Inherited from

HttpDataSource . find

Source

src/dapi.ts:286


first()

first(): Promise <Project>

Returns fist entity that satisfies the filtering criteria (see filter).

Returns

Promise <Project>

Inherited from

HttpDataSource . first

Source

src/dapi.ts:277


id()

id(spaceId): SpaceClient

Returns a SpaceClient for the space with the specified ID. Use the returned client to manage subspaces, entities, and files within the space.

Parameters

ParameterTypeDescription
spaceIdstringThe unique identifier of the space Project.id

Returns

SpaceClient

Source

src/dapi.ts:816


include()

include(include): HttpDataSource <Project>

Includes entity in the result

Parameters

ParameterType
includestring

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . include

Source

src/dapi.ts:341


list()

list(options): Promise <Project[]>

Returns all entities that satisfy the filtering criteria (see filter). See examples: https://public.datagrok.ai/js/samples/dapi/projects-list Smart filter: https://datagrok.ai/help/datagrok/smart-search

Parameters

ParameterType
optionsobject
options.filter?string
options.order?string
options.pageNumber?number
options.pageSize?number

Returns

Promise <Project[]>

Inherited from

HttpDataSource . list

Source

src/dapi.ts:257


nextPage()

nextPage(): HttpDataSource <Project>

Returns next page of all entities that satisfy the filtering criteria (see filter). Works only if pageSize was set during previous list() call See examples: https://public.datagrok.ai/js/samples/dapi/projects-list

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . nextPage

Source

src/dapi.ts:320


order()

order(fieldName, desc): HttpDataSource <Project>

Instructs data source to return results in the specified order.

Parameters

ParameterTypeDefault value
fieldNamestringundefined
descbooleanfalse

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . order

Source

src/dapi.ts:335


page()

page(i): HttpDataSource <Project>

Restricts results to the specified page number. See also nextPage.

Parameters

ParameterType
inumber

Returns

HttpDataSource <Project>

Inherited from

HttpDataSource . page

Source

src/dapi.ts:312


rootSpaceExists()

rootSpaceExists(name): Promise<boolean>

Checks if a root space (top-level space) with the given name already exists. Use this before creating a new root space to avoid naming conflicts.

Parameters

ParameterType
namestring

Returns

Promise<boolean>

Source

src/dapi.ts:808


save()

save(e): Promise <Project>

Saves an entity.

Parameters

ParameterType
eEntity

Returns

Promise <Project>

Inherited from

HttpDataSource . save

Source

src/dapi.ts:291