Device

balena.models.device : object

Kind: static namespace


deactivate

balena.models.device.deactivate(uuidOrIdOrArray)Promise

Kind: static method of device Summary: Deactivate device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example

balena.models.device.deactivate('7cf02a69e4d34c9da573914963cf54fd');

Example

balena.models.device.deactivate(123);

disableDeviceUrl

balena.models.device.disableDeviceUrl(uuidOrIdOrArray)Promise

Kind: static method of device Summary: Disable device url for a device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example

Example


disableLocalMode

balena.models.device.disableLocalMode(uuidOrId)Promise

Kind: static method of device Summary: Disable local mode Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


disableLockOverride

balena.models.device.disableLockOverride(uuidOrId)Promise

Kind: static method of device Summary: Disable lock override Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


enableDeviceUrl

balena.models.device.enableDeviceUrl(uuidOrIdOrArray)Promise

Kind: static method of device Summary: Enable device url for a device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example

Example


enableLocalMode

balena.models.device.enableLocalMode(uuidOrId)Promise

Kind: static method of device Summary: Enable local mode Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


enableLockOverride

balena.models.device.enableLockOverride(uuidOrId)Promise

Kind: static method of device Summary: Enable lock override Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


generateDeviceKey

balena.models.device.generateDeviceKey(uuidOrId, [keyName], [keyDescription])Promise

Kind: static method of device Summary: Generate a device key Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[keyName]

String

Device key name

[keyDescription]

String

Description for device key

Example

Example


generateUniqueKey

balena.models.device.generateUniqueKey()String

Kind: static method of device Summary: Generate a random key, useful for both uuid and api key. Returns: String - A generated key Access: public Example


get

balena.models.device.get(uuidOrId, [options])Promise

This method returns a single device by id or uuid. In order to have the following computed properties in the result you have to explicitly define them in a $select in the extra options:

  • overall_status

  • overall_progress

  • should_be_running__release

Kind: static method of device Summary: Get a single device Access: public Fulfil: Object - device

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example

Example


getAllByApplication

balena.models.device.getAllByApplication(slugOrUuidOrId, [options])Promise

This method returns all devices of a specific application. In order to have the following computed properties in the result you have to explicitly define them in a $select in the extra options:

  • overall_status

  • overall_progress

  • should_be_running__release

Kind: static method of device Summary: Get all devices by application Access: public Fulfil: Object[] - devices

Param
Type
Default
Description

slugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example

Example


getAllByOrganization

balena.models.device.getAllByOrganization(handleOrId, [options])Promise

This method returns all devices of a specific application. In order to have the following computed properties in the result you have to explicitly define them in a $select in the extra options:

  • overall_status

  • overall_progress

  • should_be_running__release

Kind: static method of device Summary: Get all devices by organization Access: public Fulfil: Object[] - devices

Param
Type
Default
Description

handleOrId

String | Number

organization handle (string) or id (number).

[options]

Object

{}

extra pine options to use

Example

Example

Example


getApplicationName

balena.models.device.getApplicationName(uuidOrId)Promise

Kind: static method of device Summary: Get application name Access: public Fulfil: String - application name

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getByName

balena.models.device.getByName(name)Promise

Kind: static method of device Summary: Get devices by name Access: public Fulfil: Object[] - devices

Param
Type
Description

name

String

device name

Example


getDashboardUrl

balena.models.device.getDashboardUrl(uuid)String

Kind: static method of device Summary: Get Dashboard URL for a specific device Returns: String - - Dashboard URL for the specific device Throws:

  • Exception if the uuid is empty

Param
Type
Description

uuid

String

Device uuid

Example


getDeviceUrl

balena.models.device.getDeviceUrl(uuidOrId)Promise

Kind: static method of device Summary: Get a device url Access: public Fulfil: String - device url

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getLocalIPAddresses

balena.models.device.getLocalIPAddresses(uuidOrId)Promise

Kind: static method of device Summary: Get the local IP addresses of a device Access: public Fulfil: String[] - local ip addresses Reject: Error Will reject if the device is offline

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getLocalModeSupport

balena.models.device.getLocalModeSupport(device)Object

