artikcloud 2.0.5 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +23 -1
- data/LICENSE +1 -2
- data/README.md +50 -4
- data/artikcloud.gemspec +29 -5
- data/docs/DeviceTask.md +13 -0
- data/docs/DeviceTaskUpdateRequest.md +8 -0
- data/docs/DeviceTaskUpdateResponse.md +8 -0
- data/docs/DeviceTypeInfo.md +14 -0
- data/docs/DeviceTypeInfoEnvelope.md +8 -0
- data/docs/DeviceTypesApi.md +61 -0
- data/docs/DeviceTypesInfo.md +14 -0
- data/docs/DeviceTypesInfoEnvelope.md +8 -0
- data/docs/DevicesManagementApi.md +870 -0
- data/docs/EventFeedData.md +10 -0
- data/docs/MetadataEnvelope.md +8 -0
- data/docs/MetadataPropertiesEnvelope.md +8 -0
- data/docs/MetadataQueryEnvelope.md +11 -0
- data/docs/MetadataRequest.md +7 -0
- data/docs/Task.md +18 -0
- data/docs/TaskByDid.md +19 -0
- data/docs/TaskByDidList.md +8 -0
- data/docs/TaskByDidListEnvelope.md +11 -0
- data/docs/TaskEnvelope.md +8 -0
- data/docs/TaskHistory.md +13 -0
- data/docs/TaskHistoryList.md +8 -0
- data/docs/TaskList.md +8 -0
- data/docs/TaskListEnvelope.md +12 -0
- data/docs/TaskParameters.md +9 -0
- data/docs/TaskRequest.md +13 -0
- data/docs/TaskStatus.md +13 -0
- data/docs/TaskStatusCounts.md +12 -0
- data/docs/TaskStatuses.md +19 -0
- data/docs/TaskStatusesEnvelope.md +11 -0
- data/docs/TaskStatusesHistoryEnvelope.md +8 -0
- data/docs/TaskUpdateRequest.md +8 -0
- data/docs/TaskUpdateResponse.md +8 -0
- data/docs/TasksStatusCounts.md +11 -0
- data/lib/artikcloud/api/device_types_api.rb +66 -0
- data/lib/artikcloud/api/devices_management_api.rb +971 -0
- data/lib/artikcloud/models/device_task.rb +250 -0
- data/lib/artikcloud/models/device_task_update_request.rb +200 -0
- data/lib/artikcloud/models/device_task_update_response.rb +200 -0
- data/lib/artikcloud/models/device_type_info.rb +260 -0
- data/lib/artikcloud/models/device_type_info_envelope.rb +199 -0
- data/lib/artikcloud/models/device_types_info.rb +260 -0
- data/lib/artikcloud/models/device_types_info_envelope.rb +199 -0
- data/lib/artikcloud/models/event_feed_data.rb +222 -0
- data/lib/artikcloud/models/metadata_envelope.rb +202 -0
- data/lib/artikcloud/models/metadata_properties_envelope.rb +201 -0
- data/lib/artikcloud/models/metadata_query_envelope.rb +232 -0
- data/lib/artikcloud/models/metadata_request.rb +190 -0
- data/lib/artikcloud/models/task.rb +302 -0
- data/lib/artikcloud/models/task_by_did.rb +314 -0
- data/lib/artikcloud/models/task_by_did_list.rb +202 -0
- data/lib/artikcloud/models/task_by_did_list_envelope.rb +230 -0
- data/lib/artikcloud/models/task_envelope.rb +200 -0
- data/lib/artikcloud/models/task_history.rb +250 -0
- data/lib/artikcloud/models/task_history_list.rb +202 -0
- data/lib/artikcloud/models/task_list.rb +202 -0
- data/lib/artikcloud/models/task_list_envelope.rb +240 -0
- data/lib/artikcloud/models/task_parameters.rb +210 -0
- data/lib/artikcloud/models/task_request.rb +252 -0
- data/lib/artikcloud/models/task_status.rb +250 -0
- data/lib/artikcloud/models/task_status_counts.rb +240 -0
- data/lib/artikcloud/models/task_statuses.rb +314 -0
- data/lib/artikcloud/models/task_statuses_envelope.rb +230 -0
- data/lib/artikcloud/models/task_statuses_history_envelope.rb +200 -0
- data/lib/artikcloud/models/task_update_request.rb +200 -0
- data/lib/artikcloud/models/task_update_response.rb +200 -0
- data/lib/artikcloud/models/tasks_status_counts.rb +230 -0
- data/lib/artikcloud/version.rb +1 -1
- data/lib/artikcloud.rb +31 -0
- data/pom.xml +1 -1
- data/spec/api/devices_api_spec.rb +7 -10
- data/spec/api/devices_management_api_spec.rb +251 -0
- data/spec/api/messages_api_spec.rb +67 -25
- data/spec/api/tokens_api_spec.rb +10 -33
- data/spec/api/users_api_spec.rb +65 -14
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/factories/devices.rb +32 -0
- data/spec/factories/users.rb +31 -0
- data/spec/fixtures/cassettes/DevicesApi/get_device_presence_test/should_work.yml +50 -0
- data/spec/fixtures/cassettes/MessagesApi/get_message_snapshots/should_work.yml +54 -0
- data/spec/fixtures/cassettes/MessagesApi/send_actions/should_work.yml +93 -0
- data/spec/fixtures/cassettes/MessagesApi/send_message_action_test/should_work.yml +99 -0
- data/spec/fixtures/cassettes/TokensApi/refresh_token_test/should_work.yml +43 -0
- data/spec/fixtures/cassettes/TokensApi/token_info_test/should_work.yml +38 -0
- data/spec/fixtures/cassettes/UsersApi/get_self_test/should_work.yml +53 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_device_types_test/should_work.yml +55 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_devices_test/should_work.yml +55 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_properties_update_user_properties_and_delete_user_properties_test/should_work.yml +52 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_rules_test/should_work.yml +58 -0
- data/spec/spec_helper.rb +20 -5
- metadata +142 -46
@@ -0,0 +1,870 @@
|
|
1
|
+
# ArtikCloud::DevicesManagementApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.artik.cloud/v1.1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_tasks**](DevicesManagementApi.md#create_tasks) | **POST** /devicemgmt/tasks | Create a new task for one or more devices
|
8
|
+
[**delete_server_properties**](DevicesManagementApi.md#delete_server_properties) | **DELETE** /devicemgmt/devices/{did}/serverproperties | Deletes a device's properties.
|
9
|
+
[**get_all_by_did**](DevicesManagementApi.md#get_all_by_did) | **GET** /devicemgmt/devices/{did}/tasks | Returns the list of tasks for a particular device id with optional status filter.
|
10
|
+
[**get_device_types_info**](DevicesManagementApi.md#get_device_types_info) | **GET** /devicemgmt/devicetypes/{dtid} | Read a device type device management information.
|
11
|
+
[**get_manifest_properties**](DevicesManagementApi.md#get_manifest_properties) | **GET** /devicemgmt/devicetypes/{dtid}/manifest/properties | Get a device type's device management manifest properties
|
12
|
+
[**get_properties**](DevicesManagementApi.md#get_properties) | **GET** /devicemgmt/devices/{did}/properties | Read a device's properties.
|
13
|
+
[**get_statuses**](DevicesManagementApi.md#get_statuses) | **GET** /devicemgmt/tasks/{tid}/statuses | Returns the details and status of a task id and the individual statuses of each device id in the list.
|
14
|
+
[**get_statuses_history**](DevicesManagementApi.md#get_statuses_history) | **GET** /devicemgmt/tasks/{tid}/statuses/history | Returns the history of the status changes for a specific task id, or for a specific device id in that task.
|
15
|
+
[**get_task_by_id**](DevicesManagementApi.md#get_task_by_id) | **GET** /devicemgmt/tasks/{tid} | Returns the details and global status of a specific task id.
|
16
|
+
[**get_tasks**](DevicesManagementApi.md#get_tasks) | **GET** /devicemgmt/tasks | Returns the all the tasks for a device type.
|
17
|
+
[**query_properties**](DevicesManagementApi.md#query_properties) | **GET** /devicemgmt/devices/properties | Query device properties across devices.
|
18
|
+
[**update_device_types_info**](DevicesManagementApi.md#update_device_types_info) | **PUT** /devicemgmt/devicetypes/{dtid} | Updates a device type information
|
19
|
+
[**update_server_properties**](DevicesManagementApi.md#update_server_properties) | **POST** /devicemgmt/devices/{did}/serverproperties | Updates a device's server properties.
|
20
|
+
[**update_task**](DevicesManagementApi.md#update_task) | **PUT** /devicemgmt/tasks/{tid} | Updates a task for all devices - For now just allows changing the state to cancelled.
|
21
|
+
[**update_task_for_device**](DevicesManagementApi.md#update_task_for_device) | **PUT** /devicemgmt/tasks/{tid}/devices/{did} | Updates a task for a specific device - For now just allows changing the state to cancelled.
|
22
|
+
|
23
|
+
|
24
|
+
# **create_tasks**
|
25
|
+
> TaskEnvelope create_tasks(task_payload)
|
26
|
+
|
27
|
+
Create a new task for one or more devices
|
28
|
+
|
29
|
+
Create a new task for one or more devices
|
30
|
+
|
31
|
+
### Example
|
32
|
+
```ruby
|
33
|
+
# load the gem
|
34
|
+
require 'artikcloud'
|
35
|
+
# setup authorization
|
36
|
+
ArtikCloud.configure do |config|
|
37
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
38
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
39
|
+
end
|
40
|
+
|
41
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
42
|
+
|
43
|
+
task_payload = ArtikCloud::TaskRequest.new # TaskRequest | Task object to be created
|
44
|
+
|
45
|
+
|
46
|
+
begin
|
47
|
+
#Create a new task for one or more devices
|
48
|
+
result = api_instance.create_tasks(task_payload)
|
49
|
+
p result
|
50
|
+
rescue ArtikCloud::ApiError => e
|
51
|
+
puts "Exception when calling DevicesManagementApi->create_tasks: #{e}"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Parameters
|
56
|
+
|
57
|
+
Name | Type | Description | Notes
|
58
|
+
------------- | ------------- | ------------- | -------------
|
59
|
+
**task_payload** | [**TaskRequest**](TaskRequest.md)| Task object to be created |
|
60
|
+
|
61
|
+
### Return type
|
62
|
+
|
63
|
+
[**TaskEnvelope**](TaskEnvelope.md)
|
64
|
+
|
65
|
+
### Authorization
|
66
|
+
|
67
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
68
|
+
|
69
|
+
### HTTP request headers
|
70
|
+
|
71
|
+
- **Content-Type**: Not defined
|
72
|
+
- **Accept**: application/json
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
# **delete_server_properties**
|
77
|
+
> MetadataEnvelope delete_server_properties(did)
|
78
|
+
|
79
|
+
Deletes a device's properties.
|
80
|
+
|
81
|
+
Deletes a device's properties.
|
82
|
+
|
83
|
+
### Example
|
84
|
+
```ruby
|
85
|
+
# load the gem
|
86
|
+
require 'artikcloud'
|
87
|
+
# setup authorization
|
88
|
+
ArtikCloud.configure do |config|
|
89
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
90
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
91
|
+
end
|
92
|
+
|
93
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
94
|
+
|
95
|
+
did = "did_example" # String | Device ID.
|
96
|
+
|
97
|
+
|
98
|
+
begin
|
99
|
+
#Deletes a device's properties.
|
100
|
+
result = api_instance.delete_server_properties(did)
|
101
|
+
p result
|
102
|
+
rescue ArtikCloud::ApiError => e
|
103
|
+
puts "Exception when calling DevicesManagementApi->delete_server_properties: #{e}"
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
### Parameters
|
108
|
+
|
109
|
+
Name | Type | Description | Notes
|
110
|
+
------------- | ------------- | ------------- | -------------
|
111
|
+
**did** | **String**| Device ID. |
|
112
|
+
|
113
|
+
### Return type
|
114
|
+
|
115
|
+
[**MetadataEnvelope**](MetadataEnvelope.md)
|
116
|
+
|
117
|
+
### Authorization
|
118
|
+
|
119
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
120
|
+
|
121
|
+
### HTTP request headers
|
122
|
+
|
123
|
+
- **Content-Type**: Not defined
|
124
|
+
- **Accept**: application/json
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
# **get_all_by_did**
|
129
|
+
> TaskByDidListEnvelope get_all_by_did(did, opts)
|
130
|
+
|
131
|
+
Returns the list of tasks for a particular device id with optional status filter.
|
132
|
+
|
133
|
+
Returns the list of tasks for a particular device id with optional status filter.
|
134
|
+
|
135
|
+
### Example
|
136
|
+
```ruby
|
137
|
+
# load the gem
|
138
|
+
require 'artikcloud'
|
139
|
+
# setup authorization
|
140
|
+
ArtikCloud.configure do |config|
|
141
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
142
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
143
|
+
end
|
144
|
+
|
145
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
146
|
+
|
147
|
+
did = "did_example" # String | Device ID.
|
148
|
+
|
149
|
+
opts = {
|
150
|
+
count: 56, # Integer | Max results count.
|
151
|
+
offset: 56, # Integer | Result starting offset.
|
152
|
+
status: "status_example", # String | Status filter. Comma-separated statuses.
|
153
|
+
order: "order_example", # String | Sort results by a field. Valid fields: createdOn.
|
154
|
+
sort: "sort_example" # String | Sort order. Valid values: asc or desc.
|
155
|
+
}
|
156
|
+
|
157
|
+
begin
|
158
|
+
#Returns the list of tasks for a particular device id with optional status filter.
|
159
|
+
result = api_instance.get_all_by_did(did, opts)
|
160
|
+
p result
|
161
|
+
rescue ArtikCloud::ApiError => e
|
162
|
+
puts "Exception when calling DevicesManagementApi->get_all_by_did: #{e}"
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
### Parameters
|
167
|
+
|
168
|
+
Name | Type | Description | Notes
|
169
|
+
------------- | ------------- | ------------- | -------------
|
170
|
+
**did** | **String**| Device ID. |
|
171
|
+
**count** | **Integer**| Max results count. | [optional]
|
172
|
+
**offset** | **Integer**| Result starting offset. | [optional]
|
173
|
+
**status** | **String**| Status filter. Comma-separated statuses. | [optional]
|
174
|
+
**order** | **String**| Sort results by a field. Valid fields: createdOn. | [optional]
|
175
|
+
**sort** | **String**| Sort order. Valid values: asc or desc. | [optional]
|
176
|
+
|
177
|
+
### Return type
|
178
|
+
|
179
|
+
[**TaskByDidListEnvelope**](TaskByDidListEnvelope.md)
|
180
|
+
|
181
|
+
### Authorization
|
182
|
+
|
183
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
184
|
+
|
185
|
+
### HTTP request headers
|
186
|
+
|
187
|
+
- **Content-Type**: Not defined
|
188
|
+
- **Accept**: application/json
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
# **get_device_types_info**
|
193
|
+
> DeviceTypesInfoEnvelope get_device_types_info(dtid)
|
194
|
+
|
195
|
+
Read a device type device management information.
|
196
|
+
|
197
|
+
Read a device type device management information.
|
198
|
+
|
199
|
+
### Example
|
200
|
+
```ruby
|
201
|
+
# load the gem
|
202
|
+
require 'artikcloud'
|
203
|
+
# setup authorization
|
204
|
+
ArtikCloud.configure do |config|
|
205
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
206
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
207
|
+
end
|
208
|
+
|
209
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
210
|
+
|
211
|
+
dtid = "dtid_example" # String | Device type ID.
|
212
|
+
|
213
|
+
|
214
|
+
begin
|
215
|
+
#Read a device type device management information.
|
216
|
+
result = api_instance.get_device_types_info(dtid)
|
217
|
+
p result
|
218
|
+
rescue ArtikCloud::ApiError => e
|
219
|
+
puts "Exception when calling DevicesManagementApi->get_device_types_info: #{e}"
|
220
|
+
end
|
221
|
+
```
|
222
|
+
|
223
|
+
### Parameters
|
224
|
+
|
225
|
+
Name | Type | Description | Notes
|
226
|
+
------------- | ------------- | ------------- | -------------
|
227
|
+
**dtid** | **String**| Device type ID. |
|
228
|
+
|
229
|
+
### Return type
|
230
|
+
|
231
|
+
[**DeviceTypesInfoEnvelope**](DeviceTypesInfoEnvelope.md)
|
232
|
+
|
233
|
+
### Authorization
|
234
|
+
|
235
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
236
|
+
|
237
|
+
### HTTP request headers
|
238
|
+
|
239
|
+
- **Content-Type**: Not defined
|
240
|
+
- **Accept**: application/json
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
# **get_manifest_properties**
|
245
|
+
> MetadataPropertiesEnvelope get_manifest_properties(dtid)
|
246
|
+
|
247
|
+
Get a device type's device management manifest properties
|
248
|
+
|
249
|
+
Get a device type's device management manifest properties
|
250
|
+
|
251
|
+
### Example
|
252
|
+
```ruby
|
253
|
+
# load the gem
|
254
|
+
require 'artikcloud'
|
255
|
+
# setup authorization
|
256
|
+
ArtikCloud.configure do |config|
|
257
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
258
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
259
|
+
end
|
260
|
+
|
261
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
262
|
+
|
263
|
+
dtid = "dtid_example" # String | Device Type ID.
|
264
|
+
|
265
|
+
|
266
|
+
begin
|
267
|
+
#Get a device type's device management manifest properties
|
268
|
+
result = api_instance.get_manifest_properties(dtid)
|
269
|
+
p result
|
270
|
+
rescue ArtikCloud::ApiError => e
|
271
|
+
puts "Exception when calling DevicesManagementApi->get_manifest_properties: #{e}"
|
272
|
+
end
|
273
|
+
```
|
274
|
+
|
275
|
+
### Parameters
|
276
|
+
|
277
|
+
Name | Type | Description | Notes
|
278
|
+
------------- | ------------- | ------------- | -------------
|
279
|
+
**dtid** | **String**| Device Type ID. |
|
280
|
+
|
281
|
+
### Return type
|
282
|
+
|
283
|
+
[**MetadataPropertiesEnvelope**](MetadataPropertiesEnvelope.md)
|
284
|
+
|
285
|
+
### Authorization
|
286
|
+
|
287
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
288
|
+
|
289
|
+
### HTTP request headers
|
290
|
+
|
291
|
+
- **Content-Type**: Not defined
|
292
|
+
- **Accept**: application/json
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
# **get_properties**
|
297
|
+
> MetadataEnvelope get_properties(did, opts)
|
298
|
+
|
299
|
+
Read a device's properties.
|
300
|
+
|
301
|
+
Read a device's properties.
|
302
|
+
|
303
|
+
### Example
|
304
|
+
```ruby
|
305
|
+
# load the gem
|
306
|
+
require 'artikcloud'
|
307
|
+
# setup authorization
|
308
|
+
ArtikCloud.configure do |config|
|
309
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
310
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
311
|
+
end
|
312
|
+
|
313
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
314
|
+
|
315
|
+
did = "did_example" # String | Device ID.
|
316
|
+
|
317
|
+
opts = {
|
318
|
+
include_timestamp: true # BOOLEAN | Include timestamp.
|
319
|
+
}
|
320
|
+
|
321
|
+
begin
|
322
|
+
#Read a device's properties.
|
323
|
+
result = api_instance.get_properties(did, opts)
|
324
|
+
p result
|
325
|
+
rescue ArtikCloud::ApiError => e
|
326
|
+
puts "Exception when calling DevicesManagementApi->get_properties: #{e}"
|
327
|
+
end
|
328
|
+
```
|
329
|
+
|
330
|
+
### Parameters
|
331
|
+
|
332
|
+
Name | Type | Description | Notes
|
333
|
+
------------- | ------------- | ------------- | -------------
|
334
|
+
**did** | **String**| Device ID. |
|
335
|
+
**include_timestamp** | **BOOLEAN**| Include timestamp. | [optional]
|
336
|
+
|
337
|
+
### Return type
|
338
|
+
|
339
|
+
[**MetadataEnvelope**](MetadataEnvelope.md)
|
340
|
+
|
341
|
+
### Authorization
|
342
|
+
|
343
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
344
|
+
|
345
|
+
### HTTP request headers
|
346
|
+
|
347
|
+
- **Content-Type**: Not defined
|
348
|
+
- **Accept**: application/json
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
# **get_statuses**
|
353
|
+
> TaskStatusesEnvelope get_statuses(tid, opts)
|
354
|
+
|
355
|
+
Returns the details and status of a task id and the individual statuses of each device id in the list.
|
356
|
+
|
357
|
+
Returns the details and status of a task id and the individual statuses of each device id in the list.
|
358
|
+
|
359
|
+
### Example
|
360
|
+
```ruby
|
361
|
+
# load the gem
|
362
|
+
require 'artikcloud'
|
363
|
+
# setup authorization
|
364
|
+
ArtikCloud.configure do |config|
|
365
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
366
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
367
|
+
end
|
368
|
+
|
369
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
370
|
+
|
371
|
+
tid = "tid_example" # String | Task ID.
|
372
|
+
|
373
|
+
opts = {
|
374
|
+
count: 56, # Integer | Max results count.
|
375
|
+
offset: 56, # Integer | Result starting offset.
|
376
|
+
status: "status_example", # String | Status filter. Comma-separated statuses.
|
377
|
+
dids: "dids_example" # String | Devices filter. Comma-separated device IDs.
|
378
|
+
}
|
379
|
+
|
380
|
+
begin
|
381
|
+
#Returns the details and status of a task id and the individual statuses of each device id in the list.
|
382
|
+
result = api_instance.get_statuses(tid, opts)
|
383
|
+
p result
|
384
|
+
rescue ArtikCloud::ApiError => e
|
385
|
+
puts "Exception when calling DevicesManagementApi->get_statuses: #{e}"
|
386
|
+
end
|
387
|
+
```
|
388
|
+
|
389
|
+
### Parameters
|
390
|
+
|
391
|
+
Name | Type | Description | Notes
|
392
|
+
------------- | ------------- | ------------- | -------------
|
393
|
+
**tid** | **String**| Task ID. |
|
394
|
+
**count** | **Integer**| Max results count. | [optional]
|
395
|
+
**offset** | **Integer**| Result starting offset. | [optional]
|
396
|
+
**status** | **String**| Status filter. Comma-separated statuses. | [optional]
|
397
|
+
**dids** | **String**| Devices filter. Comma-separated device IDs. | [optional]
|
398
|
+
|
399
|
+
### Return type
|
400
|
+
|
401
|
+
[**TaskStatusesEnvelope**](TaskStatusesEnvelope.md)
|
402
|
+
|
403
|
+
### Authorization
|
404
|
+
|
405
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
406
|
+
|
407
|
+
### HTTP request headers
|
408
|
+
|
409
|
+
- **Content-Type**: Not defined
|
410
|
+
- **Accept**: application/json
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
# **get_statuses_history**
|
415
|
+
> TaskStatusesHistoryEnvelope get_statuses_history(tid, opts)
|
416
|
+
|
417
|
+
Returns the history of the status changes for a specific task id, or for a specific device id in that task.
|
418
|
+
|
419
|
+
Returns the history of the status changes for a specific task id, or for a specific device id in that task.
|
420
|
+
|
421
|
+
### Example
|
422
|
+
```ruby
|
423
|
+
# load the gem
|
424
|
+
require 'artikcloud'
|
425
|
+
# setup authorization
|
426
|
+
ArtikCloud.configure do |config|
|
427
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
428
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
429
|
+
end
|
430
|
+
|
431
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
432
|
+
|
433
|
+
tid = "tid_example" # String | Task ID.
|
434
|
+
|
435
|
+
opts = {
|
436
|
+
did: "did_example" # String | Device ID. Optional.
|
437
|
+
}
|
438
|
+
|
439
|
+
begin
|
440
|
+
#Returns the history of the status changes for a specific task id, or for a specific device id in that task.
|
441
|
+
result = api_instance.get_statuses_history(tid, opts)
|
442
|
+
p result
|
443
|
+
rescue ArtikCloud::ApiError => e
|
444
|
+
puts "Exception when calling DevicesManagementApi->get_statuses_history: #{e}"
|
445
|
+
end
|
446
|
+
```
|
447
|
+
|
448
|
+
### Parameters
|
449
|
+
|
450
|
+
Name | Type | Description | Notes
|
451
|
+
------------- | ------------- | ------------- | -------------
|
452
|
+
**tid** | **String**| Task ID. |
|
453
|
+
**did** | **String**| Device ID. Optional. | [optional]
|
454
|
+
|
455
|
+
### Return type
|
456
|
+
|
457
|
+
[**TaskStatusesHistoryEnvelope**](TaskStatusesHistoryEnvelope.md)
|
458
|
+
|
459
|
+
### Authorization
|
460
|
+
|
461
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
462
|
+
|
463
|
+
### HTTP request headers
|
464
|
+
|
465
|
+
- **Content-Type**: Not defined
|
466
|
+
- **Accept**: application/json
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
# **get_task_by_id**
|
471
|
+
> TaskEnvelope get_task_by_id(tid)
|
472
|
+
|
473
|
+
Returns the details and global status of a specific task id.
|
474
|
+
|
475
|
+
Returns the details and global status of a specific task id.
|
476
|
+
|
477
|
+
### Example
|
478
|
+
```ruby
|
479
|
+
# load the gem
|
480
|
+
require 'artikcloud'
|
481
|
+
# setup authorization
|
482
|
+
ArtikCloud.configure do |config|
|
483
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
484
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
485
|
+
end
|
486
|
+
|
487
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
488
|
+
|
489
|
+
tid = "tid_example" # String | Task ID.
|
490
|
+
|
491
|
+
|
492
|
+
begin
|
493
|
+
#Returns the details and global status of a specific task id.
|
494
|
+
result = api_instance.get_task_by_id(tid)
|
495
|
+
p result
|
496
|
+
rescue ArtikCloud::ApiError => e
|
497
|
+
puts "Exception when calling DevicesManagementApi->get_task_by_id: #{e}"
|
498
|
+
end
|
499
|
+
```
|
500
|
+
|
501
|
+
### Parameters
|
502
|
+
|
503
|
+
Name | Type | Description | Notes
|
504
|
+
------------- | ------------- | ------------- | -------------
|
505
|
+
**tid** | **String**| Task ID. |
|
506
|
+
|
507
|
+
### Return type
|
508
|
+
|
509
|
+
[**TaskEnvelope**](TaskEnvelope.md)
|
510
|
+
|
511
|
+
### Authorization
|
512
|
+
|
513
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
514
|
+
|
515
|
+
### HTTP request headers
|
516
|
+
|
517
|
+
- **Content-Type**: Not defined
|
518
|
+
- **Accept**: application/json
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
# **get_tasks**
|
523
|
+
> TaskListEnvelope get_tasks(dtid, opts)
|
524
|
+
|
525
|
+
Returns the all the tasks for a device type.
|
526
|
+
|
527
|
+
Returns the all the tasks for a device type.
|
528
|
+
|
529
|
+
### Example
|
530
|
+
```ruby
|
531
|
+
# load the gem
|
532
|
+
require 'artikcloud'
|
533
|
+
# setup authorization
|
534
|
+
ArtikCloud.configure do |config|
|
535
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
536
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
537
|
+
end
|
538
|
+
|
539
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
540
|
+
|
541
|
+
dtid = "dtid_example" # String | Device Type ID.
|
542
|
+
|
543
|
+
opts = {
|
544
|
+
count: 56, # Integer | Max results count.
|
545
|
+
offset: 56, # Integer | Result starting offset.
|
546
|
+
status: "status_example", # String | Status filter. Comma-separated statuses.
|
547
|
+
order: "order_example", # String | Sort results by a field. Valid fields: createdOn.
|
548
|
+
sort: "sort_example" # String | Sort order. Valid values: asc or desc.
|
549
|
+
}
|
550
|
+
|
551
|
+
begin
|
552
|
+
#Returns the all the tasks for a device type.
|
553
|
+
result = api_instance.get_tasks(dtid, opts)
|
554
|
+
p result
|
555
|
+
rescue ArtikCloud::ApiError => e
|
556
|
+
puts "Exception when calling DevicesManagementApi->get_tasks: #{e}"
|
557
|
+
end
|
558
|
+
```
|
559
|
+
|
560
|
+
### Parameters
|
561
|
+
|
562
|
+
Name | Type | Description | Notes
|
563
|
+
------------- | ------------- | ------------- | -------------
|
564
|
+
**dtid** | **String**| Device Type ID. |
|
565
|
+
**count** | **Integer**| Max results count. | [optional]
|
566
|
+
**offset** | **Integer**| Result starting offset. | [optional]
|
567
|
+
**status** | **String**| Status filter. Comma-separated statuses. | [optional]
|
568
|
+
**order** | **String**| Sort results by a field. Valid fields: createdOn. | [optional]
|
569
|
+
**sort** | **String**| Sort order. Valid values: asc or desc. | [optional]
|
570
|
+
|
571
|
+
### Return type
|
572
|
+
|
573
|
+
[**TaskListEnvelope**](TaskListEnvelope.md)
|
574
|
+
|
575
|
+
### Authorization
|
576
|
+
|
577
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
578
|
+
|
579
|
+
### HTTP request headers
|
580
|
+
|
581
|
+
- **Content-Type**: Not defined
|
582
|
+
- **Accept**: application/json
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
# **query_properties**
|
587
|
+
> MetadataQueryEnvelope query_properties(dtid, opts)
|
588
|
+
|
589
|
+
Query device properties across devices.
|
590
|
+
|
591
|
+
Query device properties across devices.
|
592
|
+
|
593
|
+
### Example
|
594
|
+
```ruby
|
595
|
+
# load the gem
|
596
|
+
require 'artikcloud'
|
597
|
+
# setup authorization
|
598
|
+
ArtikCloud.configure do |config|
|
599
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
600
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
601
|
+
end
|
602
|
+
|
603
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
604
|
+
|
605
|
+
dtid = "dtid_example" # String | Device Type ID.
|
606
|
+
|
607
|
+
opts = {
|
608
|
+
count: 56, # Integer | Max results count.
|
609
|
+
offset: 56, # Integer | Result starting offset.
|
610
|
+
filter: "filter_example", # String | Query filter. Comma-separated key=value pairs
|
611
|
+
include_timestamp: true # BOOLEAN | Include timestamp.
|
612
|
+
}
|
613
|
+
|
614
|
+
begin
|
615
|
+
#Query device properties across devices.
|
616
|
+
result = api_instance.query_properties(dtid, opts)
|
617
|
+
p result
|
618
|
+
rescue ArtikCloud::ApiError => e
|
619
|
+
puts "Exception when calling DevicesManagementApi->query_properties: #{e}"
|
620
|
+
end
|
621
|
+
```
|
622
|
+
|
623
|
+
### Parameters
|
624
|
+
|
625
|
+
Name | Type | Description | Notes
|
626
|
+
------------- | ------------- | ------------- | -------------
|
627
|
+
**dtid** | **String**| Device Type ID. |
|
628
|
+
**count** | **Integer**| Max results count. | [optional]
|
629
|
+
**offset** | **Integer**| Result starting offset. | [optional]
|
630
|
+
**filter** | **String**| Query filter. Comma-separated key=value pairs | [optional]
|
631
|
+
**include_timestamp** | **BOOLEAN**| Include timestamp. | [optional]
|
632
|
+
|
633
|
+
### Return type
|
634
|
+
|
635
|
+
[**MetadataQueryEnvelope**](MetadataQueryEnvelope.md)
|
636
|
+
|
637
|
+
### Authorization
|
638
|
+
|
639
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
640
|
+
|
641
|
+
### HTTP request headers
|
642
|
+
|
643
|
+
- **Content-Type**: Not defined
|
644
|
+
- **Accept**: application/json
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
# **update_device_types_info**
|
649
|
+
> DeviceTypesInfoEnvelope update_device_types_info(dtid, device_type_info)
|
650
|
+
|
651
|
+
Updates a device type information
|
652
|
+
|
653
|
+
Updates a device type information
|
654
|
+
|
655
|
+
### Example
|
656
|
+
```ruby
|
657
|
+
# load the gem
|
658
|
+
require 'artikcloud'
|
659
|
+
# setup authorization
|
660
|
+
ArtikCloud.configure do |config|
|
661
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
662
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
663
|
+
end
|
664
|
+
|
665
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
666
|
+
|
667
|
+
dtid = "dtid_example" # String | Device type ID.
|
668
|
+
|
669
|
+
device_type_info = ArtikCloud::DeviceTypesInfo.new # DeviceTypesInfo | Device type info object to be set
|
670
|
+
|
671
|
+
|
672
|
+
begin
|
673
|
+
#Updates a device type information
|
674
|
+
result = api_instance.update_device_types_info(dtid, device_type_info)
|
675
|
+
p result
|
676
|
+
rescue ArtikCloud::ApiError => e
|
677
|
+
puts "Exception when calling DevicesManagementApi->update_device_types_info: #{e}"
|
678
|
+
end
|
679
|
+
```
|
680
|
+
|
681
|
+
### Parameters
|
682
|
+
|
683
|
+
Name | Type | Description | Notes
|
684
|
+
------------- | ------------- | ------------- | -------------
|
685
|
+
**dtid** | **String**| Device type ID. |
|
686
|
+
**device_type_info** | [**DeviceTypesInfo**](DeviceTypesInfo.md)| Device type info object to be set |
|
687
|
+
|
688
|
+
### Return type
|
689
|
+
|
690
|
+
[**DeviceTypesInfoEnvelope**](DeviceTypesInfoEnvelope.md)
|
691
|
+
|
692
|
+
### Authorization
|
693
|
+
|
694
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
695
|
+
|
696
|
+
### HTTP request headers
|
697
|
+
|
698
|
+
- **Content-Type**: Not defined
|
699
|
+
- **Accept**: application/json
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
# **update_server_properties**
|
704
|
+
> MetadataEnvelope update_server_properties(did, device_properties)
|
705
|
+
|
706
|
+
Updates a device's server properties.
|
707
|
+
|
708
|
+
Updates a device's server properties.
|
709
|
+
|
710
|
+
### Example
|
711
|
+
```ruby
|
712
|
+
# load the gem
|
713
|
+
require 'artikcloud'
|
714
|
+
# setup authorization
|
715
|
+
ArtikCloud.configure do |config|
|
716
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
717
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
718
|
+
end
|
719
|
+
|
720
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
721
|
+
|
722
|
+
did = "did_example" # String | Device ID.
|
723
|
+
|
724
|
+
device_properties = nil # Object | Device properties object to be set
|
725
|
+
|
726
|
+
|
727
|
+
begin
|
728
|
+
#Updates a device's server properties.
|
729
|
+
result = api_instance.update_server_properties(did, device_properties)
|
730
|
+
p result
|
731
|
+
rescue ArtikCloud::ApiError => e
|
732
|
+
puts "Exception when calling DevicesManagementApi->update_server_properties: #{e}"
|
733
|
+
end
|
734
|
+
```
|
735
|
+
|
736
|
+
### Parameters
|
737
|
+
|
738
|
+
Name | Type | Description | Notes
|
739
|
+
------------- | ------------- | ------------- | -------------
|
740
|
+
**did** | **String**| Device ID. |
|
741
|
+
**device_properties** | **Object**| Device properties object to be set |
|
742
|
+
|
743
|
+
### Return type
|
744
|
+
|
745
|
+
[**MetadataEnvelope**](MetadataEnvelope.md)
|
746
|
+
|
747
|
+
### Authorization
|
748
|
+
|
749
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
750
|
+
|
751
|
+
### HTTP request headers
|
752
|
+
|
753
|
+
- **Content-Type**: Not defined
|
754
|
+
- **Accept**: application/json
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
# **update_task**
|
759
|
+
> TaskUpdateResponse update_task(tid, task_update_request)
|
760
|
+
|
761
|
+
Updates a task for all devices - For now just allows changing the state to cancelled.
|
762
|
+
|
763
|
+
Updates a task for all devices - For now just allows changing the state to cancelled.
|
764
|
+
|
765
|
+
### Example
|
766
|
+
```ruby
|
767
|
+
# load the gem
|
768
|
+
require 'artikcloud'
|
769
|
+
# setup authorization
|
770
|
+
ArtikCloud.configure do |config|
|
771
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
772
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
773
|
+
end
|
774
|
+
|
775
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
776
|
+
|
777
|
+
tid = "tid_example" # String | Task ID.
|
778
|
+
|
779
|
+
task_update_request = ArtikCloud::TaskUpdateRequest.new # TaskUpdateRequest | Task update request
|
780
|
+
|
781
|
+
|
782
|
+
begin
|
783
|
+
#Updates a task for all devices - For now just allows changing the state to cancelled.
|
784
|
+
result = api_instance.update_task(tid, task_update_request)
|
785
|
+
p result
|
786
|
+
rescue ArtikCloud::ApiError => e
|
787
|
+
puts "Exception when calling DevicesManagementApi->update_task: #{e}"
|
788
|
+
end
|
789
|
+
```
|
790
|
+
|
791
|
+
### Parameters
|
792
|
+
|
793
|
+
Name | Type | Description | Notes
|
794
|
+
------------- | ------------- | ------------- | -------------
|
795
|
+
**tid** | **String**| Task ID. |
|
796
|
+
**task_update_request** | [**TaskUpdateRequest**](TaskUpdateRequest.md)| Task update request |
|
797
|
+
|
798
|
+
### Return type
|
799
|
+
|
800
|
+
[**TaskUpdateResponse**](TaskUpdateResponse.md)
|
801
|
+
|
802
|
+
### Authorization
|
803
|
+
|
804
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
805
|
+
|
806
|
+
### HTTP request headers
|
807
|
+
|
808
|
+
- **Content-Type**: Not defined
|
809
|
+
- **Accept**: application/json
|
810
|
+
|
811
|
+
|
812
|
+
|
813
|
+
# **update_task_for_device**
|
814
|
+
> DeviceTaskUpdateResponse update_task_for_device(tid, did, device_task_update_request)
|
815
|
+
|
816
|
+
Updates a task for a specific device - For now just allows changing the state to cancelled.
|
817
|
+
|
818
|
+
Updates a task for a specific device - For now just allows changing the state to cancelled.
|
819
|
+
|
820
|
+
### Example
|
821
|
+
```ruby
|
822
|
+
# load the gem
|
823
|
+
require 'artikcloud'
|
824
|
+
# setup authorization
|
825
|
+
ArtikCloud.configure do |config|
|
826
|
+
# Configure OAuth2 access token for authorization: artikcloud_oauth
|
827
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
828
|
+
end
|
829
|
+
|
830
|
+
api_instance = ArtikCloud::DevicesManagementApi.new
|
831
|
+
|
832
|
+
tid = "tid_example" # String | Task ID.
|
833
|
+
|
834
|
+
did = "did_example" # String | Device ID.
|
835
|
+
|
836
|
+
device_task_update_request = ArtikCloud::DeviceTaskUpdateRequest.new # DeviceTaskUpdateRequest | Device task update request
|
837
|
+
|
838
|
+
|
839
|
+
begin
|
840
|
+
#Updates a task for a specific device - For now just allows changing the state to cancelled.
|
841
|
+
result = api_instance.update_task_for_device(tid, did, device_task_update_request)
|
842
|
+
p result
|
843
|
+
rescue ArtikCloud::ApiError => e
|
844
|
+
puts "Exception when calling DevicesManagementApi->update_task_for_device: #{e}"
|
845
|
+
end
|
846
|
+
```
|
847
|
+
|
848
|
+
### Parameters
|
849
|
+
|
850
|
+
Name | Type | Description | Notes
|
851
|
+
------------- | ------------- | ------------- | -------------
|
852
|
+
**tid** | **String**| Task ID. |
|
853
|
+
**did** | **String**| Device ID. |
|
854
|
+
**device_task_update_request** | [**DeviceTaskUpdateRequest**](DeviceTaskUpdateRequest.md)| Device task update request |
|
855
|
+
|
856
|
+
### Return type
|
857
|
+
|
858
|
+
[**DeviceTaskUpdateResponse**](DeviceTaskUpdateResponse.md)
|
859
|
+
|
860
|
+
### Authorization
|
861
|
+
|
862
|
+
[artikcloud_oauth](../README.md#artikcloud_oauth)
|
863
|
+
|
864
|
+
### HTTP request headers
|
865
|
+
|
866
|
+
- **Content-Type**: Not defined
|
867
|
+
- **Accept**: application/json
|
868
|
+
|
869
|
+
|
870
|
+
|