DeviceType

balena.models.deviceType : object

Kind: static namespace


get

balena.models.deviceType.get(idOrSlug, [options])Promise

This method returns a single device type.

Kind: static method of deviceType Summary: Get a single deviceType Access: public Fulfil: Object[] - device types

Param
Type
Default
Description

idOrSlug

String | Number

device type slug (string) or alias (string) or id

[options]

Object

{}

extra pine options to use

Example

balena.models.deviceType.get('raspberry-pi').then(function(deviceType) {
	console.log(deviceType);
});

Example

balena.models.deviceType.get('raspberrypi').then(function(deviceType) {
	console.log('resolved alias:', deviceType);
});

getAll

balena.models.deviceType.getAll([options])Promise

This method returns all device types.

Kind: static method of deviceType Summary: Get all deviceTypes Access: public Fulfil: Object[] - device types

Param
Type
Default
Description

[options]

Object

{}

extra pine options to use

Example

Example


getAllSupported

balena.models.deviceType.getAllSupported([options])Promise

This method returns all supported device types.

Kind: static method of deviceType Summary: Get all supported deviceTypes Access: public Fulfil: Object[] - device types

Param
Type
Default
Description

[options]

Object

{}

extra pine options to use

Example

Example


getBySlugOrName

balena.models.deviceType.getBySlugOrName(slugOrName)Promise

Kind: static method of deviceType Summary: Get a deviceType by slug or name Access: public Fulfil: Object - device type

Param
Type
Description

slugOrName

String

deviceType slug

Example


getInstallMethod

balena.models.deviceType.getInstallMethod(deviceTypeSlug)Promise

Kind: static method of deviceType Summary: Get installation method on a given device type Access: public Fulfil: String - the installation method supported for the given device type slug

Param
Type
Description

deviceTypeSlug

String

device type slug

Example


getInstructions

balena.models.deviceType.getInstructions(deviceTypeSlugOrContract)Promise

Kind: static method of deviceType Summary: Get instructions for installing a host OS on a given device type Access: public Fulfil: Object | String[] - step by step instructions for installing the host OS to the device

Param
Type
Description

deviceTypeSlugOrContract

String | Object

device type slug or contract

Example


getInterpolatedPartials

balena.models.deviceType.getInterpolatedPartials(deviceTypeSlug)Promise

Kind: static method of deviceType Summary: Get a contract with resolved partial templates Access: public Fulfil: Contract - device type contract with resolved partials

Param
Type
Description

deviceTypeSlug

String

device type slug

Example


getName

balena.models.deviceType.getName(deviceTypeSlug)Promise

Kind: static method of deviceType Summary: Get display name for a device Access: public Fulfil: String - device display name

Param
Type
Description

deviceTypeSlug

String

device type slug

Example


getSlugByName

balena.models.deviceType.getSlugByName(deviceTypeName)Promise

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

Param
Type
Description

deviceTypeName

String

device type name

Example


Last updated

Was this helpful?