Kind: static method of device Summary: Returns whether local mode is supported along with a message describing the reason why local mode is not supported. Returns: Object - Local mode support info ({ supported: true/false, message: "..." }) Access: public

Param
Type
Description

device

Object

A device object

Example


getMACAddresses

balena.models.device.getMACAddresses(uuidOrId)Promise

Kind: static method of device Summary: Get the MAC addresses of a device Access: public Fulfil: String[] - mac addresses

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getMetrics

balena.models.device.getMetrics(uuidOrId)Promise

Kind: static method of device Summary: Get the metrics related information for a device Access: public Fulfil: Object - device metrics

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getName

balena.models.device.getName(uuidOrId)Promise

Kind: static method of device Summary: Get the name of a device Access: public Fulfil: String - device name

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getOsVersion

balena.models.device.getOsVersion(device)String

Kind: static method of device Summary: Get the OS version (version number and variant combined) running on a device Access: public

Param
Type
Description

device

Object

A device object

Example


getProgress

balena.models.device.getProgress(uuidOrId)Promise

Convenience method for getting the overall progress of a device. It's recommended to use balena.models.device.get() instead, in case that you need to retrieve more device fields than just the progress.

Kind: static method of device Summary: Get the progress of a device Access: public Fulfil: Number|null - device progress See: get for an example on selecting the overall_progress field.

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getStatus

balena.models.device.getStatus(uuidOrId)Promise

Convenience method for getting the overall status of a device. It's recommended to use balena.models.device.get() instead, in case that you need to retrieve more device fields than just the status.

Kind: static method of device Summary: Get the status of a device Access: public Fulfil: String - device status See: get for an example on selecting the overall_status field.

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getSupervisorState

balena.models.device.getSupervisorState(uuidOrId)Promise

Kind: static method of device Summary: Get the supervisor state on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getSupervisorTargetState

balena.models.device.getSupervisorTargetState(uuidOrId, version)Promise

Kind: static method of device Summary: Get the target supervisor state on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

version

Number

(optional) target state version (2 or 3), default to 2

Example

Example

Example


getSupervisorTargetStateForApp

balena.models.device.getSupervisorTargetStateForApp(uuidOrId, release)Promise

Kind: static method of device Summary: Get the target supervisor state on a "generic" device on a fleet Access: public

Param
Type
Description

uuidOrId

String | Number

fleet uuid (string) or id (number)

release

String

(optional) release uuid (default tracked)

Example

Example

Example


getTargetReleaseHash

balena.models.device.getTargetReleaseHash(uuidOrId)Promise

Kind: static method of device Summary: Get the hash of the currently tracked release for a specific device Access: public Fulfil: String - The release hash of the currently tracked release

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


getWithServiceDetails

balena.models.device.getWithServiceDetails(uuidOrId, [options])Promise

This method does not map exactly to the underlying model: it runs a larger prebuilt query, and reformats it into an easy to use and understand format. If you want more control, or to see the raw model directly, use device.get(uuidOrId, options) instead.

Kind: static method of device Summary: Get a single device along with its associated services' details, including their associated commit Access: public Fulfil: Object - device with service details

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


grantSupportAccess

balena.models.device.grantSupportAccess(uuidOrIdOrArray, expiryTimestamp)Promise

Kind: static method of device Summary: Grant support access to a device until a specified time Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

expiryTimestamp

Number

a timestamp in ms for when the support access will expire

Example

Example


has

balena.models.device.has(uuidOrId)Promise

Kind: static method of device Summary: Check if a device exists Access: public Fulfil: Boolean - has device

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


hasDeviceUrl

balena.models.device.hasDeviceUrl(uuidOrId)Promise

Kind: static method of device Summary: Check if a device is web accessible with device utls Access: public Fulfil: Boolean - has device url

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


hasLockOverride

balena.models.device.hasLockOverride(uuidOrId)Promise

Kind: static method of device Summary: Check if a device has the lock override enabled Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


identify

balena.models.device.identify(uuidOrId)Promise

Kind: static method of device Summary: Identify device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


isInLocalMode

balena.models.device.isInLocalMode(uuidOrId)Promise

