IAutomationsQuery
Service to query automations.
export interface IAutomationsQuery
Methods
Method | Description |
|---|---|
Starts the automations query. | |
Starts the automations query. | |
Sets author of the automation for the query. | |
Sets dashboard id for the query. | |
Sets external recipient of the automation for the query. | |
Sets filter for the query. | |
Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0 | |
Sets recipient of the automation for the query. | |
Sets number of automations to return per page. Default size: 100 | |
Sets sorting for the query. | |
Sets status of automation results for the query. | |
Sets type of the automation for the query. | |
This filter gets automations if either author or recipient of the automation is the provided user. |
Method details
IAutomationsQuery.query()method
Starts the automations query.
query(): Promise<IAutomationsQueryResult>;
Returns
Promise<IAutomationsQueryResult>
promise of first page of the results
IAutomationsQuery.queryAll()method
Starts the automations query.
queryAll(): Promise<IAutomationMetadataObject[]>;
Returns
Promise<IAutomationMetadataObject[]>
promise with a list of all automations matching the specified options
IAutomationsQuery.withAuthor()method
Sets author of the automation for the query.
withAuthor(author: string | undefined, filterType?: AutomationFilterType): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
author | string | undefined | author of the automation |
filterType | (Optional) type of filter behavior (“exact”, “include”, “exclude”) |
Returns
automations query
IAutomationsQuery.withDashboard()method
Sets dashboard id for the query.
withDashboard(dashboard: string | undefined, filterType?: AutomationFilterType): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
dashboard | string | undefined | dashboard id |
filterType | (Optional) type of filter behavior (“exact”, “include”, “exclude”) |
Returns
automations query
IAutomationsQuery.withExternalRecipient()method
Sets external recipient of the automation for the query.
withExternalRecipient(externalRecipient: string | undefined): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
externalRecipient | string | undefined | external recipient of the automation |
Returns
automations query
IAutomationsQuery.withFilter()method
Sets filter for the query.
withFilter(filter: {
title?: string;
}): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
filter | { title?: string; } | filter to apply |
Returns
automations query
IAutomationsQuery.withPage()method
Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0
withPage(page: number | undefined): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
page | number | undefined | zero indexed, must be non-negative |
Returns
automations query
IAutomationsQuery.withRecipient()method
Sets recipient of the automation for the query.
withRecipient(recipient: string | undefined, filterType?: AutomationFilterType): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
recipient | string | undefined | recipient of the automation |
filterType | (Optional) type of filter behavior (“exact”, “include”, “exclude”) |
Returns
automations query
IAutomationsQuery.withSize()method
Sets number of automations to return per page. Default size: 100
withSize(size: number | undefined): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
size | number | undefined | desired max number of automations per page must be a positive number |
Returns
automations query
IAutomationsQuery.withSorting()method
Sets sorting for the query.
withSorting(sort: string[]): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
sort | string[] | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
Returns
automations query
IAutomationsQuery.withStatus()method
Sets status of automation results for the query.
withStatus(status: string | undefined, filterType?: AutomationFilterType): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
status | string | undefined | status of the automation result (“SUCCESS” or “FAILED”) |
filterType | (Optional) type of filter behavior (“exact”, “include”, “exclude”) |
Returns
automations query
IAutomationsQuery.withType()method
Sets type of the automation for the query.
withType(type: AutomationType | undefined): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
type | AutomationType | undefined | type of the automation, e.g. “schedule” or “trigger” |
Returns
automations query
IAutomationsQuery.withUser()method
This filter gets automations if either author or recipient of the automation is the provided user.
withUser(user: string): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
user | string | author or recipient of the automation |
Returns
automations query