losant_rest 1.0.8 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +3 -2
- data/README.md +19 -8
- data/docs/_schemas.md +210 -184
- data/docs/application.md +20 -0
- data/docs/applicationApiToken.md +130 -0
- data/docs/applicationApiTokens.md +83 -0
- data/docs/applicationKey.md +15 -0
- data/docs/applicationKeys.md +10 -0
- data/docs/applications.md +10 -0
- data/docs/auditLog.md +5 -0
- data/docs/auditLogs.md +5 -0
- data/docs/auth.md +20 -8
- data/docs/dashboard.md +13 -0
- data/docs/dashboards.md +10 -0
- data/docs/data.md +10 -0
- data/docs/device.md +55 -0
- data/docs/deviceRecipe.md +20 -0
- data/docs/deviceRecipes.md +10 -0
- data/docs/devices.md +20 -0
- data/docs/event.md +15 -0
- data/docs/events.md +20 -0
- data/docs/flow.md +35 -0
- data/docs/flows.md +10 -0
- data/docs/me.md +61 -0
- data/docs/org.md +51 -0
- data/docs/orgInvites.md +6 -0
- data/docs/orgs.md +11 -0
- data/docs/solution.md +15 -0
- data/docs/solutionUser.md +15 -0
- data/docs/solutionUsers.md +10 -0
- data/docs/solutions.md +10 -0
- data/docs/webhook.md +15 -0
- data/docs/webhooks.md +10 -0
- data/lib/losant_rest.rb +2 -2
- data/lib/losant_rest/application.rb +24 -0
- data/lib/losant_rest/{access_token.rb → application_api_token.rb} +47 -23
- data/lib/losant_rest/{access_tokens.rb → application_api_tokens.rb} +27 -11
- data/lib/losant_rest/application_key.rb +18 -0
- data/lib/losant_rest/application_keys.rb +12 -0
- data/lib/losant_rest/applications.rb +12 -0
- data/lib/losant_rest/audit_log.rb +6 -0
- data/lib/losant_rest/audit_logs.rb +6 -0
- data/lib/losant_rest/auth.rb +20 -8
- data/lib/losant_rest/client.rb +8 -8
- data/lib/losant_rest/dashboard.rb +15 -0
- data/lib/losant_rest/dashboards.rb +12 -0
- data/lib/losant_rest/data.rb +12 -0
- data/lib/losant_rest/device.rb +66 -0
- data/lib/losant_rest/device_recipe.rb +24 -0
- data/lib/losant_rest/device_recipes.rb +12 -0
- data/lib/losant_rest/devices.rb +24 -0
- data/lib/losant_rest/event.rb +18 -0
- data/lib/losant_rest/events.rb +24 -0
- data/lib/losant_rest/flow.rb +42 -0
- data/lib/losant_rest/flows.rb +12 -0
- data/lib/losant_rest/me.rb +74 -0
- data/lib/losant_rest/org.rb +62 -0
- data/lib/losant_rest/org_invites.rb +6 -0
- data/lib/losant_rest/orgs.rb +14 -0
- data/lib/losant_rest/solution.rb +18 -0
- data/lib/losant_rest/solution_user.rb +18 -0
- data/lib/losant_rest/solution_users.rb +12 -0
- data/lib/losant_rest/solutions.rb +12 -0
- data/lib/losant_rest/version.rb +1 -1
- data/lib/losant_rest/webhook.rb +18 -0
- data/lib/losant_rest/webhooks.rb +12 -0
- data/losant_rest.gemspec +3 -3
- data/schemas/{accessToken.json → apiToken.json} +31 -3
- data/schemas/{accessTokenPatch.json → apiTokenPatch.json} +4 -0
- data/schemas/applicationApiTokenPost.json +116 -0
- data/schemas/auditLog.json +3 -1
- data/schemas/auditLogFilter.json +3 -1
- data/schemas/auditLogs.json +3 -1
- data/schemas/event.json +4 -2
- data/schemas/events.json +4 -2
- metadata +17 -19
- data/.rbenv-version +0 -1
- data/docs/accessToken.md +0 -107
- data/docs/accessTokens.md +0 -68
- data/schemas/accessTokenPost.json +0 -32
- data/schemas/accessTokens.json +0 -65
- data/schemas/deviceState.json +0 -31
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Returns the applications the current user has permission to see
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Organization, all.Organization.read, all.User, all.User.read, applications.*, or applications.get.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} sortField - Field to sort the results by. Accepted values are: name, id, creationDate, ownerId
|
36
42
|
# * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
|
@@ -80,6 +86,12 @@ module LosantRest
|
|
80
86
|
|
81
87
|
# Create a new application
|
82
88
|
#
|
89
|
+
# Authentication:
|
90
|
+
# The client must be configured with a valid api
|
91
|
+
# access token to call this action. The token
|
92
|
+
# must include at least one of the following scopes:
|
93
|
+
# all.Organization, all.User, applications.*, or applications.post.
|
94
|
+
#
|
83
95
|
# Parameters:
|
84
96
|
# * {hash} application - New application information (https://api.losant.com/#/definitions/applicationPost)
|
85
97
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Retrieves information on an audit log
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Organization, all.Organization.read, all.User, all.User.read, auditLog.*, or auditLog.get.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} orgId - ID associated with the organization
|
36
42
|
# * {string} auditLogId - ID associated with the audit log
|
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Returns the audit logs for the organization
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Organization, all.Organization.read, all.User, all.User.read, auditLogs.*, or auditLogs.get.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} orgId - ID associated with the organization
|
36
42
|
# * {string} sortField - Field to sort the results by. Accepted values are: creationDate, responseStatus, actorName
|
data/lib/losant_rest/auth.rb
CHANGED
@@ -29,7 +29,10 @@ module LosantRest
|
|
29
29
|
@client = client
|
30
30
|
end
|
31
31
|
|
32
|
-
# Authenticates a device using the provided credentials
|
32
|
+
# Authenticates a device using the provided credentials.
|
33
|
+
#
|
34
|
+
# Authentication:
|
35
|
+
# No api access token is required to call this action.
|
33
36
|
#
|
34
37
|
# Parameters:
|
35
38
|
# * {hash} credentials - Device authentication credentials (https://api.losant.com/#/definitions/deviceCredentials)
|
@@ -39,7 +42,7 @@ module LosantRest
|
|
39
42
|
# * {boolean} _embedded - Return embedded resources in response
|
40
43
|
#
|
41
44
|
# Responses:
|
42
|
-
# * 200 - Successful authentication (https://api.losant.com/#/definitions/authedDevice)
|
45
|
+
# * 200 - Successful authentication. The included api access token has the scope 'all.Device'. (https://api.losant.com/#/definitions/authedDevice)
|
43
46
|
#
|
44
47
|
# Errors:
|
45
48
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
@@ -68,10 +71,13 @@ module LosantRest
|
|
68
71
|
body: body)
|
69
72
|
end
|
70
73
|
|
71
|
-
# Authenticates a solution user using the provided credentials
|
74
|
+
# Authenticates a solution user using the provided credentials.
|
75
|
+
#
|
76
|
+
# Authentication:
|
77
|
+
# No api access token is required to call this action.
|
72
78
|
#
|
73
79
|
# Parameters:
|
74
|
-
# * {hash} credentials - Solution user authentication credentials (https://api.losant.com/#/definitions/solutionUserCredentials)
|
80
|
+
# * {hash} credentials - Solution user authentication credentials. The included api access token has the scope 'all.SolutionUser'. (https://api.losant.com/#/definitions/solutionUserCredentials)
|
75
81
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
76
82
|
# * {boolean} _actions - Return resource actions in response
|
77
83
|
# * {boolean} _links - Return resource link in response
|
@@ -107,7 +113,10 @@ module LosantRest
|
|
107
113
|
body: body)
|
108
114
|
end
|
109
115
|
|
110
|
-
# Authenticates a user using the provided credentials
|
116
|
+
# Authenticates a user using the provided credentials.
|
117
|
+
#
|
118
|
+
# Authentication:
|
119
|
+
# No api access token is required to call this action.
|
111
120
|
#
|
112
121
|
# Parameters:
|
113
122
|
# * {hash} credentials - User authentication credentials (https://api.losant.com/#/definitions/userCredentials)
|
@@ -117,7 +126,7 @@ module LosantRest
|
|
117
126
|
# * {boolean} _embedded - Return embedded resources in response
|
118
127
|
#
|
119
128
|
# Responses:
|
120
|
-
# * 200 - Successful authentication (https://api.losant.com/#/definitions/authedUser)
|
129
|
+
# * 200 - Successful authentication. The included api access token has the scope 'all.User'. (https://api.losant.com/#/definitions/authedUser)
|
121
130
|
#
|
122
131
|
# Errors:
|
123
132
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
@@ -146,7 +155,10 @@ module LosantRest
|
|
146
155
|
body: body)
|
147
156
|
end
|
148
157
|
|
149
|
-
# Authenticates a user via GitHub OAuth
|
158
|
+
# Authenticates a user via GitHub OAuth.
|
159
|
+
#
|
160
|
+
# Authentication:
|
161
|
+
# No api access token is required to call this action.
|
150
162
|
#
|
151
163
|
# Parameters:
|
152
164
|
# * {hash} oauth - User authentication credentials (access token) (https://api.losant.com/#/definitions/githubLogin)
|
@@ -156,7 +168,7 @@ module LosantRest
|
|
156
168
|
# * {boolean} _embedded - Return embedded resources in response
|
157
169
|
#
|
158
170
|
# Responses:
|
159
|
-
# * 200 - Successful authentication (https://api.losant.com/#/definitions/authedUser)
|
171
|
+
# * 200 - Successful authentication. The included api access token has the scope 'all.User'. (https://api.losant.com/#/definitions/authedUser)
|
160
172
|
#
|
161
173
|
# Errors:
|
162
174
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
data/lib/losant_rest/client.rb
CHANGED
@@ -27,7 +27,7 @@ module LosantRest
|
|
27
27
|
#
|
28
28
|
# User API for accessing Losant data
|
29
29
|
#
|
30
|
-
# Built For Version 1.5.
|
30
|
+
# Built For Version 1.5.3
|
31
31
|
class Client
|
32
32
|
attr_accessor :auth_token, :url
|
33
33
|
|
@@ -36,16 +36,16 @@ module LosantRest
|
|
36
36
|
self.url = options.fetch(:url, "https://api.losant.com")
|
37
37
|
end
|
38
38
|
|
39
|
-
def
|
40
|
-
@
|
39
|
+
def application
|
40
|
+
@application ||= Application.new(self)
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
44
|
-
@
|
43
|
+
def application_api_token
|
44
|
+
@application_api_token ||= ApplicationApiToken.new(self)
|
45
45
|
end
|
46
46
|
|
47
|
-
def
|
48
|
-
@
|
47
|
+
def application_api_tokens
|
48
|
+
@application_api_tokens ||= ApplicationApiTokens.new(self)
|
49
49
|
end
|
50
50
|
|
51
51
|
def application_key
|
@@ -162,7 +162,7 @@ module LosantRest
|
|
162
162
|
|
163
163
|
headers["Accept"] = "application/json"
|
164
164
|
headers["Content-Type"] = "application/json"
|
165
|
-
headers["Accept-Version"] = "^1.5.
|
165
|
+
headers["Accept-Version"] = "^1.5.3"
|
166
166
|
headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
|
167
167
|
path = self.url + options.fetch(:path, "")
|
168
168
|
|
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Deletes a dashboard
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Organization, all.User, dashboard.*, or dashboard.delete.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} dashboardId - ID of the associated dashboard
|
36
42
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
@@ -69,6 +75,9 @@ module LosantRest
|
|
69
75
|
|
70
76
|
# Retrieves information on a dashboard
|
71
77
|
#
|
78
|
+
# Authentication:
|
79
|
+
# No api access token is required to call this action.
|
80
|
+
#
|
72
81
|
# Parameters:
|
73
82
|
# * {string} dashboardId - ID of the associated dashboard
|
74
83
|
# * {string} password - Password for password-protected dashboards
|
@@ -109,6 +118,12 @@ module LosantRest
|
|
109
118
|
|
110
119
|
# Updates information about a dashboard
|
111
120
|
#
|
121
|
+
# Authentication:
|
122
|
+
# The client must be configured with a valid api
|
123
|
+
# access token to call this action. The token
|
124
|
+
# must include at least one of the following scopes:
|
125
|
+
# all.Organization, all.User, dashboard.*, or dashboard.patch.
|
126
|
+
#
|
112
127
|
# Parameters:
|
113
128
|
# * {string} dashboardId - ID of the associated dashboard
|
114
129
|
# * {hash} dashboard - Object containing new dashboard properties (https://api.losant.com/#/definitions/dashboardPatch)
|
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Returns the dashboards the current user has permission to see
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Organization, all.SolutionUser, all.SolutionUser.read, all.User, dashboards.*, or dashboards.get.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} sortField - Field to sort the results by. Accepted values are: name, id, creationDate, ownerId
|
36
42
|
# * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
|
@@ -80,6 +86,12 @@ module LosantRest
|
|
80
86
|
|
81
87
|
# Create a new dashboard
|
82
88
|
#
|
89
|
+
# Authentication:
|
90
|
+
# The client must be configured with a valid api
|
91
|
+
# access token to call this action. The token
|
92
|
+
# must include at least one of the following scopes:
|
93
|
+
# all.Organization, all.User, dashboards.*, or dashboards.post.
|
94
|
+
#
|
83
95
|
# Parameters:
|
84
96
|
# * {hash} dashboard - New dashboard information (https://api.losant.com/#/definitions/dashboardPost)
|
85
97
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
data/lib/losant_rest/data.rb
CHANGED
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Returns the last known data for the given attribute
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, data.*, or data.lastValueQuery.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} applicationId - ID associated with the application
|
36
42
|
# * {hash} query - The query parameters (https://api.losant.com/#/definitions/lastValueQuery)
|
@@ -72,6 +78,12 @@ module LosantRest
|
|
72
78
|
|
73
79
|
# Returns the data for the given query
|
74
80
|
#
|
81
|
+
# Authentication:
|
82
|
+
# The client must be configured with a valid api
|
83
|
+
# access token to call this action. The token
|
84
|
+
# must include at least one of the following scopes:
|
85
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, data.*, or data.timeSeriesQuery.
|
86
|
+
#
|
75
87
|
# Parameters:
|
76
88
|
# * {string} applicationId - ID associated with the application
|
77
89
|
# * {hash} query - The query parameters (https://api.losant.com/#/definitions/timeSeriesQuery)
|
data/lib/losant_rest/device.rb
CHANGED
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Deletes a device
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Application, all.Organization, all.User, device.*, or device.delete.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} applicationId - ID associated with the application
|
36
42
|
# * {string} deviceId - ID associated with the device
|
@@ -71,6 +77,12 @@ module LosantRest
|
|
71
77
|
|
72
78
|
# Creates a device data export. Defaults to all data.
|
73
79
|
#
|
80
|
+
# Authentication:
|
81
|
+
# The client must be configured with a valid api
|
82
|
+
# access token to call this action. The token
|
83
|
+
# must include at least one of the following scopes:
|
84
|
+
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, device.*, or device.export.
|
85
|
+
#
|
74
86
|
# Parameters:
|
75
87
|
# * {string} applicationId - ID associated with the application
|
76
88
|
# * {string} deviceId - ID associated with the device
|
@@ -119,6 +131,12 @@ module LosantRest
|
|
119
131
|
|
120
132
|
# Retrieves information on a device
|
121
133
|
#
|
134
|
+
# Authentication:
|
135
|
+
# The client must be configured with a valid api
|
136
|
+
# access token to call this action. The token
|
137
|
+
# must include at least one of the following scopes:
|
138
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, device.*, or device.get.
|
139
|
+
#
|
122
140
|
# Parameters:
|
123
141
|
# * {string} applicationId - ID associated with the application
|
124
142
|
# * {string} deviceId - ID associated with the device
|
@@ -159,6 +177,12 @@ module LosantRest
|
|
159
177
|
|
160
178
|
# Retrieve the last known commands(s) sent to the device
|
161
179
|
#
|
180
|
+
# Authentication:
|
181
|
+
# The client must be configured with a valid api
|
182
|
+
# access token to call this action. The token
|
183
|
+
# must include at least one of the following scopes:
|
184
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, device.*, or device.getCommand.
|
185
|
+
#
|
162
186
|
# Parameters:
|
163
187
|
# * {string} applicationId - ID associated with the application
|
164
188
|
# * {string} deviceId - ID associated with the device
|
@@ -203,6 +227,12 @@ module LosantRest
|
|
203
227
|
|
204
228
|
# Retrieve the composite last complete state of the device
|
205
229
|
#
|
230
|
+
# Authentication:
|
231
|
+
# The client must be configured with a valid api
|
232
|
+
# access token to call this action. The token
|
233
|
+
# must include at least one of the following scopes:
|
234
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, device.*, or device.getCompositeState.
|
235
|
+
#
|
206
236
|
# Parameters:
|
207
237
|
# * {string} applicationId - ID associated with the application
|
208
238
|
# * {string} deviceId - ID associated with the device
|
@@ -247,6 +277,12 @@ module LosantRest
|
|
247
277
|
|
248
278
|
# Retrieve the recent log entries about the device
|
249
279
|
#
|
280
|
+
# Authentication:
|
281
|
+
# The client must be configured with a valid api
|
282
|
+
# access token to call this action. The token
|
283
|
+
# must include at least one of the following scopes:
|
284
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, device.*, or device.getLogEntries.
|
285
|
+
#
|
250
286
|
# Parameters:
|
251
287
|
# * {string} applicationId - ID associated with the application
|
252
288
|
# * {string} deviceId - ID associated with the device
|
@@ -291,6 +327,12 @@ module LosantRest
|
|
291
327
|
|
292
328
|
# Retrieve the last known state(s) of the device
|
293
329
|
#
|
330
|
+
# Authentication:
|
331
|
+
# The client must be configured with a valid api
|
332
|
+
# access token to call this action. The token
|
333
|
+
# must include at least one of the following scopes:
|
334
|
+
# all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, device.*, or device.getState.
|
335
|
+
#
|
294
336
|
# Parameters:
|
295
337
|
# * {string} applicationId - ID associated with the application
|
296
338
|
# * {string} deviceId - ID associated with the device
|
@@ -335,6 +377,12 @@ module LosantRest
|
|
335
377
|
|
336
378
|
# Updates information about a device
|
337
379
|
#
|
380
|
+
# Authentication:
|
381
|
+
# The client must be configured with a valid api
|
382
|
+
# access token to call this action. The token
|
383
|
+
# must include at least one of the following scopes:
|
384
|
+
# all.Application, all.Organization, all.User, device.*, or device.patch.
|
385
|
+
#
|
338
386
|
# Parameters:
|
339
387
|
# * {string} applicationId - ID associated with the application
|
340
388
|
# * {string} deviceId - ID associated with the device
|
@@ -378,6 +426,12 @@ module LosantRest
|
|
378
426
|
|
379
427
|
# Removes all device data for the specified time range. Defaults to all data.
|
380
428
|
#
|
429
|
+
# Authentication:
|
430
|
+
# The client must be configured with a valid api
|
431
|
+
# access token to call this action. The token
|
432
|
+
# must include at least one of the following scopes:
|
433
|
+
# all.Application, all.Organization, all.User, device.*, or device.removeData.
|
434
|
+
#
|
381
435
|
# Parameters:
|
382
436
|
# * {string} applicationId - ID associated with the application
|
383
437
|
# * {string} deviceId - ID associated with the device
|
@@ -422,6 +476,12 @@ module LosantRest
|
|
422
476
|
|
423
477
|
# Send a command to a device
|
424
478
|
#
|
479
|
+
# Authentication:
|
480
|
+
# The client must be configured with a valid api
|
481
|
+
# access token to call this action. The token
|
482
|
+
# must include at least one of the following scopes:
|
483
|
+
# all.Application, all.Device, all.Organization, all.User, device.*, or device.sendCommand.
|
484
|
+
#
|
425
485
|
# Parameters:
|
426
486
|
# * {string} applicationId - ID associated with the application
|
427
487
|
# * {string} deviceId - ID associated with the device
|
@@ -465,6 +525,12 @@ module LosantRest
|
|
465
525
|
|
466
526
|
# Send the current state of the device
|
467
527
|
#
|
528
|
+
# Authentication:
|
529
|
+
# The client must be configured with a valid api
|
530
|
+
# access token to call this action. The token
|
531
|
+
# must include at least one of the following scopes:
|
532
|
+
# all.Application, all.Device, all.Organization, all.User, device.*, or device.sendState.
|
533
|
+
#
|
468
534
|
# Parameters:
|
469
535
|
# * {string} applicationId - ID associated with the application
|
470
536
|
# * {string} deviceId - ID associated with the device
|
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Bulk creates devices using this recipe from a CSV
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Application, all.Organization, all.User, deviceRecipe.*, or deviceRecipe.bulkCreate.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} applicationId - ID associated with the application
|
36
42
|
# * {string} deviceRecipeId - ID associated with the device recipe
|
@@ -74,6 +80,12 @@ module LosantRest
|
|
74
80
|
|
75
81
|
# Deletes a device recipe
|
76
82
|
#
|
83
|
+
# Authentication:
|
84
|
+
# The client must be configured with a valid api
|
85
|
+
# access token to call this action. The token
|
86
|
+
# must include at least one of the following scopes:
|
87
|
+
# all.Application, all.Organization, all.User, deviceRecipe.*, or deviceRecipe.delete.
|
88
|
+
#
|
77
89
|
# Parameters:
|
78
90
|
# * {string} applicationId - ID associated with the application
|
79
91
|
# * {string} deviceRecipeId - ID associated with the device recipe
|
@@ -114,6 +126,12 @@ module LosantRest
|
|
114
126
|
|
115
127
|
# Retrieves information on a device recipe
|
116
128
|
#
|
129
|
+
# Authentication:
|
130
|
+
# The client must be configured with a valid api
|
131
|
+
# access token to call this action. The token
|
132
|
+
# must include at least one of the following scopes:
|
133
|
+
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, deviceRecipe.*, or deviceRecipe.get.
|
134
|
+
#
|
117
135
|
# Parameters:
|
118
136
|
# * {string} applicationId - ID associated with the application
|
119
137
|
# * {string} deviceRecipeId - ID associated with the device recipe
|
@@ -154,6 +172,12 @@ module LosantRest
|
|
154
172
|
|
155
173
|
# Updates information about a device recipe
|
156
174
|
#
|
175
|
+
# Authentication:
|
176
|
+
# The client must be configured with a valid api
|
177
|
+
# access token to call this action. The token
|
178
|
+
# must include at least one of the following scopes:
|
179
|
+
# all.Application, all.Organization, all.User, deviceRecipe.*, or deviceRecipe.patch.
|
180
|
+
#
|
157
181
|
# Parameters:
|
158
182
|
# * {string} applicationId - ID associated with the application
|
159
183
|
# * {string} deviceRecipeId - ID associated with the device recipe
|
@@ -31,6 +31,12 @@ module LosantRest
|
|
31
31
|
|
32
32
|
# Returns the device recipes for an application
|
33
33
|
#
|
34
|
+
# Authentication:
|
35
|
+
# The client must be configured with a valid api
|
36
|
+
# access token to call this action. The token
|
37
|
+
# must include at least one of the following scopes:
|
38
|
+
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, deviceRecipes.*, or deviceRecipes.get.
|
39
|
+
#
|
34
40
|
# Parameters:
|
35
41
|
# * {string} applicationId - ID associated with the application
|
36
42
|
# * {string} sortField - Field to sort the results by. Accepted values are: name, id, creationDate
|
@@ -81,6 +87,12 @@ module LosantRest
|
|
81
87
|
|
82
88
|
# Create a new device recipe for an application
|
83
89
|
#
|
90
|
+
# Authentication:
|
91
|
+
# The client must be configured with a valid api
|
92
|
+
# access token to call this action. The token
|
93
|
+
# must include at least one of the following scopes:
|
94
|
+
# all.Application, all.Organization, all.User, deviceRecipes.*, or deviceRecipes.post.
|
95
|
+
#
|
84
96
|
# Parameters:
|
85
97
|
# * {string} applicationId - ID associated with the application
|
86
98
|
# * {hash} deviceRecipe - New device recipe information (https://api.losant.com/#/definitions/deviceRecipePost)
|