Kind: static method of device Summary: Check if local mode is enabled on the device Access: public Fulfil: Boolean - has device url

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


isOnline

balena.models.device.isOnline(uuidOrId)Promise

Kind: static method of device Summary: Check if a device is online Access: public Fulfil: Boolean - is device online

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


isTrackingApplicationRelease

balena.models.device.isTrackingApplicationRelease(uuidOrId)Promise

Kind: static method of device Summary: Get whether the device is configured to track the current application release Access: public Fulfil: Boolean - is tracking the current application release

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example


move

balena.models.device.move(uuidOrIdOrArray, applicationSlugOrUuidOrId)Promise

Kind: static method of device Summary: Move a device to another application Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

applicationSlugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

Example

Example

Example


ping

balena.models.device.ping(uuidOrId)Promise

This is useful to signal that the supervisor is alive and responding.

Kind: static method of device Summary: Ping a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


pinToOsRelease

balena.models.device.pinToOsRelease(uuidOrIdOrArray, osVersionOrId)Promise

Kind: static method of device Summary: Mark a specific device to be updated to a particular OS release Access: public Experimental:

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

osVersionOrId

String

the raw version of a OS release (string) or id (number) Unsupported (unpublished) version will result in rejection. The version must be the exact version number, a "prod" variant and greater than or equal to the one running on the device. To resolve compatible update targets for a device use balena.models.os.getSupportedOsUpdateVersions.

Example


pinToRelease

balena.models.device.pinToRelease(uuidOrIdOrArray, fullReleaseHashOrId)Promise

Configures the device to run a particular release and not get updated when the current application release changes.

Kind: static method of device Summary: Set a specific device to run a particular release Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

fullReleaseHashOrId

String | Number

the hash of a successful release (string) or id (number)

Example

Example


pinToSupervisorRelease

balena.models.device.pinToSupervisorRelease(uuidOrIdOrArray, supervisorVersionOrId)Promise

Configures the device to run a particular supervisor release.

Kind: static method of device Summary: Set a specific device to run a particular supervisor release Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

supervisorVersionOrId

String | Number

the raw version of a supervisor release (string) or id (number)

Example

Example


purge

balena.models.device.purge(uuidOrId)Promise

This function clears the user application's /data directory.

Kind: static method of device Summary: Purge device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


reboot

balena.models.device.reboot(uuidOrId, [options])Promise

Kind: static method of device Summary: Reboot device Access: public

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

options

[options.force]

Boolean

false

override update lock

Example

Example


register

balena.models.device.register(applicationSlugOrUuidOrId, uuid, [deviceTypeSlug])Promise

Kind: static method of device Summary: Register a new device with a Balena application. Access: public Fulfil: Object Device registration info ({ id: "...", uuid: "...", api_key: "..." })

Param
Type
Description

applicationSlugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

uuid

String

device uuid

[deviceTypeSlug]

String

device type slug (string) or alias (string)

Example

Example

Example


remove

balena.models.device.remove(uuidOrIdOrArray)Promise

Kind: static method of device Summary: Remove device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example

Example


rename

balena.models.device.rename(uuidOrId, newName)Promise

Kind: static method of device Summary: Rename device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

newName

String

the device new name

Example

Example


restartApplication

balena.models.device.restartApplication(uuidOrId)Promise

This function restarts the Docker container running the application on the device, but doesn't reboot the device itself.

Kind: static method of device Summary: Restart application on device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

Example

Example


restartService

balena.models.device.restartService(uuidOrId, imageId)Promise

Kind: static method of device Summary: Restart a service on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

imageId

Number

id of the image to restart

Example

Example


revokeSupportAccess

balena.models.device.revokeSupportAccess(uuidOrIdOrArray)Promise

Kind: static method of device Summary: Revoke support access to a device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example

Example


setCustomLocation

balena.models.device.setCustomLocation(uuidOrIdOrArray, location)Promise

Kind: static method of device Summary: Set a custom location for a device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

location

Object

the location ({ latitude: 123, longitude: 456 })

Example

Example


setNote

balena.models.device.setNote(uuidOrIdOrArray, note)Promise

Kind: static method of device Summary: Note a device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

note

String

the note

Example

