particle-api-js 10.6.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/particle.min.js +1 -1
- package/dist/particle.min.js.map +1 -1
- package/docs/api.md +255 -291
- package/package.json +1 -1
- package/src/Agent.js +10 -33
- package/src/EventStream.js +4 -1
- package/src/Particle.js +123 -169
- package/test/Agent.spec.js +0 -22
- package/test/EventStream.spec.js +4 -1
- package/test/Particle.spec.js +1 -57
package/docs/api.md
CHANGED
|
@@ -14,11 +14,9 @@
|
|
|
14
14
|
- [createUser](#createuser)
|
|
15
15
|
- [verifyUser](#verifyuser)
|
|
16
16
|
- [resetPassword](#resetpassword)
|
|
17
|
-
- [deleteAccessToken](#deleteaccesstoken)
|
|
18
17
|
- [deleteCurrentAccessToken](#deletecurrentaccesstoken)
|
|
19
18
|
- [deleteActiveAccessTokens](#deleteactiveaccesstokens)
|
|
20
19
|
- [deleteUser](#deleteuser)
|
|
21
|
-
- [listAccessTokens](#listaccesstokens)
|
|
22
20
|
- [trackingIdentity](#trackingidentity)
|
|
23
21
|
- [listDevices](#listdevices)
|
|
24
22
|
- [getDevice](#getdevice)
|
|
@@ -140,7 +138,7 @@
|
|
|
140
138
|
|
|
141
139
|
## Particle
|
|
142
140
|
|
|
143
|
-
[src/Particle.js:
|
|
141
|
+
[src/Particle.js:19-2810](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L19-L2810 "Source code on GitHub")
|
|
144
142
|
|
|
145
143
|
Particle Cloud API wrapper.
|
|
146
144
|
|
|
@@ -156,7 +154,7 @@ Most Particle methods take a single unnamed argument object documented as
|
|
|
156
154
|
|
|
157
155
|
### constructor
|
|
158
156
|
|
|
159
|
-
[src/Particle.js:
|
|
157
|
+
[src/Particle.js:32-41](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L32-L41 "Source code on GitHub")
|
|
160
158
|
|
|
161
159
|
Contructor for the Cloud API wrapper.
|
|
162
160
|
|
|
@@ -169,11 +167,11 @@ Create a new Particle object and call methods below on it.
|
|
|
169
167
|
- `options.clientSecret` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?**
|
|
170
168
|
- `options.clientId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?**
|
|
171
169
|
- `options.tokenDuration` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?**
|
|
172
|
-
- `options.auth` **
|
|
170
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. If not specified here, will have to be added to every request
|
|
173
171
|
|
|
174
172
|
### login
|
|
175
173
|
|
|
176
|
-
[src/Particle.js:
|
|
174
|
+
[src/Particle.js:78-95](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L78-L95 "Source code on GitHub")
|
|
177
175
|
|
|
178
176
|
Login to Particle Cloud using an existing Particle acccount.
|
|
179
177
|
|
|
@@ -190,7 +188,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
190
188
|
|
|
191
189
|
### sendOtp
|
|
192
190
|
|
|
193
|
-
[src/Particle.js:
|
|
191
|
+
[src/Particle.js:106-122](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L106-L122 "Source code on GitHub")
|
|
194
192
|
|
|
195
193
|
If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login
|
|
196
194
|
|
|
@@ -206,14 +204,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
206
204
|
|
|
207
205
|
### enableMfa
|
|
208
206
|
|
|
209
|
-
[src/Particle.js:
|
|
207
|
+
[src/Particle.js:132-134](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L132-L134 "Source code on GitHub")
|
|
210
208
|
|
|
211
209
|
Enable MFA on the currently logged in user
|
|
212
210
|
|
|
213
211
|
**Parameters**
|
|
214
212
|
|
|
215
213
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
216
|
-
- `options.auth` **
|
|
214
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
217
215
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
218
216
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
219
217
|
|
|
@@ -221,7 +219,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
221
219
|
|
|
222
220
|
### confirmMfa
|
|
223
221
|
|
|
224
|
-
[src/Particle.js:
|
|
222
|
+
[src/Particle.js:147-161](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L147-L161 "Source code on GitHub")
|
|
225
223
|
|
|
226
224
|
Confirm MFA for the user. This must be called with current TOTP code, determined from the results of enableMfa(). You will be prompted to enter an OTP code every time you login after enrollment is confirmed.
|
|
227
225
|
|
|
@@ -231,7 +229,7 @@ Confirm MFA for the user. This must be called with current TOTP code, determined
|
|
|
231
229
|
- `options.mfaToken` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Token given from previous step to
|
|
232
230
|
- `options.otp` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Current one-time-password generated from the authentication app
|
|
233
231
|
- `options.invalidateTokens` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Should all tokens be invalidated (optional, default `false`)
|
|
234
|
-
- `options.auth` **
|
|
232
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
235
233
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
236
234
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
237
235
|
|
|
@@ -239,7 +237,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
239
237
|
|
|
240
238
|
### disableMfa
|
|
241
239
|
|
|
242
|
-
[src/Particle.js:
|
|
240
|
+
[src/Particle.js:172-180](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L172-L180 "Source code on GitHub")
|
|
243
241
|
|
|
244
242
|
Disable MFA for the user.
|
|
245
243
|
|
|
@@ -247,7 +245,7 @@ Disable MFA for the user.
|
|
|
247
245
|
|
|
248
246
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
249
247
|
- `options.currentPassword` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** User's current password
|
|
250
|
-
- `options.auth` **
|
|
248
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
251
249
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
252
250
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
253
251
|
|
|
@@ -255,7 +253,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
255
253
|
|
|
256
254
|
### createCustomer
|
|
257
255
|
|
|
258
|
-
[src/Particle.js:
|
|
256
|
+
[src/Particle.js:192-208](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L192-L208 "Source code on GitHub")
|
|
259
257
|
|
|
260
258
|
Create Customer for Product.
|
|
261
259
|
|
|
@@ -272,7 +270,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
272
270
|
|
|
273
271
|
### loginAsClientOwner
|
|
274
272
|
|
|
275
|
-
[src/Particle.js:
|
|
273
|
+
[src/Particle.js:217-231](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L217-L231 "Source code on GitHub")
|
|
276
274
|
|
|
277
275
|
Login to Particle Cloud using an OAuth client.
|
|
278
276
|
|
|
@@ -286,7 +284,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
286
284
|
|
|
287
285
|
### createUser
|
|
288
286
|
|
|
289
|
-
[src/Particle.js:
|
|
287
|
+
[src/Particle.js:244-256](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L244-L256 "Source code on GitHub")
|
|
290
288
|
|
|
291
289
|
Create a user account for the Particle Cloud
|
|
292
290
|
|
|
@@ -304,7 +302,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
304
302
|
|
|
305
303
|
### verifyUser
|
|
306
304
|
|
|
307
|
-
[src/Particle.js:
|
|
305
|
+
[src/Particle.js:266-273](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L266-L273 "Source code on GitHub")
|
|
308
306
|
|
|
309
307
|
Verify new user account via verification email
|
|
310
308
|
|
|
@@ -319,7 +317,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
319
317
|
|
|
320
318
|
### resetPassword
|
|
321
319
|
|
|
322
|
-
[src/Particle.js:
|
|
320
|
+
[src/Particle.js:283-290](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L283-L290 "Source code on GitHub")
|
|
323
321
|
|
|
324
322
|
Send reset password email for a Particle Cloud user account
|
|
325
323
|
|
|
@@ -332,33 +330,16 @@ Send reset password email for a Particle Cloud user account
|
|
|
332
330
|
|
|
333
331
|
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** A promise
|
|
334
332
|
|
|
335
|
-
### deleteAccessToken
|
|
336
|
-
|
|
337
|
-
[src/Particle.js:303-311](https://github.com/spark/particle-api-js/blob/be140b28fba0636f389ec10a4fe492586de434c8/src/Particle.js#L303-L311 "Source code on GitHub")
|
|
338
|
-
|
|
339
|
-
Revoke an access token
|
|
340
|
-
|
|
341
|
-
**Parameters**
|
|
342
|
-
|
|
343
|
-
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
344
|
-
- `options.username` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Username of the Particle cloud account that the token belongs to.
|
|
345
|
-
- `options.password` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Password for the account
|
|
346
|
-
- `options.token` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Access token you wish to revoke
|
|
347
|
-
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
348
|
-
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
349
|
-
|
|
350
|
-
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** A promise
|
|
351
|
-
|
|
352
333
|
### deleteCurrentAccessToken
|
|
353
334
|
|
|
354
|
-
[src/Particle.js:
|
|
335
|
+
[src/Particle.js:300-307](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L300-L307 "Source code on GitHub")
|
|
355
336
|
|
|
356
337
|
Revoke the current session access token
|
|
357
338
|
|
|
358
339
|
**Parameters**
|
|
359
340
|
|
|
360
341
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
361
|
-
- `options.auth` **
|
|
342
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
362
343
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
363
344
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
364
345
|
|
|
@@ -366,14 +347,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
366
347
|
|
|
367
348
|
### deleteActiveAccessTokens
|
|
368
349
|
|
|
369
|
-
[src/Particle.js:
|
|
350
|
+
[src/Particle.js:317-324](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L317-L324 "Source code on GitHub")
|
|
370
351
|
|
|
371
352
|
Revoke all active access tokens
|
|
372
353
|
|
|
373
354
|
**Parameters**
|
|
374
355
|
|
|
375
356
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
376
|
-
- `options.auth` **
|
|
357
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
377
358
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
378
359
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
379
360
|
|
|
@@ -381,32 +362,15 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
381
362
|
|
|
382
363
|
### deleteUser
|
|
383
364
|
|
|
384
|
-
[src/Particle.js:
|
|
365
|
+
[src/Particle.js:335-343](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L335-L343 "Source code on GitHub")
|
|
385
366
|
|
|
386
367
|
Delete the current user
|
|
387
368
|
|
|
388
369
|
**Parameters**
|
|
389
370
|
|
|
390
371
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
391
|
-
- `options.auth` **
|
|
392
|
-
- `options.password` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Password
|
|
393
|
-
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
394
|
-
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
395
|
-
|
|
396
|
-
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** A promise
|
|
397
|
-
|
|
398
|
-
### listAccessTokens
|
|
399
|
-
|
|
400
|
-
[src/Particle.js:376-384](https://github.com/spark/particle-api-js/blob/be140b28fba0636f389ec10a4fe492586de434c8/src/Particle.js#L376-L384 "Source code on GitHub")
|
|
401
|
-
|
|
402
|
-
List all valid access tokens for a Particle Cloud account
|
|
403
|
-
|
|
404
|
-
**Parameters**
|
|
405
|
-
|
|
406
|
-
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
407
|
-
- `options.username` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Username
|
|
372
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
408
373
|
- `options.password` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Password
|
|
409
|
-
- `options.otp` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Current one-time-password generated from the authentication application
|
|
410
374
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
411
375
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
412
376
|
|
|
@@ -414,7 +378,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
414
378
|
|
|
415
379
|
### trackingIdentity
|
|
416
380
|
|
|
417
|
-
[src/Particle.js:
|
|
381
|
+
[src/Particle.js:355-363](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L355-L363 "Source code on GitHub")
|
|
418
382
|
|
|
419
383
|
Retrieves the information that is used to identify the current login for tracking.
|
|
420
384
|
|
|
@@ -423,7 +387,7 @@ Retrieves the information that is used to identify the current login for trackin
|
|
|
423
387
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Options for this API call (optional, default `{}`)
|
|
424
388
|
- `options.full` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** When true, retrieve all information for registering a user with the tracking API. When false,
|
|
425
389
|
retrieve only the unique tracking ID for the current login. (optional, default `false`)
|
|
426
|
-
- `options.auth` **
|
|
390
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
427
391
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
428
392
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
429
393
|
|
|
@@ -431,7 +395,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
431
395
|
|
|
432
396
|
### listDevices
|
|
433
397
|
|
|
434
|
-
[src/Particle.js:
|
|
398
|
+
[src/Particle.js:381-400](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L381-L400 "Source code on GitHub")
|
|
435
399
|
|
|
436
400
|
List devices claimed to the account or product
|
|
437
401
|
|
|
@@ -446,7 +410,7 @@ List devices claimed to the account or product
|
|
|
446
410
|
- `options.page` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** (Product only) Current page of results
|
|
447
411
|
- `options.perPage` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** (Product only) Records per page
|
|
448
412
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** List devices in this product ID or slug
|
|
449
|
-
- `options.auth` **
|
|
413
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
450
414
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
451
415
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
452
416
|
|
|
@@ -454,7 +418,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
454
418
|
|
|
455
419
|
### getDevice
|
|
456
420
|
|
|
457
|
-
[src/Particle.js:
|
|
421
|
+
[src/Particle.js:412-415](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L412-L415 "Source code on GitHub")
|
|
458
422
|
|
|
459
423
|
Get detailed informationa about a device
|
|
460
424
|
|
|
@@ -463,7 +427,7 @@ Get detailed informationa about a device
|
|
|
463
427
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
464
428
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
465
429
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
466
|
-
- `options.auth` **
|
|
430
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
467
431
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
468
432
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
469
433
|
|
|
@@ -471,7 +435,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
471
435
|
|
|
472
436
|
### claimDevice
|
|
473
437
|
|
|
474
|
-
[src/Particle.js:
|
|
438
|
+
[src/Particle.js:427-438](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L427-L438 "Source code on GitHub")
|
|
475
439
|
|
|
476
440
|
Claim a device to the account. The device must be online and unclaimed.
|
|
477
441
|
|
|
@@ -480,7 +444,7 @@ Claim a device to the account. The device must be online and unclaimed.
|
|
|
480
444
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
481
445
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID
|
|
482
446
|
- `options.requestTransfer` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** True to request the device be transfered from another user
|
|
483
|
-
- `options.auth` **
|
|
447
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
484
448
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
485
449
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
486
450
|
|
|
@@ -488,7 +452,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
488
452
|
|
|
489
453
|
### addDeviceToProduct
|
|
490
454
|
|
|
491
|
-
[src/Particle.js:
|
|
455
|
+
[src/Particle.js:452-470](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L452-L470 "Source code on GitHub")
|
|
492
456
|
|
|
493
457
|
Add a device to a product or move device out of quarantine.
|
|
494
458
|
|
|
@@ -499,7 +463,7 @@ Add a device to a product or move device out of quarantine.
|
|
|
499
463
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add to this product ID or slug
|
|
500
464
|
- `options.file` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** A file that contains a single-column list of device IDs, device serial numbers, device IMEIs, or devie ICCIDs.
|
|
501
465
|
Node: Either a path or Buffer. Browser: a File or Blob.
|
|
502
|
-
- `options.auth` **
|
|
466
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
503
467
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
504
468
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
505
469
|
|
|
@@ -507,7 +471,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
507
471
|
|
|
508
472
|
### removeDevice
|
|
509
473
|
|
|
510
|
-
[src/Particle.js:
|
|
474
|
+
[src/Particle.js:483-487](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L483-L487 "Source code on GitHub")
|
|
511
475
|
|
|
512
476
|
Unclaim / Remove a device from your account or product, or deny quarantine
|
|
513
477
|
|
|
@@ -517,7 +481,7 @@ Unclaim / Remove a device from your account or product, or deny quarantine
|
|
|
517
481
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
518
482
|
- `options.deny` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** (Product only) Deny this quarantined device, instead of removing an already approved device
|
|
519
483
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Remove from this product ID or slug
|
|
520
|
-
- `options.auth` **
|
|
484
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
521
485
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
522
486
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
523
487
|
|
|
@@ -525,7 +489,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
525
489
|
|
|
526
490
|
### removeDeviceOwner
|
|
527
491
|
|
|
528
|
-
[src/Particle.js:
|
|
492
|
+
[src/Particle.js:499-502](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L499-L502 "Source code on GitHub")
|
|
529
493
|
|
|
530
494
|
Unclaim a product device its the owner, but keep it in the product
|
|
531
495
|
|
|
@@ -534,7 +498,7 @@ Unclaim a product device its the owner, but keep it in the product
|
|
|
534
498
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
535
499
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
536
500
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Remove from this product ID or slug
|
|
537
|
-
- `options.auth` **
|
|
501
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
538
502
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
539
503
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
540
504
|
|
|
@@ -542,7 +506,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
542
506
|
|
|
543
507
|
### renameDevice
|
|
544
508
|
|
|
545
|
-
[src/Particle.js:
|
|
509
|
+
[src/Particle.js:515-517](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L515-L517 "Source code on GitHub")
|
|
546
510
|
|
|
547
511
|
Rename a device
|
|
548
512
|
|
|
@@ -552,7 +516,7 @@ Rename a device
|
|
|
552
516
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
553
517
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Desired Name
|
|
554
518
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Rename device in this product ID or slug
|
|
555
|
-
- `options.auth` **
|
|
519
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
556
520
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
557
521
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
558
522
|
|
|
@@ -560,7 +524,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
560
524
|
|
|
561
525
|
### signalDevice
|
|
562
526
|
|
|
563
|
-
[src/Particle.js:
|
|
527
|
+
[src/Particle.js:530-532](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L530-L532 "Source code on GitHub")
|
|
564
528
|
|
|
565
529
|
Instruct the device to turn on/off the LED in a rainbow pattern
|
|
566
530
|
|
|
@@ -570,7 +534,7 @@ Instruct the device to turn on/off the LED in a rainbow pattern
|
|
|
570
534
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
571
535
|
- `options.signal` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Signal on or off
|
|
572
536
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
573
|
-
- `options.auth` **
|
|
537
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
574
538
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
575
539
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
576
540
|
|
|
@@ -578,7 +542,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
578
542
|
|
|
579
543
|
### setDeviceNotes
|
|
580
544
|
|
|
581
|
-
[src/Particle.js:
|
|
545
|
+
[src/Particle.js:545-547](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L545-L547 "Source code on GitHub")
|
|
582
546
|
|
|
583
547
|
Store some notes about device
|
|
584
548
|
|
|
@@ -588,7 +552,7 @@ Store some notes about device
|
|
|
588
552
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
589
553
|
- `options.notes` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Your notes about this device
|
|
590
554
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
591
|
-
- `options.auth` **
|
|
555
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
592
556
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
593
557
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
594
558
|
|
|
@@ -596,7 +560,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
596
560
|
|
|
597
561
|
### markAsDevelopmentDevice
|
|
598
562
|
|
|
599
|
-
[src/Particle.js:
|
|
563
|
+
[src/Particle.js:560-562](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L560-L562 "Source code on GitHub")
|
|
600
564
|
|
|
601
565
|
Mark device as being used in development of a product so it opts out of automatic firmware updates
|
|
602
566
|
|
|
@@ -606,7 +570,7 @@ Mark device as being used in development of a product so it opts out of automati
|
|
|
606
570
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
607
571
|
- `options.development` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Set to true to mark as development, false to return to product fleet (optional, default `true`)
|
|
608
572
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device in this product ID or slug
|
|
609
|
-
- `options.auth` **
|
|
573
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
610
574
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
611
575
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
612
576
|
|
|
@@ -614,7 +578,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
614
578
|
|
|
615
579
|
### lockDeviceProductFirmware
|
|
616
580
|
|
|
617
|
-
[src/Particle.js:
|
|
581
|
+
[src/Particle.js:576-578](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L576-L578 "Source code on GitHub")
|
|
618
582
|
|
|
619
583
|
Mark device as being used in development of a product, so it opts out of automatic firmware updates
|
|
620
584
|
|
|
@@ -625,7 +589,7 @@ Mark device as being used in development of a product, so it opts out of automat
|
|
|
625
589
|
- `options.desiredFirmwareVersion` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Lock the product device to run this firmware version.
|
|
626
590
|
- `options.flash` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Immediately flash firmware indicated by desiredFirmwareVersion
|
|
627
591
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device in this product ID or slug
|
|
628
|
-
- `options.auth` **
|
|
592
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
629
593
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
630
594
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
631
595
|
|
|
@@ -633,7 +597,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
633
597
|
|
|
634
598
|
### unlockDeviceProductFirmware
|
|
635
599
|
|
|
636
|
-
[src/Particle.js:
|
|
600
|
+
[src/Particle.js:590-592](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L590-L592 "Source code on GitHub")
|
|
637
601
|
|
|
638
602
|
Mark device as receiving automatic firmware updates
|
|
639
603
|
|
|
@@ -642,7 +606,7 @@ Mark device as receiving automatic firmware updates
|
|
|
642
606
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
643
607
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
644
608
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device in this product ID or slug
|
|
645
|
-
- `options.auth` **
|
|
609
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
646
610
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
647
611
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
648
612
|
|
|
@@ -650,7 +614,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
650
614
|
|
|
651
615
|
### updateDevice
|
|
652
616
|
|
|
653
|
-
[src/Particle.js:
|
|
617
|
+
[src/Particle.js:611-623](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L611-L623 "Source code on GitHub")
|
|
654
618
|
|
|
655
619
|
Update multiple device attributes at the same time
|
|
656
620
|
|
|
@@ -666,7 +630,7 @@ Update multiple device attributes at the same time
|
|
|
666
630
|
Pass `null` to unlock firmware and go back to released firmware.
|
|
667
631
|
- `options.flash` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** (Product only) Immediately flash firmware indicated by desiredFirmwareVersion
|
|
668
632
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
669
|
-
- `options.auth` **
|
|
633
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
670
634
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
671
635
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
672
636
|
|
|
@@ -674,7 +638,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
674
638
|
|
|
675
639
|
### unprotectDevice
|
|
676
640
|
|
|
677
|
-
[src/Particle.js:
|
|
641
|
+
[src/Particle.js:643-659](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L643-L659 "Source code on GitHub")
|
|
678
642
|
|
|
679
643
|
Disable device protection.
|
|
680
644
|
|
|
@@ -690,7 +654,7 @@ Disable device protection.
|
|
|
690
654
|
- `options.deviceSignature` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Base64-encoded device signature. Mandatory if `action` is `confirm`,
|
|
691
655
|
- `options.devicePublicKeyFingerprint` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Base64-encoded fingerprint of the device public key.
|
|
692
656
|
Mandatory if `action` is `confirm`,
|
|
693
|
-
- `options.auth` **
|
|
657
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor.
|
|
694
658
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/value pairs to send as headers.
|
|
695
659
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context.
|
|
696
660
|
|
|
@@ -698,7 +662,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
698
662
|
|
|
699
663
|
### provisionDevice
|
|
700
664
|
|
|
701
|
-
[src/Particle.js:
|
|
665
|
+
[src/Particle.js:670-678](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L670-L678 "Source code on GitHub")
|
|
702
666
|
|
|
703
667
|
Provision a new device for products that allow self-provisioning
|
|
704
668
|
|
|
@@ -706,7 +670,7 @@ Provision a new device for products that allow self-provisioning
|
|
|
706
670
|
|
|
707
671
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
708
672
|
- `options.productId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Product ID where to create this device
|
|
709
|
-
- `options.auth` **
|
|
673
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
710
674
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
711
675
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
712
676
|
|
|
@@ -714,7 +678,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
714
678
|
|
|
715
679
|
### getClaimCode
|
|
716
680
|
|
|
717
|
-
[src/Particle.js:
|
|
681
|
+
[src/Particle.js:692-695](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L692-L695 "Source code on GitHub")
|
|
718
682
|
|
|
719
683
|
Generate a claim code to use in the device claiming process.
|
|
720
684
|
To generate a claim code for a product, the access token MUST belong to a
|
|
@@ -725,7 +689,7 @@ customer of the product.
|
|
|
725
689
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
726
690
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ICCID of the SIM card used in the Electron
|
|
727
691
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
728
|
-
- `options.auth` **
|
|
692
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
729
693
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
730
694
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
731
695
|
|
|
@@ -733,7 +697,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
733
697
|
|
|
734
698
|
### getVariable
|
|
735
699
|
|
|
736
|
-
[src/Particle.js:
|
|
700
|
+
[src/Particle.js:717-723](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L717-L723 "Source code on GitHub")
|
|
737
701
|
|
|
738
702
|
Get the value of a device variable
|
|
739
703
|
|
|
@@ -743,7 +707,7 @@ Get the value of a device variable
|
|
|
743
707
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
744
708
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Variable name
|
|
745
709
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
746
|
-
- `options.auth` **
|
|
710
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
747
711
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
748
712
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
749
713
|
|
|
@@ -751,7 +715,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
751
715
|
|
|
752
716
|
### flashDevice
|
|
753
717
|
|
|
754
|
-
[src/Particle.js:
|
|
718
|
+
[src/Particle.js:737-748](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L737-L748 "Source code on GitHub")
|
|
755
719
|
|
|
756
720
|
Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device.
|
|
757
721
|
|
|
@@ -762,7 +726,7 @@ Compile and flash application firmware to a device. Pass a pre-compiled binary t
|
|
|
762
726
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Flash device in this product ID or slug
|
|
763
727
|
- `options.files` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object containing files to be compiled and flashed. Keys should be the filenames, including relative path, and the values should be a path or Buffer of the file contents in Node, or a File or Blob in the browser.
|
|
764
728
|
- `options.targetVersion` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** System firmware version to compile against (optional, default `latest`)
|
|
765
|
-
- `options.auth` **
|
|
729
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
766
730
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
767
731
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
768
732
|
|
|
@@ -770,7 +734,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
770
734
|
|
|
771
735
|
### flashTinker
|
|
772
736
|
|
|
773
|
-
[src/Particle.js:
|
|
737
|
+
[src/Particle.js:759-774](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L759-L774 "Source code on GitHub")
|
|
774
738
|
|
|
775
739
|
DEPRECATED: Flash the Tinker application to a device. Instead compile and flash the Tinker source code.
|
|
776
740
|
|
|
@@ -778,7 +742,7 @@ DEPRECATED: Flash the Tinker application to a device. Instead compile and flash
|
|
|
778
742
|
|
|
779
743
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
780
744
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
781
|
-
- `options.auth` **
|
|
745
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
782
746
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
783
747
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
784
748
|
|
|
@@ -786,7 +750,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
786
750
|
|
|
787
751
|
### compileCode
|
|
788
752
|
|
|
789
|
-
[src/Particle.js:
|
|
753
|
+
[src/Particle.js:787-805](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L787-L805 "Source code on GitHub")
|
|
790
754
|
|
|
791
755
|
Compile firmware using the Particle Cloud
|
|
792
756
|
|
|
@@ -796,7 +760,7 @@ Compile firmware using the Particle Cloud
|
|
|
796
760
|
- `options.files` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object containing files to be compiled. Keys should be the filenames, including relative path, and the values should be a path or Buffer of the file contents in Node, or a File or Blob in the browser.
|
|
797
761
|
- `options.platformId` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Platform id number of the device you are compiling for. Common values are 0=Core, 6=Photon, 10=Electron.
|
|
798
762
|
- `options.targetVersion` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** System firmware version to compile against (optional, default `latest`)
|
|
799
|
-
- `options.auth` **
|
|
763
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
800
764
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
801
765
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
802
766
|
|
|
@@ -804,7 +768,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
804
768
|
|
|
805
769
|
### downloadFirmwareBinary
|
|
806
770
|
|
|
807
|
-
[src/Particle.js:
|
|
771
|
+
[src/Particle.js:816-825](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L816-L825 "Source code on GitHub")
|
|
808
772
|
|
|
809
773
|
Download a firmware binary
|
|
810
774
|
|
|
@@ -812,7 +776,7 @@ Download a firmware binary
|
|
|
812
776
|
|
|
813
777
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
814
778
|
- `options.binaryId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Binary ID received from a successful compile call
|
|
815
|
-
- `options.auth` **
|
|
779
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
816
780
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
817
781
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
818
782
|
|
|
@@ -820,7 +784,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
820
784
|
|
|
821
785
|
### sendPublicKey
|
|
822
786
|
|
|
823
|
-
[src/Particle.js:
|
|
787
|
+
[src/Particle.js:838-852](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L838-L852 "Source code on GitHub")
|
|
824
788
|
|
|
825
789
|
Send a new device public key to the Particle Cloud
|
|
826
790
|
|
|
@@ -830,7 +794,7 @@ Send a new device public key to the Particle Cloud
|
|
|
830
794
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID or Name
|
|
831
795
|
- `options.key` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** Public key contents
|
|
832
796
|
- `options.algorithm` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Algorithm used to generate the public key. Valid values are `rsa` or `ecc`. (optional, default `rsa`)
|
|
833
|
-
- `options.auth` **
|
|
797
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
834
798
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
835
799
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
836
800
|
|
|
@@ -838,7 +802,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
838
802
|
|
|
839
803
|
### callFunction
|
|
840
804
|
|
|
841
|
-
[src/Particle.js:
|
|
805
|
+
[src/Particle.js:866-871](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L866-L871 "Source code on GitHub")
|
|
842
806
|
|
|
843
807
|
Call a device function
|
|
844
808
|
|
|
@@ -849,7 +813,7 @@ Call a device function
|
|
|
849
813
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Function name
|
|
850
814
|
- `options.argument` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Function argument
|
|
851
815
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Device in this product ID or slug
|
|
852
|
-
- `options.auth` **
|
|
816
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
853
817
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
854
818
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
855
819
|
|
|
@@ -857,7 +821,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
857
821
|
|
|
858
822
|
### getEventStream
|
|
859
823
|
|
|
860
|
-
[src/Particle.js:
|
|
824
|
+
[src/Particle.js:884-909](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L884-L909 "Source code on GitHub")
|
|
861
825
|
|
|
862
826
|
Get a stream of events
|
|
863
827
|
|
|
@@ -868,14 +832,14 @@ Get a stream of events
|
|
|
868
832
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Event Name
|
|
869
833
|
- `options.org` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Organization Slug
|
|
870
834
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Events for this product ID or slug
|
|
871
|
-
- `options.auth` **
|
|
835
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
872
836
|
|
|
873
837
|
Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)** If the promise resolves, the resolution value will be an EventStream object that will
|
|
874
838
|
emit 'event' events.
|
|
875
839
|
|
|
876
840
|
### publishEvent
|
|
877
841
|
|
|
878
|
-
[src/Particle.js:
|
|
842
|
+
[src/Particle.js:923-927](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L923-L927 "Source code on GitHub")
|
|
879
843
|
|
|
880
844
|
Publish a event to the Particle Cloud
|
|
881
845
|
|
|
@@ -886,7 +850,7 @@ Publish a event to the Particle Cloud
|
|
|
886
850
|
- `options.data` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Event data
|
|
887
851
|
- `options.isPrivate` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Should the event be publicly available?
|
|
888
852
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Event for this product ID or slug
|
|
889
|
-
- `options.auth` **
|
|
853
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
890
854
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
891
855
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
892
856
|
|
|
@@ -894,7 +858,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
894
858
|
|
|
895
859
|
### Hook
|
|
896
860
|
|
|
897
|
-
[src/Particle.js:
|
|
861
|
+
[src/Particle.js:958-980](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L958-L980 "Source code on GitHub")
|
|
898
862
|
|
|
899
863
|
Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
900
864
|
|
|
@@ -915,7 +879,7 @@ Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
|
|
|
915
879
|
**Properties**
|
|
916
880
|
|
|
917
881
|
- `method` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Type of web request triggered by the Webhook (GET, POST, PUT, or DELETE)
|
|
918
|
-
- `auth` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Auth data like `{
|
|
882
|
+
- `auth` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Auth data like `{ user: 'me', pass: '1234' }` for basic auth or `{ bearer: 'token' }` to send with the Webhook request
|
|
919
883
|
- `headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to add to the Webhook like `{ 'X-ONE': '1', X-TWO: '2' }`
|
|
920
884
|
- `query` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Query params to add to the Webhook request like `{ foo: 'foo', bar: 'bar' }`
|
|
921
885
|
- `json` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** JSON data to send with the Webhook request - sets `Content-Type` to `application/json`
|
|
@@ -927,7 +891,7 @@ Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
|
|
|
927
891
|
|
|
928
892
|
### createWebhook
|
|
929
893
|
|
|
930
|
-
[src/Particle.js:
|
|
894
|
+
[src/Particle.js:958-980](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L958-L980 "Source code on GitHub")
|
|
931
895
|
|
|
932
896
|
Create a webhook
|
|
933
897
|
|
|
@@ -941,7 +905,7 @@ Create a webhook
|
|
|
941
905
|
- `options.noDefaults` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Don't include default event data in the webhook request
|
|
942
906
|
- `options.hook` **Hook?** Webhook configuration settings
|
|
943
907
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Webhook for this product ID or slug
|
|
944
|
-
- `options.auth` **
|
|
908
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
945
909
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
946
910
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
947
911
|
|
|
@@ -949,7 +913,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
949
913
|
|
|
950
914
|
### deleteWebhook
|
|
951
915
|
|
|
952
|
-
[src/Particle.js:
|
|
916
|
+
[src/Particle.js:992-995](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L992-L995 "Source code on GitHub")
|
|
953
917
|
|
|
954
918
|
Delete a webhook
|
|
955
919
|
|
|
@@ -958,7 +922,7 @@ Delete a webhook
|
|
|
958
922
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
959
923
|
- `options.hookId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Webhook ID
|
|
960
924
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Webhook for this product ID or slug
|
|
961
|
-
- `options.auth` **
|
|
925
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
962
926
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
963
927
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
964
928
|
|
|
@@ -966,7 +930,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
966
930
|
|
|
967
931
|
### listWebhooks
|
|
968
932
|
|
|
969
|
-
[src/Particle.js:
|
|
933
|
+
[src/Particle.js:1006-1009](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1006-L1009 "Source code on GitHub")
|
|
970
934
|
|
|
971
935
|
List all webhooks owned by the account or product
|
|
972
936
|
|
|
@@ -974,7 +938,7 @@ List all webhooks owned by the account or product
|
|
|
974
938
|
|
|
975
939
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
976
940
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Webhooks for this product ID or slug
|
|
977
|
-
- `options.auth` **
|
|
941
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
978
942
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
979
943
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
980
944
|
|
|
@@ -982,7 +946,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
982
946
|
|
|
983
947
|
### createIntegration
|
|
984
948
|
|
|
985
|
-
[src/Particle.js:
|
|
949
|
+
[src/Particle.js:1026-1030](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1026-L1030 "Source code on GitHub")
|
|
986
950
|
|
|
987
951
|
Create an integration to send events to an external service
|
|
988
952
|
|
|
@@ -995,7 +959,7 @@ See the API docs for details <https://docs.particle.io/reference/api/#integratio
|
|
|
995
959
|
- `options.settings` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Settings specific to that integration type
|
|
996
960
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Trigger integration only for this device ID or Name
|
|
997
961
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Integration for this product ID or slug
|
|
998
|
-
- `options.auth` **
|
|
962
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
999
963
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1000
964
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1001
965
|
|
|
@@ -1003,7 +967,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1003
967
|
|
|
1004
968
|
### editIntegration
|
|
1005
969
|
|
|
1006
|
-
[src/Particle.js:
|
|
970
|
+
[src/Particle.js:1048-1052](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1048-L1052 "Source code on GitHub")
|
|
1007
971
|
|
|
1008
972
|
Edit an integration to send events to an external service
|
|
1009
973
|
|
|
@@ -1017,7 +981,7 @@ See the API docs for details <https://docs.particle.io/reference/api/#integratio
|
|
|
1017
981
|
- `options.settings` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Change the settings specific to that integration type
|
|
1018
982
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Trigger integration only for this device ID or Name
|
|
1019
983
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Integration for this product ID or slug
|
|
1020
|
-
- `options.auth` **
|
|
984
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1021
985
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1022
986
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1023
987
|
|
|
@@ -1025,7 +989,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1025
989
|
|
|
1026
990
|
### deleteIntegration
|
|
1027
991
|
|
|
1028
|
-
[src/Particle.js:
|
|
992
|
+
[src/Particle.js:1065-1068](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1065-L1068 "Source code on GitHub")
|
|
1029
993
|
|
|
1030
994
|
Delete an integration to send events to an external service
|
|
1031
995
|
|
|
@@ -1034,7 +998,7 @@ Delete an integration to send events to an external service
|
|
|
1034
998
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1035
999
|
- `options.integrationId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The integration to remove
|
|
1036
1000
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Integration for this product ID or slug
|
|
1037
|
-
- `options.auth` **
|
|
1001
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1038
1002
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1039
1003
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1040
1004
|
|
|
@@ -1042,7 +1006,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1042
1006
|
|
|
1043
1007
|
### listIntegrations
|
|
1044
1008
|
|
|
1045
|
-
[src/Particle.js:
|
|
1009
|
+
[src/Particle.js:1079-1082](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1079-L1082 "Source code on GitHub")
|
|
1046
1010
|
|
|
1047
1011
|
List all integrations owned by the account or product
|
|
1048
1012
|
|
|
@@ -1050,7 +1014,7 @@ List all integrations owned by the account or product
|
|
|
1050
1014
|
|
|
1051
1015
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1052
1016
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Integrations for this product ID or slug
|
|
1053
|
-
- `options.auth` **
|
|
1017
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1054
1018
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1055
1019
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1056
1020
|
|
|
@@ -1058,14 +1022,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1058
1022
|
|
|
1059
1023
|
### getUserInfo
|
|
1060
1024
|
|
|
1061
|
-
[src/Particle.js:
|
|
1025
|
+
[src/Particle.js:1092-1094](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1092-L1094 "Source code on GitHub")
|
|
1062
1026
|
|
|
1063
1027
|
Get details about the current user
|
|
1064
1028
|
|
|
1065
1029
|
**Parameters**
|
|
1066
1030
|
|
|
1067
1031
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1068
|
-
- `options.auth` **
|
|
1032
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1069
1033
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1070
1034
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1071
1035
|
|
|
@@ -1073,7 +1037,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1073
1037
|
|
|
1074
1038
|
### setUserInfo
|
|
1075
1039
|
|
|
1076
|
-
[src/Particle.js:
|
|
1040
|
+
[src/Particle.js:1105-1108](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1105-L1108 "Source code on GitHub")
|
|
1077
1041
|
|
|
1078
1042
|
Set details on the current user
|
|
1079
1043
|
|
|
@@ -1081,7 +1045,7 @@ Set details on the current user
|
|
|
1081
1045
|
|
|
1082
1046
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1083
1047
|
- `options.accountInfo` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Set user's extended info fields (name, business account, company name, etc)
|
|
1084
|
-
- `options.auth` **
|
|
1048
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1085
1049
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1086
1050
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1087
1051
|
|
|
@@ -1089,7 +1053,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1089
1053
|
|
|
1090
1054
|
### changeUsername
|
|
1091
1055
|
|
|
1092
|
-
[src/Particle.js:
|
|
1056
|
+
[src/Particle.js:1121-1129](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1121-L1129 "Source code on GitHub")
|
|
1093
1057
|
|
|
1094
1058
|
Change username (i.e, email)
|
|
1095
1059
|
|
|
@@ -1099,7 +1063,7 @@ Change username (i.e, email)
|
|
|
1099
1063
|
- `options.currentPassword` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Current password
|
|
1100
1064
|
- `options.username` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** New email
|
|
1101
1065
|
- `options.invalidateTokens` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Should all tokens be invalidated (optional, default `false`)
|
|
1102
|
-
- `options.auth` **
|
|
1066
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1103
1067
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1104
1068
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1105
1069
|
|
|
@@ -1107,7 +1071,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1107
1071
|
|
|
1108
1072
|
### changeUserPassword
|
|
1109
1073
|
|
|
1110
|
-
[src/Particle.js:
|
|
1074
|
+
[src/Particle.js:1142-1150](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1142-L1150 "Source code on GitHub")
|
|
1111
1075
|
|
|
1112
1076
|
Change user's password
|
|
1113
1077
|
|
|
@@ -1117,7 +1081,7 @@ Change user's password
|
|
|
1117
1081
|
- `options.currentPassword` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Current password
|
|
1118
1082
|
- `options.password` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** New password
|
|
1119
1083
|
- `options.invalidateTokens` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Should all tokens be invalidated (optional, default `false`)
|
|
1120
|
-
- `options.auth` **
|
|
1084
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1121
1085
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1122
1086
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1123
1087
|
|
|
@@ -1125,7 +1089,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1125
1089
|
|
|
1126
1090
|
### listSIMs
|
|
1127
1091
|
|
|
1128
|
-
[src/Particle.js:
|
|
1092
|
+
[src/Particle.js:1166-1170](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1166-L1170 "Source code on GitHub")
|
|
1129
1093
|
|
|
1130
1094
|
List SIM cards owned by a user or product
|
|
1131
1095
|
|
|
@@ -1138,7 +1102,7 @@ List SIM cards owned by a user or product
|
|
|
1138
1102
|
- `options.page` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** (Product only) Current page of results
|
|
1139
1103
|
- `options.perPage` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** (Product only) Records per page
|
|
1140
1104
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM cards for this product ID or slug
|
|
1141
|
-
- `options.auth` **
|
|
1105
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1142
1106
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1143
1107
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1144
1108
|
|
|
@@ -1146,7 +1110,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1146
1110
|
|
|
1147
1111
|
### getSIMDataUsage
|
|
1148
1112
|
|
|
1149
|
-
[src/Particle.js:
|
|
1113
|
+
[src/Particle.js:1182-1188](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1182-L1188 "Source code on GitHub")
|
|
1150
1114
|
|
|
1151
1115
|
Get data usage for one SIM card for the current billing period
|
|
1152
1116
|
|
|
@@ -1155,7 +1119,7 @@ Get data usage for one SIM card for the current billing period
|
|
|
1155
1119
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1156
1120
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** ICCID of the SIM card
|
|
1157
1121
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM card for this product ID or slug
|
|
1158
|
-
- `options.auth` **
|
|
1122
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1159
1123
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1160
1124
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1161
1125
|
|
|
@@ -1163,7 +1127,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1163
1127
|
|
|
1164
1128
|
### getFleetDataUsage
|
|
1165
1129
|
|
|
1166
|
-
[src/Particle.js:
|
|
1130
|
+
[src/Particle.js:1199-1206](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1199-L1206 "Source code on GitHub")
|
|
1167
1131
|
|
|
1168
1132
|
Get data usage for all SIM cards in a product the current billing period
|
|
1169
1133
|
|
|
@@ -1171,7 +1135,7 @@ Get data usage for all SIM cards in a product the current billing period
|
|
|
1171
1135
|
|
|
1172
1136
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1173
1137
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** SIM cards for this product ID or slug
|
|
1174
|
-
- `options.auth` **
|
|
1138
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1175
1139
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1176
1140
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1177
1141
|
|
|
@@ -1179,7 +1143,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1179
1143
|
|
|
1180
1144
|
### checkSIM
|
|
1181
1145
|
|
|
1182
|
-
[src/Particle.js:
|
|
1146
|
+
[src/Particle.js:1217-1219](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1217-L1219 "Source code on GitHub")
|
|
1183
1147
|
|
|
1184
1148
|
Check SIM status
|
|
1185
1149
|
|
|
@@ -1187,7 +1151,7 @@ Check SIM status
|
|
|
1187
1151
|
|
|
1188
1152
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1189
1153
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** ICCID of the SIM card
|
|
1190
|
-
- `options.auth` **
|
|
1154
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1191
1155
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1192
1156
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1193
1157
|
|
|
@@ -1195,7 +1159,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1195
1159
|
|
|
1196
1160
|
### activateSIM
|
|
1197
1161
|
|
|
1198
|
-
[src/Particle.js:
|
|
1162
|
+
[src/Particle.js:1234-1244](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1234-L1244 "Source code on GitHub")
|
|
1199
1163
|
|
|
1200
1164
|
Activate and add SIM cards to an account or product
|
|
1201
1165
|
|
|
@@ -1207,7 +1171,7 @@ Activate and add SIM cards to an account or product
|
|
|
1207
1171
|
- `options.country` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ISO country code for the SIM cards
|
|
1208
1172
|
- `options.promoCode` **any?**
|
|
1209
1173
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM cards for this product ID or slug
|
|
1210
|
-
- `options.auth` **
|
|
1174
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1211
1175
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1212
1176
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1213
1177
|
|
|
@@ -1215,7 +1179,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1215
1179
|
|
|
1216
1180
|
### deactivateSIM
|
|
1217
1181
|
|
|
1218
|
-
[src/Particle.js:
|
|
1182
|
+
[src/Particle.js:1256-1260](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1256-L1260 "Source code on GitHub")
|
|
1219
1183
|
|
|
1220
1184
|
Deactivate a SIM card so it doesn't incur data usage in future months.
|
|
1221
1185
|
|
|
@@ -1224,7 +1188,7 @@ Deactivate a SIM card so it doesn't incur data usage in future months.
|
|
|
1224
1188
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1225
1189
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** ICCID of the SIM card
|
|
1226
1190
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM cards for this product ID or slug
|
|
1227
|
-
- `options.auth` **
|
|
1191
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1228
1192
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1229
1193
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1230
1194
|
|
|
@@ -1232,7 +1196,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1232
1196
|
|
|
1233
1197
|
### reactivateSIM
|
|
1234
1198
|
|
|
1235
|
-
[src/Particle.js:
|
|
1199
|
+
[src/Particle.js:1273-1277](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1273-L1277 "Source code on GitHub")
|
|
1236
1200
|
|
|
1237
1201
|
Reactivate a SIM card the was deactivated or unpause a SIM card that was automatically paused
|
|
1238
1202
|
|
|
@@ -1242,7 +1206,7 @@ Reactivate a SIM card the was deactivated or unpause a SIM card that was automat
|
|
|
1242
1206
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** ICCID of the SIM card
|
|
1243
1207
|
- `options.mbLimit` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** New monthly data limit. Necessary if unpausing a SIM card
|
|
1244
1208
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM cards for this product ID or slug
|
|
1245
|
-
- `options.auth` **
|
|
1209
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1246
1210
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1247
1211
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1248
1212
|
|
|
@@ -1250,7 +1214,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1250
1214
|
|
|
1251
1215
|
### updateSIM
|
|
1252
1216
|
|
|
1253
|
-
[src/Particle.js:
|
|
1217
|
+
[src/Particle.js:1290-1294](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1290-L1294 "Source code on GitHub")
|
|
1254
1218
|
|
|
1255
1219
|
Update SIM card data limit
|
|
1256
1220
|
|
|
@@ -1260,7 +1224,7 @@ Update SIM card data limit
|
|
|
1260
1224
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** ICCID of the SIM card
|
|
1261
1225
|
- `options.mbLimit` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Data limit in megabyte for the SIM card
|
|
1262
1226
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM cards for this product ID or slug
|
|
1263
|
-
- `options.auth` **
|
|
1227
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1264
1228
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1265
1229
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1266
1230
|
|
|
@@ -1268,7 +1232,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1268
1232
|
|
|
1269
1233
|
### removeSIM
|
|
1270
1234
|
|
|
1271
|
-
[src/Particle.js:
|
|
1235
|
+
[src/Particle.js:1306-1309](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1306-L1309 "Source code on GitHub")
|
|
1272
1236
|
|
|
1273
1237
|
Remove a SIM card from an account so it can be activated by a different account
|
|
1274
1238
|
|
|
@@ -1277,7 +1241,7 @@ Remove a SIM card from an account so it can be activated by a different account
|
|
|
1277
1241
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1278
1242
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** ICCID of the SIM card
|
|
1279
1243
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** SIM cards for this product ID or slug
|
|
1280
|
-
- `options.auth` **
|
|
1244
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1281
1245
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1282
1246
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1283
1247
|
|
|
@@ -1285,7 +1249,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1285
1249
|
|
|
1286
1250
|
### listBuildTargets
|
|
1287
1251
|
|
|
1288
|
-
[src/Particle.js:
|
|
1252
|
+
[src/Particle.js:1320-1323](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1320-L1323 "Source code on GitHub")
|
|
1289
1253
|
|
|
1290
1254
|
List valid build targets to be used for compiling
|
|
1291
1255
|
|
|
@@ -1293,7 +1257,7 @@ List valid build targets to be used for compiling
|
|
|
1293
1257
|
|
|
1294
1258
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1295
1259
|
- `options.onlyFeatured` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Only list featured build targets (optional, default `false`)
|
|
1296
|
-
- `options.auth` **
|
|
1260
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1297
1261
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1298
1262
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1299
1263
|
|
|
@@ -1301,7 +1265,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1301
1265
|
|
|
1302
1266
|
### listLibraries
|
|
1303
1267
|
|
|
1304
|
-
[src/Particle.js:
|
|
1268
|
+
[src/Particle.js:1349-1366](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1349-L1366 "Source code on GitHub")
|
|
1305
1269
|
|
|
1306
1270
|
List firmware libraries
|
|
1307
1271
|
|
|
@@ -1323,7 +1287,7 @@ List firmware libraries
|
|
|
1323
1287
|
\- 'verified' - list only verified libraries
|
|
1324
1288
|
\- 'featured' - list only featured libraries
|
|
1325
1289
|
- `options.excludeScopes` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** list of scopes to exclude
|
|
1326
|
-
- `options.auth` **
|
|
1290
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1327
1291
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1328
1292
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1329
1293
|
|
|
@@ -1331,7 +1295,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1331
1295
|
|
|
1332
1296
|
### getLibrary
|
|
1333
1297
|
|
|
1334
|
-
[src/Particle.js:
|
|
1298
|
+
[src/Particle.js:1382-1390](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1382-L1390 "Source code on GitHub")
|
|
1335
1299
|
|
|
1336
1300
|
Get firmware library details
|
|
1337
1301
|
|
|
@@ -1340,7 +1304,7 @@ Get firmware library details
|
|
|
1340
1304
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1341
1305
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the library to fetch
|
|
1342
1306
|
- `options.version` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Version of the library to fetch (default: latest)
|
|
1343
|
-
- `options.auth` **
|
|
1307
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1344
1308
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1345
1309
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1346
1310
|
|
|
@@ -1348,7 +1312,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1348
1312
|
|
|
1349
1313
|
### getLibraryVersions
|
|
1350
1314
|
|
|
1351
|
-
[src/Particle.js:
|
|
1315
|
+
[src/Particle.js:1403-1411](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1403-L1411 "Source code on GitHub")
|
|
1352
1316
|
|
|
1353
1317
|
Firmware library details for each version
|
|
1354
1318
|
|
|
@@ -1358,7 +1322,7 @@ Firmware library details for each version
|
|
|
1358
1322
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the library to fetch
|
|
1359
1323
|
- `options.page` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Page index (default, first page)
|
|
1360
1324
|
- `options.limit` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of items per page
|
|
1361
|
-
- `options.auth` **
|
|
1325
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1362
1326
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1363
1327
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1364
1328
|
|
|
@@ -1366,7 +1330,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1366
1330
|
|
|
1367
1331
|
### contributeLibrary
|
|
1368
1332
|
|
|
1369
|
-
[src/Particle.js:
|
|
1333
|
+
[src/Particle.js:1423-1436](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1423-L1436 "Source code on GitHub")
|
|
1370
1334
|
|
|
1371
1335
|
Contribute a new library version from a compressed archive
|
|
1372
1336
|
|
|
@@ -1375,7 +1339,7 @@ Contribute a new library version from a compressed archive
|
|
|
1375
1339
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1376
1340
|
- `options.archive` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Buffer](https://nodejs.org/api/buffer.html))** Compressed archive file containing the library sources
|
|
1377
1341
|
Either a path or Buffer of the file contents in Node, or a File or Blob in the browser.
|
|
1378
|
-
- `options.auth` **
|
|
1342
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1379
1343
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1380
1344
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1381
1345
|
|
|
@@ -1383,7 +1347,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1383
1347
|
|
|
1384
1348
|
### publishLibrary
|
|
1385
1349
|
|
|
1386
|
-
[src/Particle.js:
|
|
1350
|
+
[src/Particle.js:1447-1456](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1447-L1456 "Source code on GitHub")
|
|
1387
1351
|
|
|
1388
1352
|
Publish the latest version of a library to the public
|
|
1389
1353
|
|
|
@@ -1391,7 +1355,7 @@ Publish the latest version of a library to the public
|
|
|
1391
1355
|
|
|
1392
1356
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1393
1357
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the library to publish
|
|
1394
|
-
- `options.auth` **
|
|
1358
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1395
1359
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1396
1360
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1397
1361
|
|
|
@@ -1399,7 +1363,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1399
1363
|
|
|
1400
1364
|
### deleteLibrary
|
|
1401
1365
|
|
|
1402
|
-
[src/Particle.js:
|
|
1366
|
+
[src/Particle.js:1468-1476](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1468-L1476 "Source code on GitHub")
|
|
1403
1367
|
|
|
1404
1368
|
Delete one version of a library or an entire private library
|
|
1405
1369
|
|
|
@@ -1408,7 +1372,7 @@ Delete one version of a library or an entire private library
|
|
|
1408
1372
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1409
1373
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the library to remove
|
|
1410
1374
|
- `options.force` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Key to force deleting a public library
|
|
1411
|
-
- `options.auth` **
|
|
1375
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1412
1376
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1413
1377
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1414
1378
|
|
|
@@ -1416,7 +1380,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1416
1380
|
|
|
1417
1381
|
### downloadFile
|
|
1418
1382
|
|
|
1419
|
-
[src/Particle.js:
|
|
1383
|
+
[src/Particle.js:1486-1488](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1486-L1488 "Source code on GitHub")
|
|
1420
1384
|
|
|
1421
1385
|
Download an external file that may not be on the API
|
|
1422
1386
|
|
|
@@ -1431,7 +1395,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1431
1395
|
|
|
1432
1396
|
### listOAuthClients
|
|
1433
1397
|
|
|
1434
|
-
[src/Particle.js:
|
|
1398
|
+
[src/Particle.js:1499-1502](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1499-L1502 "Source code on GitHub")
|
|
1435
1399
|
|
|
1436
1400
|
List OAuth client created by the account
|
|
1437
1401
|
|
|
@@ -1439,7 +1403,7 @@ List OAuth client created by the account
|
|
|
1439
1403
|
|
|
1440
1404
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1441
1405
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** List clients for this product ID or slug
|
|
1442
|
-
- `options.auth` **
|
|
1406
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1443
1407
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1444
1408
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1445
1409
|
|
|
@@ -1447,7 +1411,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1447
1411
|
|
|
1448
1412
|
### createOAuthClient
|
|
1449
1413
|
|
|
1450
|
-
[src/Particle.js:
|
|
1414
|
+
[src/Particle.js:1517-1521](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1517-L1521 "Source code on GitHub")
|
|
1451
1415
|
|
|
1452
1416
|
Create an OAuth client
|
|
1453
1417
|
|
|
@@ -1459,7 +1423,7 @@ Create an OAuth client
|
|
|
1459
1423
|
- `options.redirect_uri` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** URL to redirect after OAuth flow. Only for type web.
|
|
1460
1424
|
- `options.scope` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Limits what the access tokens created by this client can do.
|
|
1461
1425
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Create client for this product ID or slug
|
|
1462
|
-
- `options.auth` **
|
|
1426
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1463
1427
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1464
1428
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1465
1429
|
|
|
@@ -1467,7 +1431,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1467
1431
|
|
|
1468
1432
|
### updateOAuthClient
|
|
1469
1433
|
|
|
1470
|
-
[src/Particle.js:
|
|
1434
|
+
[src/Particle.js:1535-1539](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1535-L1539 "Source code on GitHub")
|
|
1471
1435
|
|
|
1472
1436
|
Update an OAuth client
|
|
1473
1437
|
|
|
@@ -1478,7 +1442,7 @@ Update an OAuth client
|
|
|
1478
1442
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** New Name of the OAuth client
|
|
1479
1443
|
- `options.scope` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** New scope of the OAuth client
|
|
1480
1444
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Update client linked to this product ID or slug
|
|
1481
|
-
- `options.auth` **
|
|
1445
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1482
1446
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1483
1447
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1484
1448
|
|
|
@@ -1486,7 +1450,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1486
1450
|
|
|
1487
1451
|
### deleteOAuthClient
|
|
1488
1452
|
|
|
1489
|
-
[src/Particle.js:
|
|
1453
|
+
[src/Particle.js:1551-1554](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1551-L1554 "Source code on GitHub")
|
|
1490
1454
|
|
|
1491
1455
|
Delete an OAuth client
|
|
1492
1456
|
|
|
@@ -1495,7 +1459,7 @@ Delete an OAuth client
|
|
|
1495
1459
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1496
1460
|
- `options.clientId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The OAuth client to update
|
|
1497
1461
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** OAuth client linked to this product ID or slug
|
|
1498
|
-
- `options.auth` **
|
|
1462
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1499
1463
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1500
1464
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1501
1465
|
|
|
@@ -1503,14 +1467,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1503
1467
|
|
|
1504
1468
|
### listProducts
|
|
1505
1469
|
|
|
1506
|
-
[src/Particle.js:
|
|
1470
|
+
[src/Particle.js:1564-1566](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1564-L1566 "Source code on GitHub")
|
|
1507
1471
|
|
|
1508
1472
|
List products the account has access to
|
|
1509
1473
|
|
|
1510
1474
|
**Parameters**
|
|
1511
1475
|
|
|
1512
1476
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1513
|
-
- `options.auth` **
|
|
1477
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1514
1478
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1515
1479
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1516
1480
|
|
|
@@ -1518,7 +1482,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1518
1482
|
|
|
1519
1483
|
### getProduct
|
|
1520
1484
|
|
|
1521
|
-
[src/Particle.js:
|
|
1485
|
+
[src/Particle.js:1577-1579](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1577-L1579 "Source code on GitHub")
|
|
1522
1486
|
|
|
1523
1487
|
Get detailed information about a product
|
|
1524
1488
|
|
|
@@ -1526,7 +1490,7 @@ Get detailed information about a product
|
|
|
1526
1490
|
|
|
1527
1491
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1528
1492
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Product ID or slug
|
|
1529
|
-
- `options.auth` **
|
|
1493
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1530
1494
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1531
1495
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1532
1496
|
|
|
@@ -1534,7 +1498,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1534
1498
|
|
|
1535
1499
|
### listProductFirmware
|
|
1536
1500
|
|
|
1537
|
-
[src/Particle.js:
|
|
1501
|
+
[src/Particle.js:1590-1592](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1590-L1592 "Source code on GitHub")
|
|
1538
1502
|
|
|
1539
1503
|
List product firmware versions
|
|
1540
1504
|
|
|
@@ -1542,7 +1506,7 @@ List product firmware versions
|
|
|
1542
1506
|
|
|
1543
1507
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1544
1508
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Firmware for this product ID or slug
|
|
1545
|
-
- `options.auth` **
|
|
1509
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1546
1510
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1547
1511
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1548
1512
|
|
|
@@ -1550,7 +1514,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1550
1514
|
|
|
1551
1515
|
### uploadProductFirmware
|
|
1552
1516
|
|
|
1553
|
-
[src/Particle.js:
|
|
1517
|
+
[src/Particle.js:1608-1624](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1608-L1624 "Source code on GitHub")
|
|
1554
1518
|
|
|
1555
1519
|
List product firmware versions
|
|
1556
1520
|
|
|
@@ -1563,7 +1527,7 @@ List product firmware versions
|
|
|
1563
1527
|
- `options.title` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Short identifier for the new firmware
|
|
1564
1528
|
- `options.description` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Longer description for the new firmware
|
|
1565
1529
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Firmware for this product ID or slug
|
|
1566
|
-
- `options.auth` **
|
|
1530
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1567
1531
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1568
1532
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1569
1533
|
|
|
@@ -1571,7 +1535,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1571
1535
|
|
|
1572
1536
|
### getProductFirmware
|
|
1573
1537
|
|
|
1574
|
-
[src/Particle.js:
|
|
1538
|
+
[src/Particle.js:1636-1643](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1636-L1643 "Source code on GitHub")
|
|
1575
1539
|
|
|
1576
1540
|
Get information about a product firmware version
|
|
1577
1541
|
|
|
@@ -1580,7 +1544,7 @@ Get information about a product firmware version
|
|
|
1580
1544
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1581
1545
|
- `options.version` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Version number of firmware
|
|
1582
1546
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Firmware for this product ID or slug
|
|
1583
|
-
- `options.auth` **
|
|
1547
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1584
1548
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1585
1549
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1586
1550
|
|
|
@@ -1588,7 +1552,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1588
1552
|
|
|
1589
1553
|
### updateProductFirmware
|
|
1590
1554
|
|
|
1591
|
-
[src/Particle.js:
|
|
1555
|
+
[src/Particle.js:1657-1660](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1657-L1660 "Source code on GitHub")
|
|
1592
1556
|
|
|
1593
1557
|
Update information for a product firmware version
|
|
1594
1558
|
|
|
@@ -1599,7 +1563,7 @@ Update information for a product firmware version
|
|
|
1599
1563
|
- `options.title` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** New title
|
|
1600
1564
|
- `options.description` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** New description
|
|
1601
1565
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Firmware for this product ID or slug
|
|
1602
|
-
- `options.auth` **
|
|
1566
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1603
1567
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1604
1568
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1605
1569
|
|
|
@@ -1607,7 +1571,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1607
1571
|
|
|
1608
1572
|
### downloadProductFirmware
|
|
1609
1573
|
|
|
1610
|
-
[src/Particle.js:
|
|
1574
|
+
[src/Particle.js:1672-1681](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1672-L1681 "Source code on GitHub")
|
|
1611
1575
|
|
|
1612
1576
|
Download a product firmware binary
|
|
1613
1577
|
|
|
@@ -1616,7 +1580,7 @@ Download a product firmware binary
|
|
|
1616
1580
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1617
1581
|
- `options.version` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Version number of new firmware
|
|
1618
1582
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Firmware for this product ID or slug
|
|
1619
|
-
- `options.auth` **
|
|
1583
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1620
1584
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1621
1585
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1622
1586
|
|
|
@@ -1624,7 +1588,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1624
1588
|
|
|
1625
1589
|
### releaseProductFirmware
|
|
1626
1590
|
|
|
1627
|
-
[src/Particle.js:
|
|
1591
|
+
[src/Particle.js:1693-1696](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1693-L1696 "Source code on GitHub")
|
|
1628
1592
|
|
|
1629
1593
|
Release a product firmware version as the default version
|
|
1630
1594
|
|
|
@@ -1633,7 +1597,7 @@ Release a product firmware version as the default version
|
|
|
1633
1597
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1634
1598
|
- `options.version` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Version number of new firmware
|
|
1635
1599
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Firmware for this product ID or slug
|
|
1636
|
-
- `options.auth` **
|
|
1600
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1637
1601
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1638
1602
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1639
1603
|
|
|
@@ -1641,7 +1605,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1641
1605
|
|
|
1642
1606
|
### listTeamMembers
|
|
1643
1607
|
|
|
1644
|
-
[src/Particle.js:
|
|
1608
|
+
[src/Particle.js:1707-1714](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1707-L1714 "Source code on GitHub")
|
|
1645
1609
|
|
|
1646
1610
|
List product team members
|
|
1647
1611
|
|
|
@@ -1649,7 +1613,7 @@ List product team members
|
|
|
1649
1613
|
|
|
1650
1614
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1651
1615
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Team for this product ID or slug
|
|
1652
|
-
- `options.auth` **
|
|
1616
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1653
1617
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1654
1618
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1655
1619
|
|
|
@@ -1657,7 +1621,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1657
1621
|
|
|
1658
1622
|
### inviteTeamMember
|
|
1659
1623
|
|
|
1660
|
-
[src/Particle.js:
|
|
1624
|
+
[src/Particle.js:1726-1734](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1726-L1734 "Source code on GitHub")
|
|
1661
1625
|
|
|
1662
1626
|
Invite Particle user to a product team
|
|
1663
1627
|
|
|
@@ -1666,7 +1630,7 @@ Invite Particle user to a product team
|
|
|
1666
1630
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1667
1631
|
- `options.username` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Username for the Particle account
|
|
1668
1632
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Team for this product ID or slug
|
|
1669
|
-
- `options.auth` **
|
|
1633
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1670
1634
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1671
1635
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1672
1636
|
|
|
@@ -1674,7 +1638,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1674
1638
|
|
|
1675
1639
|
### removeTeamMember
|
|
1676
1640
|
|
|
1677
|
-
[src/Particle.js:
|
|
1641
|
+
[src/Particle.js:1746-1753](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1746-L1753 "Source code on GitHub")
|
|
1678
1642
|
|
|
1679
1643
|
Remove Particle user to a product team
|
|
1680
1644
|
|
|
@@ -1683,7 +1647,7 @@ Remove Particle user to a product team
|
|
|
1683
1647
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1684
1648
|
- `options.username` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Username for the Particle account
|
|
1685
1649
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Team for this product ID or slug
|
|
1686
|
-
- `options.auth` **
|
|
1650
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1687
1651
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1688
1652
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1689
1653
|
|
|
@@ -1691,7 +1655,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1691
1655
|
|
|
1692
1656
|
### lookupSerialNumber
|
|
1693
1657
|
|
|
1694
|
-
[src/Particle.js:
|
|
1658
|
+
[src/Particle.js:1764-1771](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1764-L1771 "Source code on GitHub")
|
|
1695
1659
|
|
|
1696
1660
|
Fetch details about a serial number
|
|
1697
1661
|
|
|
@@ -1699,7 +1663,7 @@ Fetch details about a serial number
|
|
|
1699
1663
|
|
|
1700
1664
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1701
1665
|
- `options.serialNumber` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The serial number printed on the barcode of the device packaging
|
|
1702
|
-
- `options.auth` **
|
|
1666
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1703
1667
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1704
1668
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1705
1669
|
|
|
@@ -1707,7 +1671,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1707
1671
|
|
|
1708
1672
|
### createMeshNetwork
|
|
1709
1673
|
|
|
1710
|
-
[src/Particle.js:
|
|
1674
|
+
[src/Particle.js:1784-1792](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1784-L1792 "Source code on GitHub")
|
|
1711
1675
|
|
|
1712
1676
|
Create a mesh network
|
|
1713
1677
|
|
|
@@ -1717,7 +1681,7 @@ Create a mesh network
|
|
|
1717
1681
|
- `options.name` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Network name
|
|
1718
1682
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Gateway device ID
|
|
1719
1683
|
- `options.iccid` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** ICCID of the active SIM card (only for cellular gateway devices)
|
|
1720
|
-
- `options.auth` **
|
|
1684
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1721
1685
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1722
1686
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1723
1687
|
|
|
@@ -1725,7 +1689,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1725
1689
|
|
|
1726
1690
|
### removeMeshNetwork
|
|
1727
1691
|
|
|
1728
|
-
[src/Particle.js:
|
|
1692
|
+
[src/Particle.js:1803-1805](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1803-L1805 "Source code on GitHub")
|
|
1729
1693
|
|
|
1730
1694
|
Remove a mesh network.
|
|
1731
1695
|
|
|
@@ -1733,7 +1697,7 @@ Remove a mesh network.
|
|
|
1733
1697
|
|
|
1734
1698
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1735
1699
|
- `options.networkId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Network ID or name
|
|
1736
|
-
- `options.auth` **
|
|
1700
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1737
1701
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1738
1702
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1739
1703
|
|
|
@@ -1741,7 +1705,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1741
1705
|
|
|
1742
1706
|
### listMeshNetworks
|
|
1743
1707
|
|
|
1744
|
-
[src/Particle.js:
|
|
1708
|
+
[src/Particle.js:1817-1820](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1817-L1820 "Source code on GitHub")
|
|
1745
1709
|
|
|
1746
1710
|
List all mesh networks
|
|
1747
1711
|
|
|
@@ -1750,7 +1714,7 @@ List all mesh networks
|
|
|
1750
1714
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1751
1715
|
- `options.page` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Current page of results
|
|
1752
1716
|
- `options.perPage` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Records per page
|
|
1753
|
-
- `options.auth` **
|
|
1717
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1754
1718
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1755
1719
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1756
1720
|
|
|
@@ -1758,7 +1722,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1758
1722
|
|
|
1759
1723
|
### getMeshNetwork
|
|
1760
1724
|
|
|
1761
|
-
[src/Particle.js:
|
|
1725
|
+
[src/Particle.js:1831-1833](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1831-L1833 "Source code on GitHub")
|
|
1762
1726
|
|
|
1763
1727
|
Get information about a mesh network.
|
|
1764
1728
|
|
|
@@ -1766,7 +1730,7 @@ Get information about a mesh network.
|
|
|
1766
1730
|
|
|
1767
1731
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1768
1732
|
- `options.networkId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Network ID or name
|
|
1769
|
-
- `options.auth` **
|
|
1733
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1770
1734
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1771
1735
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1772
1736
|
|
|
@@ -1774,7 +1738,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1774
1738
|
|
|
1775
1739
|
### updateMeshNetwork
|
|
1776
1740
|
|
|
1777
|
-
[src/Particle.js:
|
|
1741
|
+
[src/Particle.js:1846-1854](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1846-L1854 "Source code on GitHub")
|
|
1778
1742
|
|
|
1779
1743
|
Modify a mesh network.
|
|
1780
1744
|
|
|
@@ -1784,7 +1748,7 @@ Modify a mesh network.
|
|
|
1784
1748
|
- `options.networkId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Network ID or name
|
|
1785
1749
|
- `options.action` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** 'add-device', 'remove-device', 'gateway-enable' or 'gateway-disable'
|
|
1786
1750
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID
|
|
1787
|
-
- `options.auth` **
|
|
1751
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1788
1752
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1789
1753
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1790
1754
|
|
|
@@ -1792,7 +1756,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1792
1756
|
|
|
1793
1757
|
### addMeshNetworkDevice
|
|
1794
1758
|
|
|
1795
|
-
[src/Particle.js:
|
|
1759
|
+
[src/Particle.js:1866-1875](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1866-L1875 "Source code on GitHub")
|
|
1796
1760
|
|
|
1797
1761
|
Add a device to a mesh network.
|
|
1798
1762
|
|
|
@@ -1801,7 +1765,7 @@ Add a device to a mesh network.
|
|
|
1801
1765
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1802
1766
|
- `options.networkId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Network ID or name
|
|
1803
1767
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID
|
|
1804
|
-
- `options.auth` **
|
|
1768
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1805
1769
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1806
1770
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1807
1771
|
|
|
@@ -1809,7 +1773,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1809
1773
|
|
|
1810
1774
|
### removeMeshNetworkDevice
|
|
1811
1775
|
|
|
1812
|
-
[src/Particle.js:
|
|
1776
|
+
[src/Particle.js:1887-1903](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1887-L1903 "Source code on GitHub")
|
|
1813
1777
|
|
|
1814
1778
|
Remove a device from a mesh network.
|
|
1815
1779
|
|
|
@@ -1818,7 +1782,7 @@ Remove a device from a mesh network.
|
|
|
1818
1782
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1819
1783
|
- `options.networkId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Network ID or name
|
|
1820
1784
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID
|
|
1821
|
-
- `options.auth` **
|
|
1785
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1822
1786
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1823
1787
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1824
1788
|
|
|
@@ -1826,7 +1790,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1826
1790
|
|
|
1827
1791
|
### listMeshNetworkDevices
|
|
1828
1792
|
|
|
1829
|
-
[src/Particle.js:
|
|
1793
|
+
[src/Particle.js:1917-1926](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1917-L1926 "Source code on GitHub")
|
|
1830
1794
|
|
|
1831
1795
|
List all devices of a mesh network.
|
|
1832
1796
|
|
|
@@ -1837,7 +1801,7 @@ List all devices of a mesh network.
|
|
|
1837
1801
|
- `options.role` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Device role: 'gateway' or 'node'
|
|
1838
1802
|
- `options.page` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Current page of results
|
|
1839
1803
|
- `options.perPage` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Records per page
|
|
1840
|
-
- `options.auth` **
|
|
1804
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1841
1805
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1842
1806
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
1843
1807
|
|
|
@@ -1845,14 +1809,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1845
1809
|
|
|
1846
1810
|
### getProductConfiguration
|
|
1847
1811
|
|
|
1848
|
-
[src/Particle.js:
|
|
1812
|
+
[src/Particle.js:1937-1944](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1937-L1944 "Source code on GitHub")
|
|
1849
1813
|
|
|
1850
1814
|
Get product configuration
|
|
1851
1815
|
|
|
1852
1816
|
**Parameters**
|
|
1853
1817
|
|
|
1854
1818
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1855
|
-
- `options.auth` **
|
|
1819
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1856
1820
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Config for this product ID or slug
|
|
1857
1821
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
1858
1822
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
@@ -1861,14 +1825,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1861
1825
|
|
|
1862
1826
|
### getProductConfigurationSchema
|
|
1863
1827
|
|
|
1864
|
-
[src/Particle.js:
|
|
1828
|
+
[src/Particle.js:1955-1963](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1955-L1963 "Source code on GitHub")
|
|
1865
1829
|
|
|
1866
1830
|
Get product configuration schema
|
|
1867
1831
|
|
|
1868
1832
|
**Parameters**
|
|
1869
1833
|
|
|
1870
1834
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1871
|
-
- `options.auth` **
|
|
1835
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1872
1836
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Config for this product ID or slug
|
|
1873
1837
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. (optional, default `{}`)
|
|
1874
1838
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
@@ -1877,14 +1841,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1877
1841
|
|
|
1878
1842
|
### getProductDeviceConfiguration
|
|
1879
1843
|
|
|
1880
|
-
[src/Particle.js:
|
|
1844
|
+
[src/Particle.js:1975-1982](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1975-L1982 "Source code on GitHub")
|
|
1881
1845
|
|
|
1882
1846
|
Get product device's configuration
|
|
1883
1847
|
|
|
1884
1848
|
**Parameters**
|
|
1885
1849
|
|
|
1886
1850
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1887
|
-
- `options.auth` **
|
|
1851
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1888
1852
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Config for this product ID or slug
|
|
1889
1853
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID to access
|
|
1890
1854
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -1894,14 +1858,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1894
1858
|
|
|
1895
1859
|
### getProductDeviceConfigurationSchema
|
|
1896
1860
|
|
|
1897
|
-
[src/Particle.js:
|
|
1861
|
+
[src/Particle.js:1994-2002](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L1994-L2002 "Source code on GitHub")
|
|
1898
1862
|
|
|
1899
1863
|
Get product device's configuration schema
|
|
1900
1864
|
|
|
1901
1865
|
**Parameters**
|
|
1902
1866
|
|
|
1903
1867
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1904
|
-
- `options.auth` **
|
|
1868
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1905
1869
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Config for this product ID or slug
|
|
1906
1870
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID to access
|
|
1907
1871
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -1911,14 +1875,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1911
1875
|
|
|
1912
1876
|
### setProductConfiguration
|
|
1913
1877
|
|
|
1914
|
-
[src/Particle.js:
|
|
1878
|
+
[src/Particle.js:2014-2022](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2014-L2022 "Source code on GitHub")
|
|
1915
1879
|
|
|
1916
1880
|
Set product configuration
|
|
1917
1881
|
|
|
1918
1882
|
**Parameters**
|
|
1919
1883
|
|
|
1920
1884
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1921
|
-
- `options.auth` **
|
|
1885
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1922
1886
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Config for this product ID or slug
|
|
1923
1887
|
- `options.config` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Product configuration to update
|
|
1924
1888
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -1928,14 +1892,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1928
1892
|
|
|
1929
1893
|
### setProductDeviceConfiguration
|
|
1930
1894
|
|
|
1931
|
-
[src/Particle.js:
|
|
1895
|
+
[src/Particle.js:2035-2043](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2035-L2043 "Source code on GitHub")
|
|
1932
1896
|
|
|
1933
1897
|
Set product configuration for a specific device within the product
|
|
1934
1898
|
|
|
1935
1899
|
**Parameters**
|
|
1936
1900
|
|
|
1937
1901
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1938
|
-
- `options.auth` **
|
|
1902
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1939
1903
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Config for this product ID or slug
|
|
1940
1904
|
- `options.deviceId` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Device ID to access
|
|
1941
1905
|
- `options.config` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Product configuration to update
|
|
@@ -1946,14 +1910,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1946
1910
|
|
|
1947
1911
|
### getProductLocations
|
|
1948
1912
|
|
|
1949
|
-
[src/Particle.js:
|
|
1913
|
+
[src/Particle.js:2062-2079](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2062-L2079 "Source code on GitHub")
|
|
1950
1914
|
|
|
1951
1915
|
Query location for devices within a product
|
|
1952
1916
|
|
|
1953
1917
|
**Parameters**
|
|
1954
1918
|
|
|
1955
1919
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1956
|
-
- `options.auth` **
|
|
1920
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1957
1921
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Locations for this product ID or slug
|
|
1958
1922
|
- `options.dateRange` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Start and end date in ISO8601 format, separated by comma, to query
|
|
1959
1923
|
- `options.rectBl` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Bottom left of the rectangular bounding box to query. Latitude and longitude separated by comma
|
|
@@ -1970,14 +1934,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1970
1934
|
|
|
1971
1935
|
### getProductDeviceLocations
|
|
1972
1936
|
|
|
1973
|
-
[src/Particle.js:
|
|
1937
|
+
[src/Particle.js:2096-2108](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2096-L2108 "Source code on GitHub")
|
|
1974
1938
|
|
|
1975
1939
|
Query location for one device within a product
|
|
1976
1940
|
|
|
1977
1941
|
**Parameters**
|
|
1978
1942
|
|
|
1979
1943
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
1980
|
-
- `options.auth` **
|
|
1944
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
1981
1945
|
- `options.product` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Locations for this product ID or slug
|
|
1982
1946
|
- `options.dateRange` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Start and end date in ISO8601 format, separated by comma, to query
|
|
1983
1947
|
- `options.rectBl` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Bottom left of the rectangular bounding box to query. Latitude and longitude separated by comma
|
|
@@ -1990,7 +1954,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
1990
1954
|
|
|
1991
1955
|
### executeLogic
|
|
1992
1956
|
|
|
1993
|
-
[src/Particle.js:
|
|
1957
|
+
[src/Particle.js:2124-2132](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2124-L2132 "Source code on GitHub")
|
|
1994
1958
|
|
|
1995
1959
|
Executes the provided logic function once and returns the result. No logs, runs, etc are saved
|
|
1996
1960
|
|
|
@@ -1999,7 +1963,7 @@ NOTE: Any external interactions such as Particle.publish will actually occur whe
|
|
|
1999
1963
|
**Parameters**
|
|
2000
1964
|
|
|
2001
1965
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for creating the logic function.
|
|
2002
|
-
- `options.auth` **
|
|
1966
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2003
1967
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2004
1968
|
- `options.logic` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The logic "function" which will be executed once
|
|
2005
1969
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2009,7 +1973,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2009
1973
|
|
|
2010
1974
|
### createLogicFunction
|
|
2011
1975
|
|
|
2012
|
-
[src/Particle.js:
|
|
1976
|
+
[src/Particle.js:2152-2160](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2152-L2160 "Source code on GitHub")
|
|
2013
1977
|
|
|
2014
1978
|
Creates a new logic function in the specified organization or sandbox using the provided function data.
|
|
2015
1979
|
|
|
@@ -2022,7 +1986,7 @@ according to the cron and start_at properties.
|
|
|
2022
1986
|
**Parameters**
|
|
2023
1987
|
|
|
2024
1988
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for creating the logic function.
|
|
2025
|
-
- `options.auth` **
|
|
1989
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2026
1990
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2027
1991
|
- `options.logicFunction` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The logic function object containing the function details.
|
|
2028
1992
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2032,14 +1996,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2032
1996
|
|
|
2033
1997
|
### getLogicFunction
|
|
2034
1998
|
|
|
2035
|
-
[src/Particle.js:
|
|
1999
|
+
[src/Particle.js:2174-2181](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2174-L2181 "Source code on GitHub")
|
|
2036
2000
|
|
|
2037
2001
|
Get a logic function in the specified organization or sandbox by logic function ID.
|
|
2038
2002
|
|
|
2039
2003
|
**Parameters**
|
|
2040
2004
|
|
|
2041
2005
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the logic function.
|
|
2042
|
-
- `options.auth` **
|
|
2006
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2043
2007
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2044
2008
|
- `options.logicFunctionId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic function to retrieve.
|
|
2045
2009
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2049,7 +2013,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2049
2013
|
|
|
2050
2014
|
### updateLogicFunction
|
|
2051
2015
|
|
|
2052
|
-
[src/Particle.js:
|
|
2016
|
+
[src/Particle.js:2198-2206](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2198-L2206 "Source code on GitHub")
|
|
2053
2017
|
|
|
2054
2018
|
Updates an existing logic function in the specified organization or sandbox using the provided function data.
|
|
2055
2019
|
|
|
@@ -2058,7 +2022,7 @@ If you include an id on a logic trigger, it will update the logic trigger in pla
|
|
|
2058
2022
|
**Parameters**
|
|
2059
2023
|
|
|
2060
2024
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for updating the logic function.
|
|
2061
|
-
- `options.auth` **
|
|
2025
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2062
2026
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2063
2027
|
- `options.logicFunctionId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic function to update.
|
|
2064
2028
|
- `options.logicFunction` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The logic function object containing the logic function details.
|
|
@@ -2069,14 +2033,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2069
2033
|
|
|
2070
2034
|
### deleteLogicFunction
|
|
2071
2035
|
|
|
2072
|
-
[src/Particle.js:
|
|
2036
|
+
[src/Particle.js:2220-2227](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2220-L2227 "Source code on GitHub")
|
|
2073
2037
|
|
|
2074
2038
|
Deletes a logic function in the specified organization or sandbox by logic function ID.
|
|
2075
2039
|
|
|
2076
2040
|
**Parameters**
|
|
2077
2041
|
|
|
2078
2042
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for deleting the logic function.
|
|
2079
|
-
- `options.auth` **
|
|
2043
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2080
2044
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2081
2045
|
- `options.logicFunctionId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic function to delete.
|
|
2082
2046
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2086,14 +2050,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2086
2050
|
|
|
2087
2051
|
### listLogicFunctions
|
|
2088
2052
|
|
|
2089
|
-
[src/Particle.js:
|
|
2053
|
+
[src/Particle.js:2241-2251](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2241-L2251 "Source code on GitHub")
|
|
2090
2054
|
|
|
2091
2055
|
Lists all logic functions in the specified organization or sandbox.
|
|
2092
2056
|
|
|
2093
2057
|
**Parameters**
|
|
2094
2058
|
|
|
2095
2059
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for listing logic functions.
|
|
2096
|
-
- `options.auth` **
|
|
2060
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2097
2061
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2098
2062
|
- `options.todayStats` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Whether to include today's stats in the response
|
|
2099
2063
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2103,14 +2067,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2103
2067
|
|
|
2104
2068
|
### listLogicRuns
|
|
2105
2069
|
|
|
2106
|
-
[src/Particle.js:
|
|
2070
|
+
[src/Particle.js:2265-2272](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2265-L2272 "Source code on GitHub")
|
|
2107
2071
|
|
|
2108
2072
|
Lists all logic runs for the specified logic function in the specified organization or sandbox.
|
|
2109
2073
|
|
|
2110
2074
|
**Parameters**
|
|
2111
2075
|
|
|
2112
2076
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the request.
|
|
2113
|
-
- `options.auth` **
|
|
2077
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2114
2078
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2115
2079
|
- `options.logicFunctionId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic function for which to retrieve the logic runs.
|
|
2116
2080
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2120,14 +2084,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2120
2084
|
|
|
2121
2085
|
### getLogicRun
|
|
2122
2086
|
|
|
2123
|
-
[src/Particle.js:
|
|
2087
|
+
[src/Particle.js:2287-2294](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2287-L2294 "Source code on GitHub")
|
|
2124
2088
|
|
|
2125
2089
|
Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox.
|
|
2126
2090
|
|
|
2127
2091
|
**Parameters**
|
|
2128
2092
|
|
|
2129
2093
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the request.
|
|
2130
|
-
- `options.auth` **
|
|
2094
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2131
2095
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2132
2096
|
- `options.logicFunctionId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic function for which to retrieve the logic run.
|
|
2133
2097
|
- `options.logicRunId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic run to retrieve.
|
|
@@ -2138,14 +2102,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2138
2102
|
|
|
2139
2103
|
### getLogicRunLogs
|
|
2140
2104
|
|
|
2141
|
-
[src/Particle.js:
|
|
2105
|
+
[src/Particle.js:2309-2316](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2309-L2316 "Source code on GitHub")
|
|
2142
2106
|
|
|
2143
2107
|
Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox.
|
|
2144
2108
|
|
|
2145
2109
|
**Parameters**
|
|
2146
2110
|
|
|
2147
2111
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the request.
|
|
2148
|
-
- `options.auth` **
|
|
2112
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2149
2113
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The unique identifier of the organization.
|
|
2150
2114
|
- `options.logicFunctionId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic function for which to retrieve the logic run logs.
|
|
2151
2115
|
- `options.logicRunId` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the logic run for which to retrieve the logs.
|
|
@@ -2156,14 +2120,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2156
2120
|
|
|
2157
2121
|
### createLedger
|
|
2158
2122
|
|
|
2159
|
-
[src/Particle.js:
|
|
2123
|
+
[src/Particle.js:2330-2338](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2330-L2338 "Source code on GitHub")
|
|
2160
2124
|
|
|
2161
2125
|
Creates a new ledger definition in the specified organization or sandbox.
|
|
2162
2126
|
|
|
2163
2127
|
**Parameters**
|
|
2164
2128
|
|
|
2165
2129
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for creating the ledger definition.
|
|
2166
|
-
- `options.auth` **
|
|
2130
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2167
2131
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2168
2132
|
- `options.ledger` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The ledger definition object.
|
|
2169
2133
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2173,14 +2137,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2173
2137
|
|
|
2174
2138
|
### getLedger
|
|
2175
2139
|
|
|
2176
|
-
[src/Particle.js:
|
|
2140
|
+
[src/Particle.js:2352-2359](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2352-L2359 "Source code on GitHub")
|
|
2177
2141
|
|
|
2178
2142
|
Get a ledger definition in the specified organization or sandbox by ledger name.
|
|
2179
2143
|
|
|
2180
2144
|
**Parameters**
|
|
2181
2145
|
|
|
2182
2146
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger definition.
|
|
2183
|
-
- `options.auth` **
|
|
2147
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2184
2148
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2185
2149
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The ID of the ledger definition to retrieve.
|
|
2186
2150
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2190,14 +2154,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2190
2154
|
|
|
2191
2155
|
### updateLedger
|
|
2192
2156
|
|
|
2193
|
-
[src/Particle.js:
|
|
2157
|
+
[src/Particle.js:2374-2382](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2374-L2382 "Source code on GitHub")
|
|
2194
2158
|
|
|
2195
2159
|
Updates an existing ledger definition in the specified organization or sandbox.
|
|
2196
2160
|
|
|
2197
2161
|
**Parameters**
|
|
2198
2162
|
|
|
2199
2163
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for updating the ledger definition.
|
|
2200
|
-
- `options.auth` **
|
|
2164
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2201
2165
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2202
2166
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the ledger definition to update.
|
|
2203
2167
|
- `options.ledger` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The ledger definition object.
|
|
@@ -2208,14 +2172,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2208
2172
|
|
|
2209
2173
|
### archiveLedger
|
|
2210
2174
|
|
|
2211
|
-
[src/Particle.js:
|
|
2175
|
+
[src/Particle.js:2396-2403](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2396-L2403 "Source code on GitHub")
|
|
2212
2176
|
|
|
2213
2177
|
Archives a ledger definition in the specified organization or sandbox by ledger name.
|
|
2214
2178
|
|
|
2215
2179
|
**Parameters**
|
|
2216
2180
|
|
|
2217
2181
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for archiving the ledger definition.
|
|
2218
|
-
- `options.auth` **
|
|
2182
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2219
2183
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2220
2184
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the ledger definition to archive.
|
|
2221
2185
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
@@ -2225,7 +2189,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2225
2189
|
|
|
2226
2190
|
### Scope
|
|
2227
2191
|
|
|
2228
|
-
[src/Particle.js:
|
|
2192
|
+
[src/Particle.js:2424-2437](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2424-L2437 "Source code on GitHub")
|
|
2229
2193
|
|
|
2230
2194
|
Type: (`"Owner"` \| `"Product"` \| `"Device"`)
|
|
2231
2195
|
|
|
@@ -2243,14 +2207,14 @@ Type: (`"Owner"` \| `"Product"` \| `"Device"`)
|
|
|
2243
2207
|
|
|
2244
2208
|
### listLedgers
|
|
2245
2209
|
|
|
2246
|
-
[src/Particle.js:
|
|
2210
|
+
[src/Particle.js:2424-2437](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2424-L2437 "Source code on GitHub")
|
|
2247
2211
|
|
|
2248
2212
|
Lists all ledger definitions in the specified organization or sandbox.
|
|
2249
2213
|
|
|
2250
2214
|
**Parameters**
|
|
2251
2215
|
|
|
2252
2216
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for listing ledger definitions.
|
|
2253
|
-
- `options.auth` **
|
|
2217
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2254
2218
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2255
2219
|
- `options.scope` **Scope?** Filter to show only ledgers of the specified scope
|
|
2256
2220
|
- `options.page` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Page of results to display
|
|
@@ -2263,14 +2227,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2263
2227
|
|
|
2264
2228
|
### getLedgerInstance
|
|
2265
2229
|
|
|
2266
|
-
[src/Particle.js:
|
|
2230
|
+
[src/Particle.js:2452-2459](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2452-L2459 "Source code on GitHub")
|
|
2267
2231
|
|
|
2268
2232
|
Get ledger instance data.
|
|
2269
2233
|
|
|
2270
2234
|
**Parameters**
|
|
2271
2235
|
|
|
2272
2236
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance.
|
|
2273
|
-
- `options.auth` **
|
|
2237
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2274
2238
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2275
2239
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name.
|
|
2276
2240
|
- `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value.
|
|
@@ -2281,7 +2245,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2281
2245
|
|
|
2282
2246
|
### SetMode
|
|
2283
2247
|
|
|
2284
|
-
[src/Particle.js:
|
|
2248
|
+
[src/Particle.js:2480-2491](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2480-L2491 "Source code on GitHub")
|
|
2285
2249
|
|
|
2286
2250
|
Type: (`"Replace"` \| `"Merge"`)
|
|
2287
2251
|
|
|
@@ -2299,14 +2263,14 @@ Type: (`"Replace"` \| `"Merge"`)
|
|
|
2299
2263
|
|
|
2300
2264
|
### setLedgerInstance
|
|
2301
2265
|
|
|
2302
|
-
[src/Particle.js:
|
|
2266
|
+
[src/Particle.js:2480-2491](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2480-L2491 "Source code on GitHub")
|
|
2303
2267
|
|
|
2304
2268
|
Set ledger instance data.
|
|
2305
2269
|
|
|
2306
2270
|
**Parameters**
|
|
2307
2271
|
|
|
2308
2272
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for updating the ledger instance.
|
|
2309
|
-
- `options.auth` **
|
|
2273
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2310
2274
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2311
2275
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name.
|
|
2312
2276
|
- `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value.
|
|
@@ -2319,14 +2283,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2319
2283
|
|
|
2320
2284
|
### deleteLedgerInstance
|
|
2321
2285
|
|
|
2322
|
-
[src/Particle.js:
|
|
2286
|
+
[src/Particle.js:2506-2513](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2506-L2513 "Source code on GitHub")
|
|
2323
2287
|
|
|
2324
2288
|
Delete a ledger instance in the specified organization or sandbox by ledger name.
|
|
2325
2289
|
|
|
2326
2290
|
**Parameters**
|
|
2327
2291
|
|
|
2328
2292
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for archiving the ledger instance.
|
|
2329
|
-
- `options.auth` **
|
|
2293
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2330
2294
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2331
2295
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the ledger instance to archive.
|
|
2332
2296
|
- `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value.
|
|
@@ -2337,14 +2301,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2337
2301
|
|
|
2338
2302
|
### listLedgerInstances
|
|
2339
2303
|
|
|
2340
|
-
[src/Particle.js:
|
|
2304
|
+
[src/Particle.js:2529-2540](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2529-L2540 "Source code on GitHub")
|
|
2341
2305
|
|
|
2342
2306
|
Lists ledger instances in the specified organization or sandbox.
|
|
2343
2307
|
|
|
2344
2308
|
**Parameters**
|
|
2345
2309
|
|
|
2346
2310
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for listing ledger instances.
|
|
2347
|
-
- `options.auth` **
|
|
2311
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2348
2312
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The unique identifier of the organization.
|
|
2349
2313
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the ledger instance to archive.
|
|
2350
2314
|
- `options.page` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Page of results to display
|
|
@@ -2356,14 +2320,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2356
2320
|
|
|
2357
2321
|
### listLedgerInstanceVersions
|
|
2358
2322
|
|
|
2359
|
-
[src/Particle.js:
|
|
2323
|
+
[src/Particle.js:2557-2568](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2557-L2568 "Source code on GitHub")
|
|
2360
2324
|
|
|
2361
2325
|
List ledger instance versions
|
|
2362
2326
|
|
|
2363
2327
|
**Parameters**
|
|
2364
2328
|
|
|
2365
2329
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance.
|
|
2366
|
-
- `options.auth` **
|
|
2330
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2367
2331
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2368
2332
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name.
|
|
2369
2333
|
- `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value.
|
|
@@ -2376,14 +2340,14 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2376
2340
|
|
|
2377
2341
|
### getLedgerInstanceVersion
|
|
2378
2342
|
|
|
2379
|
-
[src/Particle.js:
|
|
2343
|
+
[src/Particle.js:2584-2591](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2584-L2591 "Source code on GitHub")
|
|
2380
2344
|
|
|
2381
2345
|
Get specific ledger instance version
|
|
2382
2346
|
|
|
2383
2347
|
**Parameters**
|
|
2384
2348
|
|
|
2385
2349
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** The options for the ledger instance.
|
|
2386
|
-
- `options.auth` **
|
|
2350
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2387
2351
|
- `options.org` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The Organization ID or slug. If not provided, the request will go to your sandbox account.
|
|
2388
2352
|
- `options.ledgerName` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Ledger name.
|
|
2389
2353
|
- `options.scopeValue` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Scope value.
|
|
@@ -2395,7 +2359,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2395
2359
|
|
|
2396
2360
|
### listDeviceOsVersions
|
|
2397
2361
|
|
|
2398
|
-
[src/Particle.js:
|
|
2362
|
+
[src/Particle.js:2607-2622](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2607-L2622 "Source code on GitHub")
|
|
2399
2363
|
|
|
2400
2364
|
List Device OS versions
|
|
2401
2365
|
|
|
@@ -2406,7 +2370,7 @@ List Device OS versions
|
|
|
2406
2370
|
- `options.internalVersion` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Internal version number to filter Device OS versions
|
|
2407
2371
|
- `options.page` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Page number for pagination
|
|
2408
2372
|
- `options.perPage` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Number of items per page
|
|
2409
|
-
- `options.auth` **
|
|
2373
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2410
2374
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2411
2375
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
2412
2376
|
|
|
@@ -2414,7 +2378,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2414
2378
|
|
|
2415
2379
|
### getDeviceOsVersion
|
|
2416
2380
|
|
|
2417
|
-
[src/Particle.js:
|
|
2381
|
+
[src/Particle.js:2636-2645](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2636-L2645 "Source code on GitHub")
|
|
2418
2382
|
|
|
2419
2383
|
Get a specific Device OS version
|
|
2420
2384
|
|
|
@@ -2423,7 +2387,7 @@ Get a specific Device OS version
|
|
|
2423
2387
|
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options for this API call
|
|
2424
2388
|
- `options.version` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Version of the Device OS
|
|
2425
2389
|
- `options.platformId` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Optional platform ID to filter Device OS version
|
|
2426
|
-
- `options.auth` **
|
|
2390
|
+
- `options.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The access token. Can be ignored if provided in constructor
|
|
2427
2391
|
- `options.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2428
2392
|
- `options.context` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Request context
|
|
2429
2393
|
|
|
@@ -2431,20 +2395,20 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2431
2395
|
|
|
2432
2396
|
### setDefaultAuth
|
|
2433
2397
|
|
|
2434
|
-
[src/Particle.js:
|
|
2398
|
+
[src/Particle.js:2652-2658](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2652-L2658 "Source code on GitHub")
|
|
2435
2399
|
|
|
2436
2400
|
Set default auth token that will be used in each method if `auth` is not provided
|
|
2437
2401
|
|
|
2438
2402
|
**Parameters**
|
|
2439
2403
|
|
|
2440
|
-
- `auth` **
|
|
2404
|
+
- `auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The access token
|
|
2441
2405
|
|
|
2442
2406
|
|
|
2443
2407
|
- Throws **[Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** When not auth string is provided
|
|
2444
2408
|
|
|
2445
2409
|
### get
|
|
2446
2410
|
|
|
2447
|
-
[src/Particle.js:
|
|
2411
|
+
[src/Particle.js:2708-2712](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2708-L2712 "Source code on GitHub")
|
|
2448
2412
|
|
|
2449
2413
|
Make a GET request
|
|
2450
2414
|
|
|
@@ -2452,7 +2416,7 @@ Make a GET request
|
|
|
2452
2416
|
|
|
2453
2417
|
- `params` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
2454
2418
|
- `params.uri` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The URI to request
|
|
2455
|
-
- `params.auth` **
|
|
2419
|
+
- `params.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Authorization token to use
|
|
2456
2420
|
- `params.headers` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2457
2421
|
- `params.query` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs of query params or a correctly formatted string
|
|
2458
2422
|
- `params.context` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The invocation context, describing the tool and project
|
|
@@ -2461,7 +2425,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2461
2425
|
|
|
2462
2426
|
### head
|
|
2463
2427
|
|
|
2464
|
-
[src/Particle.js:
|
|
2428
|
+
[src/Particle.js:2724-2728](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2724-L2728 "Source code on GitHub")
|
|
2465
2429
|
|
|
2466
2430
|
Make a HEAD request
|
|
2467
2431
|
|
|
@@ -2469,7 +2433,7 @@ Make a HEAD request
|
|
|
2469
2433
|
|
|
2470
2434
|
- `params` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
2471
2435
|
- `params.uri` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The URI to request
|
|
2472
|
-
- `params.auth` **
|
|
2436
|
+
- `params.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Authorization token to use
|
|
2473
2437
|
- `params.headers` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2474
2438
|
- `params.query` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs of query params or a correctly formatted string
|
|
2475
2439
|
- `params.context` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The invocation context, describing the tool and project
|
|
@@ -2478,7 +2442,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2478
2442
|
|
|
2479
2443
|
### post
|
|
2480
2444
|
|
|
2481
|
-
[src/Particle.js:
|
|
2445
|
+
[src/Particle.js:2740-2744](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2740-L2744 "Source code on GitHub")
|
|
2482
2446
|
|
|
2483
2447
|
Make a POST request
|
|
2484
2448
|
|
|
@@ -2486,7 +2450,7 @@ Make a POST request
|
|
|
2486
2450
|
|
|
2487
2451
|
- `params` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
2488
2452
|
- `params.uri` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The URI to request
|
|
2489
|
-
- `params.auth` **
|
|
2453
|
+
- `params.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Authorization token to use
|
|
2490
2454
|
- `params.headers` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2491
2455
|
- `params.data` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))?** Request body
|
|
2492
2456
|
- `params.context` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The invocation context, describing the tool and project
|
|
@@ -2495,7 +2459,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2495
2459
|
|
|
2496
2460
|
### put
|
|
2497
2461
|
|
|
2498
|
-
[src/Particle.js:
|
|
2462
|
+
[src/Particle.js:2757-2761](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2757-L2761 "Source code on GitHub")
|
|
2499
2463
|
|
|
2500
2464
|
Make a PUT request
|
|
2501
2465
|
|
|
@@ -2503,7 +2467,7 @@ Make a PUT request
|
|
|
2503
2467
|
|
|
2504
2468
|
- `params` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
2505
2469
|
- `params.uri` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The URI to request
|
|
2506
|
-
- `params.auth` **
|
|
2470
|
+
- `params.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Authorization token to use
|
|
2507
2471
|
- `params.headers` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2508
2472
|
- `params.data` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))?** Request body
|
|
2509
2473
|
- `params.query` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs of query params or a correctly formatted string
|
|
@@ -2513,7 +2477,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2513
2477
|
|
|
2514
2478
|
### delete
|
|
2515
2479
|
|
|
2516
|
-
[src/Particle.js:
|
|
2480
|
+
[src/Particle.js:2773-2777](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2773-L2777 "Source code on GitHub")
|
|
2517
2481
|
|
|
2518
2482
|
Make a DELETE request
|
|
2519
2483
|
|
|
@@ -2521,7 +2485,7 @@ Make a DELETE request
|
|
|
2521
2485
|
|
|
2522
2486
|
- `params` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
2523
2487
|
- `params.uri` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The URI to request
|
|
2524
|
-
- `params.auth` **
|
|
2488
|
+
- `params.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Authorization token to use
|
|
2525
2489
|
- `params.headers` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2526
2490
|
- `params.data` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))?** Request body
|
|
2527
2491
|
- `params.context` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The invocation context, describing the tool and project
|
|
@@ -2530,7 +2494,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2530
2494
|
|
|
2531
2495
|
### request
|
|
2532
2496
|
|
|
2533
|
-
[src/Particle.js:
|
|
2497
|
+
[src/Particle.js:2794-2798](https://github.com/particle-iot/particle-api-js/blob/8e751f8815e7eea5381202011811386adc7968a6/src/Particle.js#L2794-L2798 "Source code on GitHub")
|
|
2534
2498
|
|
|
2535
2499
|
**Parameters**
|
|
2536
2500
|
|
|
@@ -2539,7 +2503,7 @@ Returns **[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
2539
2503
|
- `args.method` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** The method used to request the URI, should be in uppercase.
|
|
2540
2504
|
- `args.headers` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers.
|
|
2541
2505
|
- `args.data` **[object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Arbitrary data to send as the body.
|
|
2542
|
-
- `args.auth` **
|
|
2506
|
+
- `args.auth` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Authorization
|
|
2543
2507
|
- `args.query` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Query parameters
|
|
2544
2508
|
- `args.form` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Form fields
|
|
2545
2509
|
- `args.files` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Array of file names and file content
|