- Particle
- constructor
- login
- sendOtp
- enableMfa
- confirmMfa
- disableMfa
- createCustomer
- loginAsClientOwner
- createUser
- resetPassword
- deleteAccessToken
- deleteCurrentAccessToken
- deleteActiveAccessTokens
- deleteUser
- trackingIdentity
- listDevices
- getDevice
- claimDevice
- addDeviceToProduct
- removeDevice
- removeDeviceOwner
- renameDevice
- signalDevice
- setDeviceNotes
- markAsDevelopmentDevice
- lockDeviceProductFirmware
- unlockDeviceProductFirmware
- updateDevice
- unprotectDevice
- provisionDevice
- getClaimCode
- getVariable
- flashDevice
- compileCode
- downloadFirmwareBinary
- sendPublicKey
- callFunction
- getEventStream
- publishEvent
- Hook
- createWebhook
- deleteWebhook
- listWebhooks
- createIntegration
- editIntegration
- deleteIntegration
- listIntegrations
- getUserInfo
- setUserInfo
- changeUsername
- changeUserPassword
- listSIMs
- getSIMDataUsage
- getFleetDataUsage
- checkSIM
- removeSIM
- listBuildTargets
- listLibraries
- getLibrary
- getLibraryVersions
- contributeLibrary
- publishLibrary
- deleteLibrary
- downloadFile
- listOAuthClients
- createOAuthClient
- updateOAuthClient
- deleteOAuthClient
- listProducts
- getProduct
- listProductFirmware
- uploadProductFirmware
- getProductFirmware
- updateProductFirmware
- downloadProductFirmware
- downloadManufacturingBackup
- releaseProductFirmware
- listTeamMembers
- inviteTeamMember
- removeTeamMember
- lookupSerialNumber
- getProductConfiguration
- getProductConfigurationSchema
- getProductDeviceConfiguration
- getProductDeviceConfigurationSchema
- setProductConfiguration
- setProductDeviceConfiguration
- getProductLocations
- getProductDeviceLocations
- executeLogic
- createLogicFunction
- getLogicFunction
- updateLogicFunction
- deleteLogicFunction
- listLogicFunctions
- listLogicRuns
- getLogicRun
- getLogicRunLogs
- createLedger
- getLedger
- updateLedger
- archiveLedger
- Scope
- listLedgers
- getLedgerInstance
- SetMode
- setLedgerInstance
- deleteLedgerInstance
- listLedgerInstances
- listLedgerInstanceVersions
- getLedgerInstanceVersion
- listDeviceOsVersions
- getDeviceOsVersion
- listEnvVars
- updateEnvVars
- setEnvVar
- deleteEnvVar
- renderEnvVars
- reviewEnvVarsRollout
- startEnvVarsRollout
- setDefaultAuth
- get
- head
- post
- put
- patch
- delete
- request
Defined in: Particle.ts:18
Particle Cloud API wrapper.
See https://docs.particle.io/reference/javascript/ for examples
of using the Particle class.
Most Particle methods take a single unnamed argument object documented as
options with key/value pairs for each option.
Defined in: Particle.ts:42
Contructor for the Cloud API wrapper.
Create a new Particle object and call methods below on it.
Parameters
options?ParticleOptions={}Options for this API call Options to be used for all requests (see Defaults)
Returns Particle
Defined in: Particle.ts:99
Login to Particle Cloud using an existing Particle acccount.
Parameters
optionsLoginOptionsOptions for this API call
Returns Promise<JSONResponse<LoginResponse>> A promise that resolves with the response data
Defined in: Particle.ts:125
If login failed with an 'mfa_required' error, this must be called with a valid OTP code to login
Parameters
optionsSendOtpOptionsOptions for this API call
Returns Promise<JSONResponse<LoginResponse>> A promise that resolves with the response data
Defined in: Particle.ts:149
Enable MFA on the currently logged in user
Parameters
optionsEnableMfaOptionsOptions for this API call
Returns Promise<JSONResponse<EnableMfaResponse>> A promise that resolves with the response data
Defined in: Particle.ts:164
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.
Parameters
optionsConfirmMfaOptionsOptions for this API call
Returns Promise<JSONResponse<ConfirmMfaResponse>> A promise that resolves with the response data
Defined in: Particle.ts:189
Disable MFA for the user.
Parameters
optionsDisableMfaOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:209
Create Customer for Product.
Parameters
optionsCreateCustomerOptionsOptions for this API call
Returns Promise<JSONResponse<CreateCustomerResponse>> A promise that resolves with the response data
Defined in: Particle.ts:232
Login to Particle Cloud using an OAuth client.
Parameters
options?LoginAsClientOwnerOptions={}Options for this API call
Returns Promise<JSONResponse<LoginResponse>> A promise that resolves with the response data
Defined in: Particle.ts:257
Create a user account for the Particle Cloud
Parameters
optionsCreateUserOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:279
Send reset password email for a Particle Cloud user account
Parameters
optionsResetPasswordOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:296
Revoke an access token
Parameters
optionsDeleteAccessTokenOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:312
Revoke the current session access token
Parameters
optionsDeleteCurrentAccessTokenOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:329
Revoke all active access tokens
Parameters
optionsDeleteActiveAccessTokensOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:347
Delete the current user
Parameters
optionsDeleteUserOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:367
Retrieves the information that is used to identify the current login for tracking.
Parameters
options?TrackingIdentityOptions={}Options for this API call
Returns Promise<JSONResponse<TrackingIdentityResponse>> A promise that resolves with the response data
Defined in: Particle.ts:393
List devices claimed to the account or product
Parameters
optionsListDevicesOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceListResponse | DeviceInfo[]>> A promise that resolves with the response data
Defined in: Particle.ts:425
Get detailed informationa about a device
Parameters
optionsGetDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:440
Claim a device to the account. The device must be online and unclaimed.
Parameters
optionsClaimDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<ClaimResponse>> A promise that resolves with the response data
Defined in: Particle.ts:465
Add a device to a product or move device out of quarantine.
Parameters
optionsAddDeviceToProductOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:497
Unclaim / Remove a device from your account or product, or deny quarantine
Parameters
optionsRemoveDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:513
Unclaim a product device its the owner, but keep it in the product
Parameters
optionsRemoveDeviceOwnerOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:529
Rename a device
Parameters
optionsRenameDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:544
Instruct the device to turn on/off the LED in a rainbow pattern
Parameters
optionsSignalDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:559
Store some notes about device
Parameters
optionsOptions for this API calldeviceIdstringDevice ID or NamenotesstringYour notes about this deviceproduct?string|numberDevice in this product ID or slugauth?stringThe access token. Can be ignored if provided in constructorheaders?Record<string,string> Key/Value pairs like{ 'X-FOO': 'foo', X-BAR: 'bar' }to send as headers.context?{tool?:ToolContext;project?:ProjectContext; } Request contextcontext.tool?ToolContextcontext.project?ProjectContext
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:574
Mark device as being used in development of a product so it opts out of automatic firmware updates
Parameters
optionsOptions for this API calldeviceIdstringDevice ID or Namedevelopment?boolean=trueSet to true to mark as development, false to return to product fleetproductstring|numberDevice in this product ID or slugauth?stringThe access token. Can be ignored if provided in constructorheaders?Record<string,string> Key/Value pairs like{ 'X-FOO': 'foo', X-BAR: 'bar' }to send as headers.context?{tool?:ToolContext;project?:ProjectContext; } Request contextcontext.tool?ToolContextcontext.project?ProjectContext
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:590
Mark device as being used in development of a product, so it opts out of automatic firmware updates
Parameters
optionsOptions for this API calldeviceIdstringDevice ID or NamedesiredFirmwareVersionnumberLock the product device to run this firmware version.flash?booleanImmediately flash firmware indicated by desiredFirmwareVersionproductstring|numberDevice in this product ID or slugauth?stringThe access token. Can be ignored if provided in constructorheaders?Record<string,string> Key/Value pairs like{ 'X-FOO': 'foo', X-BAR: 'bar' }to send as headers.context?{tool?:ToolContext;project?:ProjectContext; } Request contextcontext.tool?ToolContextcontext.project?ProjectContext
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:604
Mark device as receiving automatic firmware updates
Parameters
optionsOptions for this API calldeviceIdstringDevice ID or Nameproductstring|numberDevice in this product ID or slugauth?stringThe access token. Can be ignored if provided in constructorheaders?Record<string,string> Key/Value pairs like{ 'X-FOO': 'foo', X-BAR: 'bar' }to send as headers.context?{tool?:ToolContext;project?:ProjectContext; } Request contextcontext.tool?ToolContextcontext.project?ProjectContext
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:625
Update multiple device attributes at the same time
Parameters
optionsUpdateDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:657
Disable device protection.
Parameters
optionsUnprotectDeviceOptionsOptions for this API call.
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:684
Provision a new device for products that allow self-provisioning
Parameters
optionsProvisionDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceInfo>> A promise that resolves with the response data
Defined in: Particle.ts:706
Generate a claim code to use in the device claiming process. To generate a claim code for a product, the access token MUST belong to a customer of the product.
Parameters
optionsGetClaimCodeOptionsOptions for this API call
Returns Promise<JSONResponse<ClaimCodeResponse>> A promise that resolves with the response data
Defined in: Particle.ts:722
Get the value of a device variable
Parameters
optionsGetVariableOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceVariableResponse>> A promise that resolves with the response data
Defined in: Particle.ts:742
Compile and flash application firmware to a device. Pass a pre-compiled binary to flash it directly to the device.
Parameters
optionsFlashDeviceOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:766
Compile firmware using the Particle Cloud
Parameters
optionsCompileCodeOptionsOptions for this API call
Returns Promise<JSONResponse<CompileResponse>> A promise that resolves with the response data
Defined in: Particle.ts:795
Download a firmware binary
Parameters
optionsDownloadFirmwareBinaryOptionsOptions for this API call
Returns Promise<Buffer | ArrayBuffer> A promise that resolves with the binary data
Defined in: Particle.ts:817
Send a new device public key to the Particle Cloud
Parameters
optionsSendPublicKeyOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:845
Call a device function
Parameters
optionsCallFunctionOptionsOptions for this API call
Returns Promise<JSONResponse<FunctionCallResponse>> A promise that resolves with the response data
Defined in: Particle.ts:863
Get a stream of events
Parameters
optionsGetEventStreamOptionsOptions for this API call
Returns Promise<EventStream> A promise that resolves with the response data emit 'event' events.
Defined in: Particle.ts:902
Publish a event to the Particle Cloud
Parameters
optionsPublishEventOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:940
Type: Object
Properties
methodstring(optional, defaultPOST) Type of web request triggered by the Webhook (GET, POST, PUT, or DELETE)authobject(optional) Auth data like{ user: 'me', pass: '1234' }for basic auth or{ bearer: 'token' }to send with the Webhook requestheadersobject(optional) Additional headers to add to the Webhook like{ 'X-ONE': '1', X-TWO: '2' }queryobject(optional) Query params to add to the Webhook request like{ foo: 'foo', bar: 'bar' }jsonobject(optional) JSON data to send with the Webhook request - setsContent-Typetoapplication/jsonformobject(optional) Form data to send with the Webhook request - setsContent-Typetoapplication/x-www-form-urlencodedbodystring(optional) Custom body to send with the Webhook requestresponseTemplateobject(optional) Template to use to customize the Webhook response bodyresponseEventobject(optional) The Webhook response event name that your devices can subscribe toerrorResponseEventobject(optional) The Webhook error response event name that your devices can subscribe to
Defined in: Particle.ts:937
Create a webhook
Parameters
optionsCreateWebhookOptionsOptions for this API call
Returns Promise<JSONResponse<CreateWebhookResponse>> A promise that resolves with the response data
Defined in: Particle.ts:971
Delete a webhook
Parameters
optionsDeleteWebhookOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:985
List all webhooks owned by the account or product
Parameters
optionsListWebhooksOptionsOptions for this API call
Returns Promise<JSONResponse<WebhookInfo[]>> A promise that resolves with the response data
Defined in: Particle.ts:1006
Create an integration to send events to an external service
See the API docs for details https://docs.particle.io/reference/api/#integrations-webhooks-
Parameters
optionsCreateIntegrationOptionsOptions for this API call
Returns Promise<JSONResponse<IntegrationInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1029
Edit an integration to send events to an external service
See the API docs for details https://docs.particle.io/reference/api/#integrations-webhooks-
Parameters
optionsEditIntegrationOptionsOptions for this API call
Returns Promise<JSONResponse<IntegrationInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1047
Delete an integration to send events to an external service
Parameters
optionsDeleteIntegrationOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1062
List all integrations owned by the account, product, or organization
Parameters
optionsListIntegrationsOptionsOptions for this API call
Returns Promise<JSONResponse<IntegrationInfo[]>> A promise that resolves with the response data
Defined in: Particle.ts:1095
Get details about the current user
Parameters
optionsOptions for this API callauth?stringThe access token. Can be ignored if provided in constructorheaders?Record<string,string> Key/Value pairs like{ 'X-FOO': 'foo', X-BAR: 'bar' }to send as headers.context?{tool?:ToolContext;project?:ProjectContext; } Request contextcontext.tool?ToolContextcontext.project?ProjectContext
Returns Promise<JSONResponse<UserInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1108
Set details on the current user
Parameters
optionsSetUserInfoOptionsOptions for this API call
Returns Promise<JSONResponse<UserInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1124
Change username (i.e, email)
Parameters
optionsChangeUsernameOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1145
Change user's password
Parameters
optionsChangeUserPasswordOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1169
List SIM cards owned by a user or product
Parameters
optionsListSIMsOptionsOptions for this API call
Returns Promise<JSONResponse<SimInfo[]>> A promise that resolves with the response data
Defined in: Particle.ts:1185
Get data usage for one SIM card for the current billing period
Parameters
optionsGetSIMDataUsageOptionsOptions for this API call
Returns Promise<JSONResponse<SimDataUsage>> A promise that resolves with the response data
Defined in: Particle.ts:1202
Get data usage for all SIM cards in a product the current billing period
Parameters
optionsGetFleetDataUsageOptionsOptions for this API call
Returns Promise<JSONResponse<SimDataUsage>> A promise that resolves with the response data
Defined in: Particle.ts:1220
Check SIM status
Parameters
optionsCheckSIMOptionsOptions for this API call
Returns Promise<JSONResponse<SimInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1234
Remove a SIM card from an account so it can be activated by a different account
Parameters
optionsRemoveSIMOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1248
List valid build targets to be used for compiling
Parameters
optionsListBuildTargetsOptionsOptions for this API call
Returns Promise<JSONResponse<BuildTargetsResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1277
List firmware libraries
Parameters
optionsListLibrariesOptionsOptions for this API call
Returns Promise<JSONResponse<{ data: LibraryInfo[]; }>> A promise
Defined in: Particle.ts:1310
Get firmware library details
Parameters
optionsGetLibraryOptionsOptions for this API call
Returns Promise<JSONResponse<{ data: LibraryInfo; }>> A promise
Defined in: Particle.ts:1331
Firmware library details for each version
Parameters
optionsGetLibraryVersionsOptionsOptions for this API call
Returns Promise<JSONResponse<{ data: LibraryInfo[]; }>> A promise
Defined in: Particle.ts:1351
Contribute a new library version from a compressed archive
Parameters
optionsContributeLibraryOptionsOptions for this API call
Returns Promise<JSONResponse<{ data: LibraryInfo; }>> A promise
Defined in: Particle.ts:1375
Publish the latest version of a library to the public
Parameters
optionsPublishLibraryOptionsOptions for this API call
Returns Promise<JSONResponse<{ data: LibraryInfo; }>> A promise
Defined in: Particle.ts:1396
Delete one version of a library or an entire private library
Parameters
optionsDeleteLibraryOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1414
Download an external file that may not be on the API
Parameters
optionsDownloadFileOptionsOptions for this API call
Returns Promise<Buffer | ArrayBuffer> A promise that resolves with the binary data
Defined in: Particle.ts:1427
List OAuth client created by the account
Parameters
optionsListOAuthClientsOptionsOptions for this API call
Returns Promise<JSONResponse<{ clients: OAuthClientInfo[]; }>> A promise
Defined in: Particle.ts:1445
Create an OAuth client
Parameters
optionsCreateOAuthClientOptionsOptions for this API call
Returns Promise<JSONResponse<OAuthClientInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1463
Update an OAuth client
Parameters
optionsUpdateOAuthClientOptionsOptions for this API call
Returns Promise<JSONResponse<OAuthClientInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1479
Delete an OAuth client
Parameters
optionsDeleteOAuthClientOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1492
List products the account has access to
Parameters
optionsListProductsOptionsOptions for this API call
Returns Promise<JSONResponse<{ products: ProductInfo[]; }>> A promise
Defined in: Particle.ts:1505
Get detailed information about a product
Parameters
optionsGetProductOptionsOptions for this API call
Returns Promise<JSONResponse<{ product: ProductInfo; }>> A promise
Defined in: Particle.ts:1518
List product firmware versions
Parameters
optionsListProductFirmwareOptionsOptions for this API call
Returns Promise<JSONResponse<ProductFirmwareInfo[]>> A promise that resolves with the response data
Defined in: Particle.ts:1536
List product firmware versions
Parameters
optionsUploadProductFirmwareOptionsOptions for this API call
Returns Promise<JSONResponse<ProductFirmwareInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1564
Get information about a product firmware version
Parameters
optionsGetProductFirmwareOptionsOptions for this API call
Returns Promise<JSONResponse<ProductFirmwareInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1585
Update information for a product firmware version
Parameters
optionsUpdateProductFirmwareOptionsOptions for this API call
Returns Promise<JSONResponse<ProductFirmwareInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1600
Download a product firmware binary
Parameters
optionsDownloadProductFirmwareOptionsOptions for this API call
Returns Promise<Buffer | ArrayBuffer> A promise that resolves with the binary data
Defined in: Particle.ts:1620
Download a tachyon manufacturing backup files
Parameters
optionsDownloadManufacturingBackupOptionsOptions for this API call
Returns Promise<Buffer | ArrayBuffer> A promise that resolves with the binary data
Defined in: Particle.ts:1641
Release a product firmware version as the default version
Parameters
optionsReleaseFirmwareOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1655
List product team members
Parameters
optionsListTeamMembersOptionsOptions for this API call
Returns Promise<JSONResponse<TeamMember[]>> A promise that resolves with the response data
Defined in: Particle.ts:1674
Invite Particle user to a product team
Parameters
optionsInviteTeamMemberOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1694
Remove Particle user to a product team
Parameters
optionsRemoveTeamMemberOptionsOptions for this API call
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1712
Fetch details about a serial number
Parameters
optionsLookupSerialNumberOptionsOptions for this API call
Returns Promise<JSONResponse<SerialNumberResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1730
Get product configuration
Parameters
optionsGetProductConfigurationOptionsOptions for this API call
Returns Promise<JSONResponse<ProductConfigurationResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1748
Get product configuration schema
Parameters
optionsGetProductConfigurationSchemaOptionsOptions for this API call
Returns Promise<JSONResponse<object>> A promise that resolves with the response data
Defined in: Particle.ts:1768
Get product device's configuration
Parameters
optionsGetProductDeviceConfigurationOptionsOptions for this API call
Returns Promise<JSONResponse<ProductConfigurationResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1787
Get product device's configuration schema
Parameters
optionsGetProductDeviceConfigurationSchemaOptionsOptions for this API call
Returns Promise<JSONResponse<object>> A promise that resolves with the response data
Defined in: Particle.ts:1807
Set product configuration
Parameters
optionsSetProductConfigurationOptionsOptions for this API call
Returns Promise<JSONResponse<ProductConfigurationResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1828
Set product configuration for a specific device within the product
Parameters
optionsSetProductDeviceConfigurationOptionsOptions for this API call
Returns Promise<JSONResponse<ProductConfigurationResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1855
Query location for devices within a product
Parameters
optionsGetProductLocationsOptionsOptions for this API call
Returns Promise<JSONResponse<LocationListResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1889
Query location for one device within a product
Parameters
optionsGetProductDeviceLocationsOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceLocationInfo>> A promise that resolves with the response data
Defined in: Particle.ts:1917
Executes the provided logic function once and returns the result. No logs, runs, etc are saved
NOTE: Any external interactions such as Particle.publish will actually occur when the logic is executed.
Parameters
optionsExecuteLogicOptionsThe options for creating the logic function.
Returns Promise<JSONResponse<ExecuteLogicResponse>> A promise that resolves with the response data
Defined in: Particle.ts:1945
Creates a new logic function in the specified organization or sandbox using the provided function data.
When you create a logic function with Event logic triggers, events will immediately start being handled by the function code.
When you create a Scheduled logic trigger, it will immediately be scheduled at the next time according to the cron and start_at properties.
Parameters
optionsCreateLogicFunctionOptionsThe options for creating the logic function.
Returns Promise<JSONResponse<{ logic_function: LogicFunction; }>> A promise that resolves to the created logic function data.
Defined in: Particle.ts:1967
Get a logic function in the specified organization or sandbox by logic function ID.
Parameters
optionsGetLogicFunctionOptionsThe options for the logic function.
Returns Promise<JSONResponse<{ logic_function: LogicFunction; }>> A promise that resolves to the specified logic function data.
Defined in: Particle.ts:1991
Updates an existing logic function in the specified organization or sandbox using the provided function data.
If you include an id on a logic trigger, it will update the logic trigger in place.
Parameters
optionsUpdateLogicFunctionOptionsThe options for updating the logic function.
Returns Promise<JSONResponse<{ logic_function: LogicFunction; }>> A promise that resolves to the updated logic function data.
Defined in: Particle.ts:2013
Deletes a logic function in the specified organization or sandbox by logic function ID.
Parameters
optionsDeleteLogicFunctionOptionsThe options for deleting the logic function.
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:2034
Lists all logic functions in the specified organization or sandbox.
Parameters
optionsListLogicFunctionsOptionsThe options for listing logic functions.
Returns Promise<JSONResponse<{ logic_functions: LogicFunction[]; }>> A promise that resolves to an array of logic functions data.
Defined in: Particle.ts:2058
Lists all logic runs for the specified logic function in the specified organization or sandbox.
Parameters
optionsListLogicRunsOptionsThe options for the request.
Returns Promise<JSONResponse<{ logic_runs: LogicRun[]; }>> A promise that resolves to an array of logic run data.
Defined in: Particle.ts:2080
Retrieves a logic run by its ID for the specified logic function in the specified organization or sandbox.
Parameters
optionsGetLogicRunOptionsThe options for the request.
Returns Promise<JSONResponse<{ logic_run: LogicRun; }>> A promise that resolves to an array of logic run data for the specified logic run ID.
Defined in: Particle.ts:2102
Retrieves the logs for a logic run by its ID for the specified logic function in the specified organization or sandbox.
Parameters
optionsGetLogicRunLogsOptionsThe options for the request.
Returns Promise<JSONResponse<{ logs: LogicRunLog[]; }>> A promise that resolves to the logs for the specified logic run ID.
Defined in: Particle.ts:2123
Creates a new ledger definition in the specified organization or sandbox.
Parameters
optionsCreateLedgerOptionsThe options for creating the ledger definition.
Returns Promise<JSONResponse<LedgerDefinition>> A promise that resolves with the response data
Defined in: Particle.ts:2145
Get a ledger definition in the specified organization or sandbox by ledger name.
Parameters
optionsGetLedgerOptionsThe options for the ledger definition.
Returns Promise<JSONResponse<LedgerDefinition>> A promise that resolves with the response data
Defined in: Particle.ts:2167
Updates an existing ledger definition in the specified organization or sandbox.
Parameters
optionsUpdateLedgerOptionsThe options for updating the ledger definition.
Returns Promise<JSONResponse<LedgerDefinition>> A promise that resolves with the response data
Defined in: Particle.ts:2189
Archives a ledger definition in the specified organization or sandbox by ledger name.
Parameters
optionsArchiveLedgerOptionsThe options for archiving the ledger definition.
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:2436
Type: "Owner" | "Product" | "Device"
Defined in: Particle.ts:2217
Lists all ledger definitions in the specified organization or sandbox.
Parameters
optionsListLedgersOptionsThe options for listing ledger definitions.
Returns Promise<JSONResponse<{ ledger_definitions: LedgerDefinition[]; }>> A promise that resolves to an array of ledger definition data.
Defined in: Particle.ts:2245
Get ledger instance data.
Parameters
optionsGetLedgerInstanceOptionsThe options for the ledger instance.
Returns Promise<JSONResponse<LedgerInstance>> A promise that resolves with the response data
Defined in: Particle.ts:2492
Type: "Replace" | "Merge"
Defined in: Particle.ts:2273
Set ledger instance data.
Parameters
optionsSetLedgerInstanceOptionsThe options for updating the ledger instance.
Returns Promise<JSONResponse<LedgerInstance>> A promise that resolves with the response data
Defined in: Particle.ts:2299
Delete a ledger instance in the specified organization or sandbox by ledger name.
Parameters
optionsDeleteLedgerInstanceOptionsThe options for archiving the ledger instance.
Returns Promise<JSONResponse<OKResponse>> A promise that resolves with the response data
Defined in: Particle.ts:2322
Lists ledger instances in the specified organization or sandbox.
Parameters
optionsListLedgerInstancesOptionsThe options for listing ledger instances.
Returns Promise<JSONResponse<LedgerInstanceListResponse>> A promise that resolves with the response data
Defined in: Particle.ts:2350
List ledger instance versions
Parameters
optionsListLedgerInstanceVersionsOptionsThe options for the ledger instance.
Returns Promise<JSONResponse<LedgerVersionListResponse>> A promise that resolves with the response data
Defined in: Particle.ts:2377
Get specific ledger instance version
Parameters
optionsGetLedgerInstanceVersionOptionsThe options for the ledger instance.
Returns Promise<JSONResponse<LedgerInstance>> A promise that resolves with the response data
Defined in: Particle.ts:2400
List Device OS versions
Parameters
optionsListDeviceOsVersionsOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceOsVersion[]>> A promise that resolves with the response data
Defined in: Particle.ts:2429
Get a specific Device OS version
Parameters
optionsGetDeviceOsVersionOptionsOptions for this API call
Returns Promise<JSONResponse<DeviceOsVersion>> A promise that resolves with the response data
Defined in: Particle.ts:2454
List environment variables for the given scope.
Parameters
optionsListEnvVarsOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsResponse>> A promise that resolves with the env vars data
Defined in: Particle.ts:2476
Bulk update environment variables with set/unset operations.
Parameters
optionsUpdateEnvVarsOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsResponse>> A promise that resolves with the updated env vars data
Defined in: Particle.ts:2500
Set a single environment variable.
Parameters
optionsSetEnvVarOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsResponse>> A promise that resolves with the updated env vars data
Defined in: Particle.ts:2523
Delete a single environment variable.
Parameters
optionsDeleteEnvVarOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsResponse>> A promise that resolves with the updated env vars data
Defined in: Particle.ts:2544
Get the rendered (flattened) environment variables for the given scope.
Parameters
optionsRenderEnvVarsOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsRenderResponse>> A promise that resolves with the rendered env vars
Defined in: Particle.ts:2565
Review the pending environment variables rollout changes.
Parameters
optionsReviewEnvVarsRolloutOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsRolloutResponse>> A promise that resolves with the rollout diff
Defined in: Particle.ts:2587
Start rolling out environment variables to devices.
Parameters
optionsStartEnvVarsRolloutOptionsOptions for this API call
Returns Promise<JSONResponse<EnvVarsRolloutStartResponse>> A promise that resolves with success status
Defined in: Particle.ts:2600
Set default auth token that will be used in each method if auth is not provided
Parameters
authstringThe access token
Returns void
When not auth string is provided
get<
T>(params:T.GetHeadOptions):Promise<JSONResponse<T>>
Defined in: Particle.ts:2657
Make a GET request
T = object
Parameters
paramsT.GetHeadOptions
Returns Promise<JSONResponse<T>> A promise that resolves with the response data
head<
T>(params:T.GetHeadOptions):Promise<JSONResponse<T>>
Defined in: Particle.ts:2673
Make a HEAD request
T = object
Parameters
paramsT.GetHeadOptions
Returns Promise<JSONResponse<T>> A promise that resolves with the response data
post<
T>(params:T.MutateOptions):Promise<JSONResponse<T>>
Defined in: Particle.ts:2689
Make a POST request
T = object
Parameters
paramsT.MutateOptions
Returns Promise<JSONResponse<T>> A promise that resolves with the response data
put<
T>(params:T.MutateOptions):Promise<JSONResponse<T>>
Defined in: Particle.ts:2706
Make a PUT request
T = object
Parameters
paramsT.MutateOptions
Returns Promise<JSONResponse<T>> A promise that resolves with the response data
patch<
T>(params:T.MutateOptions):Promise<JSONResponse<T>>
Defined in: Particle.ts:2722
Make a PATCH request
T = object
Parameters
paramsT.MutateOptions
Returns Promise<JSONResponse<T>> A promise that resolves with the response data
delete<
T>(params:T.MutateOptions):Promise<JSONResponse<T>>
Defined in: Particle.ts:2738
Make a DELETE request
T = object
Parameters
paramsT.MutateOptions
Returns Promise<JSONResponse<T>> A promise that resolves with the response data
Defined in: Particle.ts:2759
Parameters
argsAgentRequestOptionsAn obj with all the possible request configurations
Returns Promise<RequestResponse<object>> A promise that resolves with the response data