Example


shutdown

balena.models.device.shutdown(uuidOrId, [options])Promise

Kind: static method of device Summary: Shutdown device Access: public

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

options

[options.force]

Boolean

false

override update lock

Example

Example


startOsUpdate

balena.models.device.startOsUpdate(uuidOrUuids, targetOsVersion, [options])Promise

Kind: static method of device Summary: Start an OS update on a device Access: public Fulfil: Object - action response

Param
Type
Description

uuidOrUuids

String | Array.<String>

full device uuid or array of full uuids

targetOsVersion

String

semver-compatible version for the target device Unsupported (unpublished) version will result in rejection. The version must be the exact version number, a "prod" variant and greater than the one running on the device. To resolve the semver-compatible range use balena.model.os.getMaxSatisfyingVersion.

[options]

Object

options

[options.runDetached]

Boolean

run the update in detached mode. True by default

Example


startService

balena.models.device.startService(uuidOrId, imageId)Promise

Kind: static method of device Summary: Start a service on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

imageId

Number

id of the image to start

Example

Example


stopService

balena.models.device.stopService(uuidOrId, imageId)Promise

Kind: static method of device Summary: Stop a service on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

imageId

Number

id of the image to stop

Example

Example


trackApplicationRelease

balena.models.device.trackApplicationRelease(uuidOrIdOrArray)Promise

The device's current release will be updated with each new successfully built release.

Kind: static method of device Summary: Configure a specific device to track the current application release Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example


unsetCustomLocation

balena.models.device.unsetCustomLocation(uuidOrIdOrArray)Promise

Kind: static method of device Summary: Clear the custom location of a device Access: public

Param
Type
Description

uuidOrIdOrArray

String | Array.<String> | Number | Array.<Number>

device uuid (string) or id (number) or array of full uuids or ids

Example

Example


update

balena.models.device.update(uuidOrId, [options])Promise

Kind: static method of device Summary: Trigger an update check on the supervisor Access: public

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

options

[options.force]

Boolean

false

override update lock

Example

Example


configVar

balena.models.device.configVar : object

Kind: static namespace of device


get

balena.models.device.configVar.get(uuidOrId, key)Promise

Kind: static method of configVar Summary: Get the value of a specific config variable Access: public Fulfil: String|undefined - the config variable value (or undefined)

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

key

String

config variable name

Example

Example


getAllByApplication

balena.models.device.configVar.getAllByApplication(slugOrUuidOrId, [options])Promise

Kind: static method of configVar Summary: Get all device config variables by application Access: public Fulfil: Object[] - device config variables

Param
Type
Default
Description

slugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


getAllByDevice

balena.models.device.configVar.getAllByDevice(uuidOrId, [options])Promise

Kind: static method of configVar Summary: Get all config variables for a device Access: public Fulfil: Object[] - device config variables

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


remove

balena.models.device.configVar.remove(uuidOrId, key)Promise

Kind: static method of configVar Summary: Clear the value of a specific config variable Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

key

String

config variable name

Example

Example


set

balena.models.device.configVar.set(uuidOrId, key, value)Promise

Kind: static method of configVar Summary: Set the value of a specific config variable Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

key

String

config variable name

value

String

config variable value

Example

Example


envVar

balena.models.device.envVar : object

Kind: static namespace of device


get

balena.models.device.envVar.get(uuidOrId, key)Promise

Kind: static method of envVar Summary: Get the value of a specific environment variable Access: public Fulfil: String|undefined - the environment variable value (or undefined)

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

key

String

environment variable name

Example

Example


getAllByApplication

balena.models.device.envVar.getAllByApplication(slugOrUuidOrId, [options])Promise

Kind: static method of envVar Summary: Get all device environment variables by application Access: public Fulfil: Object[] - device environment variables

Param
Type
Default
Description

slugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


getAllByDevice

balena.models.device.envVar.getAllByDevice(uuidOrId, [options])Promise

Kind: static method of envVar Summary: Get all environment variables for a device Access: public Fulfil: Object[] - device environment variables

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


remove

balena.models.device.envVar.remove(uuidOrId, key)Promise

Kind: static method of envVar Summary: Clear the value of a specific environment variable Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

