losant_rest 1.10.1 → 1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docs/_schemas.md +26941 -15658
- data/docs/application.md +42 -0
- data/docs/applicationApiTokens.md +2 -2
- data/docs/applicationCertificateAuthorities.md +1 -1
- data/docs/applicationCertificates.md +1 -1
- data/docs/applicationKeys.md +1 -1
- data/docs/applicationTemplate.md +46 -0
- data/docs/applicationTemplates.md +77 -2
- data/docs/applications.md +1 -1
- data/docs/auditLogs.md +1 -1
- data/docs/dashboards.md +1 -1
- data/docs/dataTables.md +1 -1
- data/docs/device.md +6 -3
- data/docs/deviceRecipes.md +1 -1
- data/docs/devices.md +217 -5
- data/docs/edgeDeployments.md +1 -1
- data/docs/events.md +1 -1
- data/docs/experienceEndpoints.md +1 -0
- data/docs/experienceGroups.md +1 -1
- data/docs/experienceUsers.md +1 -1
- data/docs/experienceVersions.md +1 -1
- data/docs/experienceViews.md +1 -1
- data/docs/file.md +4 -4
- data/docs/files.md +1 -1
- data/docs/flow.md +94 -1
- data/docs/flowVersion.md +96 -1
- data/docs/flowVersions.md +2 -1
- data/docs/flows.md +4 -2
- data/docs/integrations.md +1 -1
- data/docs/me.md +0 -36
- data/docs/notebooks.md +1 -1
- data/docs/orgs.md +1 -1
- data/docs/webhooks.md +1 -1
- data/lib/losant_rest.rb +1 -0
- data/lib/losant_rest/application.rb +48 -0
- data/lib/losant_rest/application_api_tokens.rb +1 -1
- data/lib/losant_rest/application_template.rb +79 -0
- data/lib/losant_rest/application_templates.rb +89 -1
- data/lib/losant_rest/client.rb +6 -2
- data/lib/losant_rest/device.rb +9 -3
- data/lib/losant_rest/devices.rb +255 -3
- data/lib/losant_rest/experience_endpoints.rb +2 -0
- data/lib/losant_rest/file.rb +3 -3
- data/lib/losant_rest/flow.rb +115 -1
- data/lib/losant_rest/flow_version.rb +115 -1
- data/lib/losant_rest/flow_versions.rb +3 -0
- data/lib/losant_rest/flows.rb +6 -0
- data/lib/losant_rest/me.rb +0 -41
- data/lib/losant_rest/version.rb +1 -1
- data/schemas/advancedDeviceQuery.json +110 -0
- data/schemas/advancedEventQuery.json +198 -0
- data/schemas/advancedFlowByVersionQuery.json +665 -0
- data/schemas/advancedFlowQuery.json +665 -0
- data/schemas/advancedFlowVersionQuery.json +707 -0
- data/schemas/advancedQuery.json +22 -0
- data/schemas/application.json +8 -0
- data/schemas/applicationApiTokenPost.json +11 -1
- data/schemas/applicationApplyTemplatePatch.json +19 -0
- data/schemas/applicationCreationByTemplateResult.json +8 -0
- data/schemas/applicationPost.json +8 -0
- data/schemas/applicationTemplate.json +20 -0
- data/schemas/applicationTemplateCategories.json +43 -0
- data/schemas/applicationTemplateCategory.json +23 -0
- data/schemas/applicationTemplates.json +32 -0
- data/schemas/applications.json +8 -0
- data/schemas/attributeNamesResponse.json +14 -0
- data/schemas/authedUser.json +3 -0
- data/schemas/changePassword.json +2 -2
- data/schemas/dashboard.json +175 -25
- data/schemas/dashboardPatch.json +175 -25
- data/schemas/dashboardPost.json +175 -25
- data/schemas/dashboards.json +175 -25
- data/schemas/dataExport.json +142 -0
- data/schemas/dataTableRowsExport.json +22 -0
- data/schemas/deviceAttributeDataTypeFilter.json +29 -0
- data/schemas/deviceClassFilter.json +1 -2
- data/schemas/devicesDataRemoved.json +12 -0
- data/schemas/devicesDeletePost.json +1034 -0
- data/schemas/devicesDeleted.json +12 -0
- data/schemas/devicesExportPost.json +1035 -0
- data/schemas/devicesPatch.json +1757 -4
- data/schemas/devicesRemoveDataPost.json +1056 -0
- data/schemas/devicesUpdated.json +18 -0
- data/schemas/eventPost.json +22 -0
- data/schemas/eventsExport.json +198 -0
- data/schemas/experienceDomain.json +1 -1
- data/schemas/experienceDomainPatch.json +1 -1
- data/schemas/experienceDomainPost.json +1 -1
- data/schemas/experienceDomains.json +1 -1
- data/schemas/experienceLinkedResources.json +96 -0
- data/schemas/experienceVersion.json +10 -1
- data/schemas/experienceVersionPatch.json +9 -0
- data/schemas/experienceVersions.json +10 -1
- data/schemas/flow.json +32 -0
- data/schemas/flowErrors.json +87 -0
- data/schemas/flowPatch.json +32 -0
- data/schemas/flowPost.json +32 -0
- data/schemas/flowStats.json +54 -0
- data/schemas/flowVersion.json +64 -0
- data/schemas/flowVersionPost.json +32 -0
- data/schemas/flowVersions.json +64 -0
- data/schemas/flows.json +32 -0
- data/schemas/flowsImportPost.json +64 -0
- data/schemas/flowsImportResult.json +96 -0
- data/schemas/githubLogin.json +17 -4
- data/schemas/integration.json +3 -0
- data/schemas/integrationPatch.json +3 -0
- data/schemas/integrationPost.json +3 -0
- data/schemas/integrations.json +3 -0
- data/schemas/me.json +3 -3
- data/schemas/mePatch.json +2 -2
- data/schemas/multiDeviceCommand.json +1019 -0
- data/schemas/notebook.json +96 -0
- data/schemas/notebookExecutionLogs.json +7 -0
- data/schemas/notebookPatch.json +96 -0
- data/schemas/notebookPost.json +96 -0
- data/schemas/notebooks.json +96 -0
- data/schemas/org.json +1 -1
- data/schemas/orgInviteInfo.json +3 -0
- data/schemas/orgInvitePost.json +3 -0
- data/schemas/orgInvites.json +3 -0
- data/schemas/orgPatch.json +1 -1
- data/schemas/orgs.json +1 -1
- data/schemas/passwordResetFinish.json +2 -2
- data/schemas/samlResponse.json +1 -1
- data/schemas/tagKeysResponse.json +14 -0
- data/schemas/tagValuesResponse.json +19 -0
- data/schemas/templateKeywords.json +14 -0
- data/schemas/timeSeriesData.json +12 -2
- data/schemas/timeSeriesQuery.json +94 -14
- data/schemas/userCredentials.json +15 -3
- data/schemas/userPost.json +23 -7
- metadata +27 -6
data/docs/application.md
CHANGED
@@ -6,6 +6,7 @@ parameters and the potential responses.
|
|
6
6
|
|
7
7
|
##### Contents
|
8
8
|
|
9
|
+
* [Apply Template](#apply-template)
|
9
10
|
* [Archive Data](#archive-data)
|
10
11
|
* [Backfill Archive Data](#backfill-archive-data)
|
11
12
|
* [Clone](#clone)
|
@@ -24,6 +25,47 @@ parameters and the potential responses.
|
|
24
25
|
|
25
26
|
<br/>
|
26
27
|
|
28
|
+
## Apply Template
|
29
|
+
|
30
|
+
Add resources to an application via an application template
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
result = client.application.apply_template(
|
34
|
+
applicationId: my_application_id,
|
35
|
+
options: my_options)
|
36
|
+
|
37
|
+
puts result
|
38
|
+
```
|
39
|
+
|
40
|
+
#### Authentication
|
41
|
+
The client must be configured with a valid api access token to call this
|
42
|
+
action. The token must include at least one of the following scopes:
|
43
|
+
all.Application, all.Organization, all.User, application.*, or application.applyTemplate.
|
44
|
+
|
45
|
+
#### Available Parameters
|
46
|
+
|
47
|
+
| Name | Type | Required | Description | Default | Example |
|
48
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
49
|
+
| applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
|
50
|
+
| options | [Application Apply Template Patch Schema](_schemas.md#application-apply-template-patch-schema) | Y | Object containing template import options | | [Application Apply Template Patch Schema Example](_schemas.md#application-apply-template-patch-schema-example) |
|
51
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
52
|
+
|
53
|
+
#### Successful Responses
|
54
|
+
|
55
|
+
| Code | Type | Description |
|
56
|
+
| ---- | ---- | ----------- |
|
57
|
+
| 200 | [Application](_schemas.md#application) | Updated application information |
|
58
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If a job was enqueued for the resources to be imported into the application |
|
59
|
+
|
60
|
+
#### Error Responses
|
61
|
+
|
62
|
+
| Code | Type | Description |
|
63
|
+
| ---- | ---- | ----------- |
|
64
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
65
|
+
| 404 | [Error](_schemas.md#error) | Error if application is not found |
|
66
|
+
|
67
|
+
<br/>
|
68
|
+
|
27
69
|
## Archive Data
|
28
70
|
|
29
71
|
Returns success when a job has been enqueued to archive this application's device data for a given day
|
@@ -31,10 +31,10 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
31
31
|
| Name | Type | Required | Description | Default | Example |
|
32
32
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
33
33
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
34
|
-
| sortField | string | N | Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated | name | name |
|
34
|
+
| sortField | string | N | Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated, expirationDate | name | name |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, status | | key |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*token |
|
40
40
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
34
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated | name | name |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, status | | name |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | the*name |
|
40
40
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
34
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: certificateInfo.commonName, status, id, creationDate, lastUpdated | certificateInfo.commonName | status |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: certificateInfo.commonName, status | | status |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | the*status |
|
40
40
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
data/docs/applicationKeys.md
CHANGED
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
34
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: key, status, id, creationDate, lastUpdated | name | name |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: key, status | | key |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | the*key |
|
40
40
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Application Template Actions
|
2
|
+
|
3
|
+
Details on the various actions that can be performed on the
|
4
|
+
Application Template resource, including the expected
|
5
|
+
parameters and the potential responses.
|
6
|
+
|
7
|
+
##### Contents
|
8
|
+
|
9
|
+
* [Get](#get)
|
10
|
+
|
11
|
+
<br/>
|
12
|
+
|
13
|
+
## Get
|
14
|
+
|
15
|
+
Retrieves information on an application template
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
result = client.application_template.get(templateId: my_template_id)
|
19
|
+
|
20
|
+
puts result
|
21
|
+
```
|
22
|
+
|
23
|
+
#### Authentication
|
24
|
+
The client must be configured with a valid api access token to call this
|
25
|
+
action. The token must include at least one of the following scopes:
|
26
|
+
all.User, all.User.read, applicationTemplate.*, or applicationTemplate.get.
|
27
|
+
|
28
|
+
#### Available Parameters
|
29
|
+
|
30
|
+
| Name | Type | Required | Description | Default | Example |
|
31
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
32
|
+
| templateId | string | Y | ID associated with the template | | 575ed0de7ae143cd83dc4aa5 |
|
33
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
34
|
+
|
35
|
+
#### Successful Responses
|
36
|
+
|
37
|
+
| Code | Type | Description |
|
38
|
+
| ---- | ---- | ----------- |
|
39
|
+
| 200 | [Application Template](_schemas.md#application-template) | Application template information |
|
40
|
+
|
41
|
+
#### Error Responses
|
42
|
+
|
43
|
+
| Code | Type | Description |
|
44
|
+
| ---- | ---- | ----------- |
|
45
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
46
|
+
| 404 | [Error](_schemas.md#error) | Error if template was not found |
|
@@ -7,6 +7,8 @@ parameters and the potential responses.
|
|
7
7
|
##### Contents
|
8
8
|
|
9
9
|
* [Get](#get)
|
10
|
+
* [Get Categories](#get-categories)
|
11
|
+
* [Get Unique Keywords](#get-unique-keywords)
|
10
12
|
|
11
13
|
<br/>
|
12
14
|
|
@@ -32,9 +34,11 @@ all.User, all.User.read, applicationTemplates.*, or applicationTemplates.get.
|
|
32
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
|
33
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
34
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
35
|
-
| perPage | string | N | How many items to return per page |
|
36
|
-
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
|
+
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, authorName | | name |
|
37
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * app |
|
40
|
+
| keywords | array | N | List of keywords to filter by. Matches all provided keywords. | | [ 'gps', 'aws' ] |
|
41
|
+
| categoryId | string | N | ID of a category to filter by. | | 575ec76c7ae143cd83dc4a96 |
|
38
42
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
39
43
|
|
40
44
|
#### Successful Responses
|
@@ -48,3 +52,74 @@ all.User, all.User.read, applicationTemplates.*, or applicationTemplates.get.
|
|
48
52
|
| Code | Type | Description |
|
49
53
|
| ---- | ---- | ----------- |
|
50
54
|
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
55
|
+
|
56
|
+
<br/>
|
57
|
+
|
58
|
+
## Get Categories
|
59
|
+
|
60
|
+
Returns a category list, beginning at the specified category
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
result = client.application_templates.get_categories(optional_params)
|
64
|
+
|
65
|
+
puts result
|
66
|
+
```
|
67
|
+
|
68
|
+
#### Authentication
|
69
|
+
The client must be configured with a valid api access token to call this
|
70
|
+
action. The token must include at least one of the following scopes:
|
71
|
+
all.User, all.User.read, applicationTemplates.*, or applicationTemplates.getCategories.
|
72
|
+
|
73
|
+
#### Available Parameters
|
74
|
+
|
75
|
+
| Name | Type | Required | Description | Default | Example |
|
76
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
77
|
+
| baseId | string | N | ID of the category to begin from | | 575ed6e87ae143cd83dc4aa8 |
|
78
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
79
|
+
|
80
|
+
#### Successful Responses
|
81
|
+
|
82
|
+
| Code | Type | Description |
|
83
|
+
| ---- | ---- | ----------- |
|
84
|
+
| 200 | [Application Template Categories](_schemas.md#application-template-categories) | Collection of application categories |
|
85
|
+
|
86
|
+
#### Error Responses
|
87
|
+
|
88
|
+
| Code | Type | Description |
|
89
|
+
| ---- | ---- | ----------- |
|
90
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
91
|
+
|
92
|
+
<br/>
|
93
|
+
|
94
|
+
## Get Unique Keywords
|
95
|
+
|
96
|
+
Returns an array of all unique keywords currently in use by templates
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
result = client.application_templates.get_unique_keywords(optional_params)
|
100
|
+
|
101
|
+
puts result
|
102
|
+
```
|
103
|
+
|
104
|
+
#### Authentication
|
105
|
+
The client must be configured with a valid api access token to call this
|
106
|
+
action. The token must include at least one of the following scopes:
|
107
|
+
all.User, all.User.read, applicationTemplates.*, or applicationTemplates.getUniqueKeywords.
|
108
|
+
|
109
|
+
#### Available Parameters
|
110
|
+
|
111
|
+
| Name | Type | Required | Description | Default | Example |
|
112
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
113
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
114
|
+
|
115
|
+
#### Successful Responses
|
116
|
+
|
117
|
+
| Code | Type | Description |
|
118
|
+
| ---- | ---- | ----------- |
|
119
|
+
| 200 | [Template Keywords](_schemas.md#template-keywords) | Array of all unique template keywords |
|
120
|
+
|
121
|
+
#### Error Responses
|
122
|
+
|
123
|
+
| Code | Type | Description |
|
124
|
+
| ---- | ---- | ----------- |
|
125
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
data/docs/applications.md
CHANGED
@@ -34,7 +34,7 @@ all.Organization, all.Organization.read, all.User, all.User.read, applications.*
|
|
34
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, ownerId, lastUpdated | name | name |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * app |
|
40
40
|
| orgId | string | N | If not provided, return all applications. If provided but blank, only return applications belonging to the current user. If provided and an id, only return applications belonging to the given organization id. | | 575ecdf07ae143cd83dc4a9a |
|
data/docs/auditLogs.md
CHANGED
@@ -33,7 +33,7 @@ all.Organization, all.Organization.read, all.User, all.User.read, auditLogs.*, o
|
|
33
33
|
| sortField | string | N | Field to sort the results by. Accepted values are: creationDate, responseStatus, actorName | creationDate | creationDate |
|
34
34
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | desc | asc |
|
35
35
|
| page | string | N | Which page of results to return | 0 | 0 |
|
36
|
-
| perPage | string | N | How many items to return per page |
|
36
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
37
37
|
| start | string | N | Start of time range for audit log query | | 1465790400000 |
|
38
38
|
| end | string | N | End of time range for audit log query | | 1465790400000 |
|
39
39
|
| auditLogFilter | [Audit Log Filter](_schemas.md#audit-log-filter) | N | Filters for the audit log query | | [Audit Log Filter Example](_schemas.md#audit-log-filter-example) |
|
data/docs/dashboards.md
CHANGED
@@ -33,7 +33,7 @@ all.Organization, all.Organization.read, all.User, all.User.read, dashboards.*,
|
|
33
33
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, ownerId, applicationId | name | name |
|
34
34
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
35
35
|
| page | string | N | Which page of results to return | 0 | 0 |
|
36
|
-
| perPage | string | N | How many items to return per page |
|
36
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
37
37
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
38
38
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * dashboard |
|
39
39
|
| applicationId | string | N | If not provided, return all dashboards. If provided but blank, only return dashboards that are not linked to applications. If provided and an id, only return dashboards linked to the given application id. | | 575ec8687ae143cd83dc4a97 |
|
data/docs/dataTables.md
CHANGED
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
34
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*table |
|
40
40
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
data/docs/device.md
CHANGED
@@ -170,8 +170,9 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
|
|
170
170
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
171
171
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
172
172
|
| deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
|
173
|
-
| limit | string | N |
|
173
|
+
| limit | string | N | Maximum number of command entries to return | 1 | 10 |
|
174
174
|
| since | string | N | Look for command entries since this time (ms since epoch) | | 1465790400000 |
|
175
|
+
| sortDirection | string | N | Direction to sort the command entries (by time). Accepted values are: asc, desc | desc | desc |
|
175
176
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
176
177
|
|
177
178
|
#### Successful Responses
|
@@ -255,8 +256,9 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
|
|
255
256
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
256
257
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
257
258
|
| deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
|
258
|
-
| limit | string | N |
|
259
|
+
| limit | string | N | Maximum number of log entries to return | 1 | 10 |
|
259
260
|
| since | string | N | Look for log entries since this time (ms since epoch) | | 1465790400000 |
|
261
|
+
| sortDirection | string | N | Direction to sort the log entries (by time). Accepted values are: asc, desc | desc | desc |
|
260
262
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
261
263
|
|
262
264
|
#### Successful Responses
|
@@ -297,8 +299,9 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
|
|
297
299
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
298
300
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
299
301
|
| deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
|
300
|
-
| limit | string | N |
|
302
|
+
| limit | string | N | Maximum number of state entries to return | 1 | 10 |
|
301
303
|
| since | string | N | Look for state entries since this time (ms since epoch) | | 1465790400000 |
|
304
|
+
| sortDirection | string | N | Direction to sort the state entries (by time). Accepted values are: asc, desc | desc | desc |
|
302
305
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
303
306
|
|
304
307
|
#### Successful Responses
|
data/docs/deviceRecipes.md
CHANGED
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
34
34
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
37
|
-
| perPage | string | N | How many items to return per page |
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
38
38
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
39
39
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * recipe |
|
40
40
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
data/docs/devices.md
CHANGED
@@ -6,11 +6,97 @@ parameters and the potential responses.
|
|
6
6
|
|
7
7
|
##### Contents
|
8
8
|
|
9
|
+
* [Attribute Names](#attribute-names)
|
10
|
+
* [Delete](#delete)
|
9
11
|
* [Export](#export)
|
10
12
|
* [Get](#get)
|
11
13
|
* [Patch](#patch)
|
12
14
|
* [Post](#post)
|
15
|
+
* [Remove Data](#remove-data)
|
13
16
|
* [Send Command](#send-command)
|
17
|
+
* [Tag Keys](#tag-keys)
|
18
|
+
* [Tag Values](#tag-values)
|
19
|
+
|
20
|
+
<br/>
|
21
|
+
|
22
|
+
## Attribute Names
|
23
|
+
|
24
|
+
Gets the attribute names that match the given query. Maximum 1K returned.
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
result = client.devices.attribute_names(applicationId: my_application_id)
|
28
|
+
|
29
|
+
puts result
|
30
|
+
```
|
31
|
+
|
32
|
+
#### Authentication
|
33
|
+
The client must be configured with a valid api access token to call this
|
34
|
+
action. The token must include at least one of the following scopes:
|
35
|
+
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, devices.*, or devices.attributeNames.
|
36
|
+
|
37
|
+
#### Available Parameters
|
38
|
+
|
39
|
+
| Name | Type | Required | Description | Default | Example |
|
40
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
41
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
42
|
+
| query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
|
43
|
+
| dataType | [Device Attribute Data Type Filter](_schemas.md#device-attribute-data-type-filter) | N | Filter the devices by the given attribute data type or types | | [Device Attribute Data Type Filter Example](_schemas.md#device-attribute-data-type-filter-example) |
|
44
|
+
| startsWith | string | N | Filter attributes down to those that have names starting with the given string. Case insensitive. | | temper |
|
45
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
46
|
+
|
47
|
+
#### Successful Responses
|
48
|
+
|
49
|
+
| Code | Type | Description |
|
50
|
+
| ---- | ---- | ----------- |
|
51
|
+
| 200 | [Attribute Names Response](_schemas.md#attribute-names-response) | The matching attribute names |
|
52
|
+
|
53
|
+
#### Error Responses
|
54
|
+
|
55
|
+
| Code | Type | Description |
|
56
|
+
| ---- | ---- | ----------- |
|
57
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
58
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
59
|
+
|
60
|
+
<br/>
|
61
|
+
|
62
|
+
## Delete
|
63
|
+
|
64
|
+
Delete devices
|
65
|
+
|
66
|
+
```ruby
|
67
|
+
result = client.devices.delete(
|
68
|
+
applicationId: my_application_id,
|
69
|
+
options: my_options)
|
70
|
+
|
71
|
+
puts result
|
72
|
+
```
|
73
|
+
|
74
|
+
#### Authentication
|
75
|
+
The client must be configured with a valid api access token to call this
|
76
|
+
action. The token must include at least one of the following scopes:
|
77
|
+
all.Application, all.Organization, all.User, devices.*, or devices.delete.
|
78
|
+
|
79
|
+
#### Available Parameters
|
80
|
+
|
81
|
+
| Name | Type | Required | Description | Default | Example |
|
82
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
83
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
84
|
+
| options | [Devices Delete Post](_schemas.md#devices-delete-post) | Y | Object containing device query and email | | [Devices Delete Post Example](_schemas.md#devices-delete-post-example) |
|
85
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
86
|
+
|
87
|
+
#### Successful Responses
|
88
|
+
|
89
|
+
| Code | Type | Description |
|
90
|
+
| ---- | ---- | ----------- |
|
91
|
+
| 200 | [Devices Deleted](_schemas.md#devices-deleted) | Object indicating number of devices deleted or failed |
|
92
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If a job was enqueued for the devices to be deleted |
|
93
|
+
|
94
|
+
#### Error Responses
|
95
|
+
|
96
|
+
| Code | Type | Description |
|
97
|
+
| ---- | ---- | ----------- |
|
98
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
99
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
14
100
|
|
15
101
|
<br/>
|
16
102
|
|
@@ -36,6 +122,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
36
122
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
37
123
|
| email | string | N | Email address to send export to. Defaults to current user's email. | | email@example.com |
|
38
124
|
| callbackUrl | string | N | Callback URL to call with export result | | https://example.com/cburl |
|
125
|
+
| options | [Devices Metadata Export Post](_schemas.md#devices-metadata-export-post) | N | Object containing device query and optionally email or callback | | [Devices Metadata Export Post Example](_schemas.md#devices-metadata-export-post-example) |
|
39
126
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
40
127
|
|
41
128
|
#### Successful Responses
|
@@ -76,14 +163,14 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
|
|
76
163
|
| sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
|
77
164
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
78
165
|
| page | string | N | Which page of results to return | 0 | 0 |
|
79
|
-
| perPage | string | N | How many items to return per page |
|
166
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
80
167
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
81
168
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * device |
|
82
169
|
| deviceClass | [Device Class Filter](_schemas.md#device-class-filter) | N | Filter the devices by the given device class or classes | | [Device Class Filter Example](_schemas.md#device-class-filter-example) |
|
83
170
|
| tagFilter | [Device Tag Filter](_schemas.md#device-tag-filter) | N | Array of tag pairs to filter by | | [Device Tag Filter Example](_schemas.md#device-tag-filter-example) |
|
84
171
|
| excludeConnectionInfo | string | N | If set, do not return connection info | | true |
|
85
172
|
| parentId | string | N | Filter devices as children of a given system id | | 575ecf887ae143cd83dc4aa2 |
|
86
|
-
| query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object which
|
173
|
+
| query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object which overrides the filterField, filter, deviceClass, tagFilter, and parentId parameters. | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
|
87
174
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
88
175
|
|
89
176
|
#### Successful Responses
|
@@ -106,7 +193,9 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
|
|
106
193
|
Update the fields of one or more devices
|
107
194
|
|
108
195
|
```ruby
|
109
|
-
result = client.devices.patch(
|
196
|
+
result = client.devices.patch(
|
197
|
+
applicationId: my_application_id,
|
198
|
+
patchInfo: my_patch_info)
|
110
199
|
|
111
200
|
puts result
|
112
201
|
```
|
@@ -121,14 +210,15 @@ all.Application, all.Organization, all.User, devices.*, or devices.patch.
|
|
121
210
|
| Name | Type | Required | Description | Default | Example |
|
122
211
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
123
212
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
124
|
-
| patchInfo | [Devices Patch](_schemas.md#devices-patch) |
|
213
|
+
| patchInfo | [Devices Patch](_schemas.md#devices-patch) | Y | Object containing device query or IDs and update operations | | [Devices Patch Example](_schemas.md#devices-patch-example) |
|
125
214
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
126
215
|
|
127
216
|
#### Successful Responses
|
128
217
|
|
129
218
|
| Code | Type | Description |
|
130
219
|
| ---- | ---- | ----------- |
|
131
|
-
|
|
220
|
+
| 200 | [Devices Updated](_schemas.md#devices-updated) | Object including an update log link and the number of devices updated, failed, and skipped |
|
221
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | Successfully queued bulk update job |
|
132
222
|
|
133
223
|
#### Error Responses
|
134
224
|
|
@@ -179,6 +269,47 @@ all.Application, all.Organization, all.User, devices.*, or devices.post.
|
|
179
269
|
|
180
270
|
<br/>
|
181
271
|
|
272
|
+
## Remove Data
|
273
|
+
|
274
|
+
Removes all device data for the specified time range. Defaults to all data.
|
275
|
+
|
276
|
+
```ruby
|
277
|
+
result = client.devices.remove_data(
|
278
|
+
applicationId: my_application_id,
|
279
|
+
options: my_options)
|
280
|
+
|
281
|
+
puts result
|
282
|
+
```
|
283
|
+
|
284
|
+
#### Authentication
|
285
|
+
The client must be configured with a valid api access token to call this
|
286
|
+
action. The token must include at least one of the following scopes:
|
287
|
+
all.Application, all.Organization, all.User, devices.*, or devices.removeData.
|
288
|
+
|
289
|
+
#### Available Parameters
|
290
|
+
|
291
|
+
| Name | Type | Required | Description | Default | Example |
|
292
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
293
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
294
|
+
| options | [Devices Remove Data Post](_schemas.md#devices-remove-data-post) | Y | Object defining the device data to delete and devices to delete from | | [Devices Remove Data Post Example](_schemas.md#devices-remove-data-post-example) |
|
295
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
296
|
+
|
297
|
+
#### Successful Responses
|
298
|
+
|
299
|
+
| Code | Type | Description |
|
300
|
+
| ---- | ---- | ----------- |
|
301
|
+
| 200 | [Devices Data Removed](_schemas.md#devices-data-removed) | Object indicating number of devices completed or skipped |
|
302
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If a job was enqueued for device data to be removed |
|
303
|
+
|
304
|
+
#### Error Responses
|
305
|
+
|
306
|
+
| Code | Type | Description |
|
307
|
+
| ---- | ---- | ----------- |
|
308
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
309
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
310
|
+
|
311
|
+
<br/>
|
312
|
+
|
182
313
|
## Send Command
|
183
314
|
|
184
315
|
Send a command to multiple devices
|
@@ -216,3 +347,84 @@ all.Application, all.Device, all.Organization, all.User, devices.*, or devices.s
|
|
216
347
|
| ---- | ---- | ----------- |
|
217
348
|
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
218
349
|
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
350
|
+
|
351
|
+
<br/>
|
352
|
+
|
353
|
+
## Tag Keys
|
354
|
+
|
355
|
+
Gets the unique tag keys for devices that match the given query. Maximum 1K returned.
|
356
|
+
|
357
|
+
```ruby
|
358
|
+
result = client.devices.tag_keys(applicationId: my_application_id)
|
359
|
+
|
360
|
+
puts result
|
361
|
+
```
|
362
|
+
|
363
|
+
#### Authentication
|
364
|
+
The client must be configured with a valid api access token to call this
|
365
|
+
action. The token must include at least one of the following scopes:
|
366
|
+
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, devices.*, or devices.tagKeys.
|
367
|
+
|
368
|
+
#### Available Parameters
|
369
|
+
|
370
|
+
| Name | Type | Required | Description | Default | Example |
|
371
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
372
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
373
|
+
| query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
|
374
|
+
| startsWith | string | N | Filter keys down to those that start with the given string. Case insensitive. | | temper |
|
375
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
376
|
+
|
377
|
+
#### Successful Responses
|
378
|
+
|
379
|
+
| Code | Type | Description |
|
380
|
+
| ---- | ---- | ----------- |
|
381
|
+
| 200 | [Tag Keys Response](_schemas.md#tag-keys-response) | The matching tag keys |
|
382
|
+
|
383
|
+
#### Error Responses
|
384
|
+
|
385
|
+
| Code | Type | Description |
|
386
|
+
| ---- | ---- | ----------- |
|
387
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
388
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
389
|
+
|
390
|
+
<br/>
|
391
|
+
|
392
|
+
## Tag Values
|
393
|
+
|
394
|
+
Gets the unique tag values for the given key for devices that match the given query. Maximum 1K returned.
|
395
|
+
|
396
|
+
```ruby
|
397
|
+
result = client.devices.tag_values(
|
398
|
+
applicationId: my_application_id,
|
399
|
+
key: my_key)
|
400
|
+
|
401
|
+
puts result
|
402
|
+
```
|
403
|
+
|
404
|
+
#### Authentication
|
405
|
+
The client must be configured with a valid api access token to call this
|
406
|
+
action. The token must include at least one of the following scopes:
|
407
|
+
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, devices.*, or devices.tagValues.
|
408
|
+
|
409
|
+
#### Available Parameters
|
410
|
+
|
411
|
+
| Name | Type | Required | Description | Default | Example |
|
412
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
413
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
414
|
+
| query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
|
415
|
+
| key | string | Y | The tag key to get the values for | | myKey |
|
416
|
+
| startsWith | string | N | Filter values down to those that start with the given string. Case insensitive. | | temper |
|
417
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
418
|
+
|
419
|
+
#### Successful Responses
|
420
|
+
|
421
|
+
| Code | Type | Description |
|
422
|
+
| ---- | ---- | ----------- |
|
423
|
+
| 200 | [Tag Values Response](_schemas.md#tag-values-response) | The matching tag values |
|
424
|
+
|
425
|
+
#### Error Responses
|
426
|
+
|
427
|
+
| Code | Type | Description |
|
428
|
+
| ---- | ---- | ----------- |
|
429
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
430
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|