# Flow Actions Details on the various actions that can be performed on the Flow resource, including the expected parameters and the potential responses. ##### Contents * [Clear Storage Entries](#clear-storage-entries) * [Delete](#delete) * [Get](#get) * [Get Log Entries](#get-log-entries) * [Get Storage Entries](#get-storage-entries) * [Patch](#patch) * [Press Virtual Button](#press-virtual-button) * [Set Storage Entry](#set-storage-entry)
## Clear Storage Entries Clear all storage entries ```ruby result = client.flow.clear_storage_entries( applicationId: my_application_id, flowId: my_flow_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, flow.*, or flow.clearStorageEntries. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Workflow Storage Entries](_schemas.md#workflow-storage-entries) | The current storage entries | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow was not found |
## Delete Deletes a flow ```ruby result = client.flow.delete( applicationId: my_application_id, flowId: my_flow_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, flow.*, or flow.delete. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Success](_schemas.md#success) | If flow was successfully deleted | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow was not found |
## Get Retrieves information on a flow ```ruby result = client.flow.get( applicationId: my_application_id, flowId: my_flow_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flow.*, or flow.get. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | includeCustomNodes | string | N | If the result of the request should also include the details of any custom nodes referenced by the returned workflows | false | true | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Workflow](_schemas.md#workflow) | Flow information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow was not found |
## Get Log Entries Retrieve the recent log entries about runs of this workflow ```ruby result = client.flow.get_log_entries( applicationId: my_application_id, flowId: my_flow_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flow.*, or flow.log. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | limit | string | N | Max log entries to return (ordered by time descending) | 1 | 10 | | since | string | N | Look for log entries since this time (ms since epoch) | | 1465790400000 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Workflow Log](_schemas.md#workflow-log) | Recent log entries | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if device was not found |
## Get Storage Entries Gets the current values in persistent storage ```ruby result = client.flow.get_storage_entries( applicationId: my_application_id, flowId: my_flow_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flow.*, or flow.getStorageEntries. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Workflow Storage Entries](_schemas.md#workflow-storage-entries) | The current storage entries | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow was not found |
## Patch Updates information about a flow ```ruby result = client.flow.patch( applicationId: my_application_id, flowId: my_flow_id, flow: my_flow) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, flow.*, or flow.patch. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | includeCustomNodes | string | N | If the result of the request should also include the details of any custom nodes referenced by the returned workflows | false | true | | flow | [Workflow Patch](_schemas.md#workflow-patch) | Y | Object containing new properties of the flow | | [Workflow Patch Example](_schemas.md#workflow-patch-example) | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Workflow](_schemas.md#workflow) | Updated flow information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow is not found |
## Press Virtual Button Presses the specified virtual button on the flow ```ruby result = client.flow.press_virtual_button( applicationId: my_application_id, flowId: my_flow_id, button: my_button) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, flow.*, or flow.pressVirtualButton. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | button | [Virtual Button Press](_schemas.md#virtual-button-press) | Y | Object containing button key and payload | | [Virtual Button Press Example](_schemas.md#virtual-button-press-example) | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Success](_schemas.md#success) | Virtual button was pressed | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow was not found |
## Set Storage Entry Sets a storage value ```ruby result = client.flow.set_storage_entry( applicationId: my_application_id, flowId: my_flow_id, entry: my_entry) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, flow.*, or flow.setStorageEntry. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 | | flowId | string | Y | ID associated with the flow | | 575ed18f7ae143cd83dc4aa6 | | entry | [Workflow Storage Entry](_schemas.md#workflow-storage-entry) | Y | Object containing storage entry | | [Workflow Storage Entry Example](_schemas.md#workflow-storage-entry-example) | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Success](_schemas.md#success) | Value was successfully stored | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if flow was not found |