key

String

environment variable name

Example

Example


set

balena.models.device.envVar.set(uuidOrId, key, value)Promise

Kind: static method of envVar Summary: Set the value of a specific environment variable Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

key

String

environment variable name

value

String

environment variable value

Example

Example


history

balena.models.device.history : object

Kind: static namespace of device


getAllByApplication

balena.models.device.history.getAllByApplication(slugOrUuidOrId, [options])Promise

Kind: static method of history Summary: Get all device history entries by application with time frame Access: public Fulfil: Object[] - device history

Param
Type
Default
Description

slugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

[dateFilter.fromDate]

Date

subDays(new Date(), 7)

history entries older or equal to this date - default now() - 7 days

[dateFilter.toDate]

Date

history entries younger or equal to this date

[options]

Object

extra pine options to use

Example

Example

Example

Example


getAllByDevice

balena.models.device.history.getAllByDevice(uuidOrId, [options])Promise

Kind: static method of history Summary: Get all history entries for a device Access: public Fulfil: Object[] - device history

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (32 / 62 digits string) or id (number)

[dateFilter.fromDate]

Date

subDays(new Date(), 7)

history entries older or equal to this date - default now() - 7 days

[dateFilter.toDate]

Date

history entries younger or equal to this date

[options]

Object

extra pine options to use

Example

Example

Example

Example


serviceVar

balena.models.device.serviceVar : object

Kind: static namespace of device


get

balena.models.device.serviceVar.get(uuidOrId, serviceNameOrId, key)Promise

Kind: static method of serviceVar Summary: Get the overriden value of a service variable on a device Access: public Fulfil: String|undefined - the variable value (or undefined)

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

serviceNameOrId

String | Number

service name (string) or id (number)

key

String

variable name

Example

Example

Example


getAllByApplication

balena.models.device.serviceVar.getAllByApplication(slugOrUuidOrId, [options])Promise

Kind: static method of serviceVar Summary: Get all device service variable overrides by application Access: public Fulfil: Object[] - service variables

Param
Type
Default
Description

slugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


getAllByDevice

balena.models.device.serviceVar.getAllByDevice(uuidOrId, [options])Promise

Kind: static method of serviceVar Summary: Get all service variable overrides for a device Access: public Fulfil: Object[] - service variables

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


remove

balena.models.device.serviceVar.remove(uuidOrId, serviceNameOrId, key)Promise

Kind: static method of serviceVar Summary: Clear the overridden value of a service variable on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

serviceNameOrId

String | Number

service name (string) or id (number)

key

String

variable name

Example

Example

Example


set

balena.models.device.serviceVar.set(uuidOrId, serviceNameOrId, key, value)Promise

Kind: static method of serviceVar Summary: Set the overriden value of a service variable on a device Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

serviceNameOrId

String | Number

service name (string) or id (number)

key

String

variable name

value

String

variable value

Example

Example

Example


tags

balena.models.device.tags : object

Kind: static namespace of device


getAllByApplication

balena.models.device.tags.getAllByApplication(slugOrUuidOrId, [options])Promise

Kind: static method of tags Summary: Get all device tags for an application Access: public Fulfil: Object[] - device tags

Param
Type
Default
Description

slugOrUuidOrId

String | Number

application slug (string), uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


getAllByDevice

balena.models.device.tags.getAllByDevice(uuidOrId, [options])Promise

Kind: static method of tags Summary: Get all device tags for a device Access: public Fulfil: Object[] - device tags

Param
Type
Default
Description

uuidOrId

String | Number

device uuid (string) or id (number)

[options]

Object

{}

extra pine options to use

Example

Example


remove

balena.models.device.tags.remove(uuidOrId, tagKey)Promise

Kind: static method of tags Summary: Remove a device tag Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

tagKey

String

tag key

Example


set

balena.models.device.tags.set(uuidOrId, tagKey, value)Promise

Kind: static method of tags Summary: Set a device tag Access: public

Param
Type
Description

uuidOrId

String | Number

device uuid (string) or id (number)

tagKey

String

tag key

value

String | undefined

tag value

Example

Example


Last updated

Was this helpful?