IWorkspaceAutomationService
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
This service provides access to workspace automations.
export interface IWorkspaceAutomationService
Methods
Method | Description |
|---|---|
createAutomation(automation, options, widgetExecution, overrides) | (ALPHA) Create new automation |
(ALPHA) Delete automation | |
(ALPHA) Delete automations Deletes multiple automations identified by their IDs. | |
(ALPHA) Get atuomation by id | |
(ALPHA) Get all automations | |
(ALPHA) List automations | |
(ALPHA) Pause automation | |
(ALPHA) Pause automations Pauses multiple automations identified by their IDs. | |
(ALPHA) Resume automation | |
(ALPHA) Resume automations Resumes multiple automations identified by their IDs. | |
(ALPHA) Trigger existing automation Triggers the existing automation to execute immediately. | |
(ALPHA) Unsubscribe automation | |
(ALPHA) Unsubscribe from automations Unsubscribes current user from multiple automations identified by their IDs. If no IDs are provided, the backend may unsubscribe from all automations in the workspace. | |
updateAutomation(automation, options, widgetExecution, overrides) | (ALPHA) Update existing automation |
Method details
IWorkspaceAutomationService.createAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Create new automation
createAutomation(automation: IAutomationMetadataObjectDefinition, options?: IGetAutomationOptions, widgetExecution?: IExecutionDefinition, overrides?: IRawExportCustomOverrides): Promise<IAutomationMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
automation | definition of the automation | |
options | (Optional) specify additional options | |
widgetExecution | (Optional) execution definition for widget exports | |
overrides | (Optional) custom overrides for widget exports |
Returns
Promise<IAutomationMetadataObject>
Promise resolved with created automation.
IWorkspaceAutomationService.deleteAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Delete automation
deleteAutomation(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | id of the automation |
Returns
Promise<void>
Promise resolved when the automation is deleted.
IWorkspaceAutomationService.deleteAutomations()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Delete automations
Deletes multiple automations identified by their IDs.
deleteAutomations(ids: string[]): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ids | string[] | IDs of the automations to delete |
Returns
Promise<void>
Promise resolved when the automations are deleted.
IWorkspaceAutomationService.getAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Get atuomation by id
getAutomation(id: string, options?: IGetAutomationOptions): Promise<IAutomationMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | id of the automation |
options | (Optional) specify additional options |
Returns
Promise<IAutomationMetadataObject>
Promise resolved with automation definition
IWorkspaceAutomationService.getAutomations()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Get all automations
getAutomations(options?: IGetAutomationsOptions): Promise<IAutomationMetadataObject[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
options | (Optional) specify additional options |
Returns
Promise<IAutomationMetadataObject[]>
Promise resolved with array of automations.
Exceptions
In case of error.
IWorkspaceAutomationService.getAutomationsQuery()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
List automations
getAutomationsQuery(options?: IGetAutomationsQueryOptions): IAutomationsQuery;
Parameters
Parameter | Type | Description |
|---|---|---|
options | (Optional) specify additional options |
Returns
methods for querying automations
IWorkspaceAutomationService.pauseAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Pause automation
pauseAutomation(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | id of the automation |
Returns
Promise<void>
Promise resolved when the automation is paused.
IWorkspaceAutomationService.pauseAutomations()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Pause automations
Pauses multiple automations identified by their IDs.
pauseAutomations(ids: string[]): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ids | string[] | IDs of the automations to pause |
Returns
Promise<void>
Promise resolved when the automations are paused.
IWorkspaceAutomationService.resumeAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Resume automation
resumeAutomation(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | id of the automation |
Returns
Promise<void>
Promise resolved when the automation is resumed.
IWorkspaceAutomationService.resumeAutomations()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Resume automations
Resumes multiple automations identified by their IDs.
resumeAutomations(ids: string[]): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ids | string[] | IDs of the automations to resume |
Returns
Promise<void>
Promise resolved when the automations are resumed.
IWorkspaceAutomationService.triggerAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Trigger existing automation
Triggers the existing automation to execute immediately.
triggerAutomation(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | id of the automation |
Returns
Promise<void>
Promise resolved when the automation is triggered.
IWorkspaceAutomationService.unsubscribeAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Unsubscribe automation
unsubscribeAutomation(id: string): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | id of the automation |
Returns
Promise<void>
Promise resolved when the automation is unsubscribed.
IWorkspaceAutomationService.unsubscribeAutomations()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Unsubscribe from automations
Unsubscribes current user from multiple automations identified by their IDs. If no IDs are provided, the backend may unsubscribe from all automations in the workspace.
unsubscribeAutomations(ids: string[]): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ids | string[] | IDs of the automations to unsubscribe from |
Returns
Promise<void>
Promise resolved when the user is unsubscribed.
IWorkspaceAutomationService.updateAutomation()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Update existing automation
updateAutomation(automation: IAutomationMetadataObject, options?: IGetAutomationOptions, widgetExecution?: IExecutionDefinition, overrides?: IRawExportCustomOverrides): Promise<IAutomationMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
automation | definition of the automation | |
options | (Optional) specify additional options | |
widgetExecution | (Optional) execution definition for widget exports | |
overrides | (Optional) custom overrides for widget exports |
Returns
Promise<IAutomationMetadataObject>
Promise resolved when the automation is updated.