IWorkspacesQuery
Query to retrieve available workspaces.
export interface IWorkspacesQuery
Methods
Method | Description |
|---|---|
Executes the query and returns the result asynchronously. | |
Executes the query and returns all workspace descriptors. This is more efficient when you only need workspace metadata (id, title, etc.) and don’t need the full workspace services. | |
Executes the query and returns workspace descriptors in a paged result. This is more efficient when you only need workspace metadata (id, title, etc.) and don’t need the full workspace services. | |
(ALPHA) Sets filter of workspaces by given attributes | |
Sets a limit on how many items to retrieve at once. | |
Sets a number of items to skip. | |
(ALPHA) Sets additional options for the query. | |
Sets a identifier of the parent workspace to get its children, otherwise the root workspace. | |
Sets a text to search. |
Method details
IWorkspacesQuery.query()method
Executes the query and returns the result asynchronously.
query(): Promise<IWorkspacesQueryResult>;
Returns
Promise<IWorkspacesQueryResult>
IWorkspacesQuery.queryAllDescriptors()method
Executes the query and returns all workspace descriptors. This is more efficient when you only need workspace metadata (id, title, etc.) and don’t need the full workspace services.
queryAllDescriptors(): Promise<IWorkspaceDescriptor[]>;
Returns
Promise<IWorkspaceDescriptor[]>
IWorkspacesQuery.queryDescriptors()method
Executes the query and returns workspace descriptors in a paged result. This is more efficient when you only need workspace metadata (id, title, etc.) and don’t need the full workspace services.
queryDescriptors(): Promise<IPagedResource<IWorkspaceDescriptor>>;
Returns
Promise<IPagedResource<IWorkspaceDescriptor>>
IWorkspacesQuery.withFilter()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets filter of workspaces by given attributes
withFilter(filter: IWorkspacesQueryFilter): IWorkspacesQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
filter | an object of attributes and values to filter by |
Returns
IWorkspacesQuery.withLimit()method
Sets a limit on how many items to retrieve at once.
withLimit(limit: number): IWorkspacesQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
limit | number | how many items to retrieve at most |
Returns
IWorkspacesQuery.withOffset()method
Sets a number of items to skip.
withOffset(offset: number): IWorkspacesQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
offset | number | how many items to skip |
Returns
IWorkspacesQuery.withOptions()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Sets additional options for the query.
withOptions(options: IWorkspacesQueryOptions): IWorkspacesQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
options | an object of options to modify the query behavior |
Returns
IWorkspacesQuery.withParent()method
Sets a identifier of the parent workspace to get its children, otherwise the root workspace.
withParent(workspaceId: string | undefined): IWorkspacesQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
workspaceId | string | undefined | identifier of the parent workspace |
Returns
IWorkspacesQuery.withSearch()method
Sets a text to search.
withSearch(search: string): IWorkspacesQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
search | string | text to search |
Returns