docs/flow.md in losant_rest-1.10.2 vs docs/flow.md in losant_rest-1.10.3
- old
+ new
@@ -6,16 +6,18 @@
##### Contents
* [Clear Storage Entries](#clear-storage-entries)
* [Delete](#delete)
+* [Errors](#errors)
* [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)
+* [Stats](#stats)
<br/>
## Clear Storage Entries
@@ -95,10 +97,56 @@
| 400 | [Error](_schemas.md#error) | Error if malformed request |
| 404 | [Error](_schemas.md#error) | Error if flow was not found |
<br/>
+## Errors
+
+Get information about errors that occurred during runs of this workflow
+
+```ruby
+result = client.flow.errors(
+ 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.errors.
+
+#### 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 |
+| duration | string | N | Duration of time range in milliseconds | 86400000 | 86400000 |
+| end | string | N | End of time range in milliseconds since epoch | 0 | 0 |
+| limit | string | N | Maximum number of errors to return | 25 | 25 |
+| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | desc | desc |
+| flowVersion | string | N | Flow version name or ID. When not included, will be errors for all versions. Pass develop for just the develop version. | | develop |
+| deviceId | string | N | For edge workflows, the Device ID to return workflow errors for. When not included, will be errors for all device IDs. | | 575ed18f7ae143cd83dc4bb6 |
+| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
+
+#### Successful Responses
+
+| Code | Type | Description |
+| ---- | ---- | ----------- |
+| 200 | [Workflow Errors](_schemas.md#workflow-errors) | Workflow error 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 |
+
+<br/>
+
## Get
Retrieves information on a flow
```ruby
@@ -174,11 +222,11 @@
#### 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 |
+| 404 | [Error](_schemas.md#error) | Error if flow was not found |
<br/>
## Get Storage Entries
@@ -335,9 +383,54 @@
#### 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 |
+
+<br/>
+
+## Stats
+
+Get statistics about workflow runs for this workflow
+
+```ruby
+result = client.flow.stats(
+ 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.stats.
+
+#### 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 |
+| duration | string | N | Duration of time range in milliseconds | 86400000 | 86400000 |
+| end | string | N | End of time range in milliseconds since epoch | 0 | 0 |
+| resolution | string | N | Resolution in milliseconds | 3600000 | 3600000 |
+| flowVersion | string | N | Flow version name or ID. When not included, will be aggregate for all versions. Pass develop for just the develop version. | | develop |
+| deviceId | string | N | For edge workflows, the device ID to return workflow stats for. When not included, will be aggregate for all device IDs. | | 575ed18f7ae143cd83dc4bb6 |
+| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
+
+#### Successful Responses
+
+| Code | Type | Description |
+| ---- | ---- | ----------- |
+| 200 | [Workflow Statistics](_schemas.md#workflow-statistics) | Statistics for workflow runs |
#### Error Responses
| Code | Type | Description |
| ---- | ---- | ----------- |