Service
balena.models.service : object
Kind: static namespace
getAllByApplication
balena.models.service.getAllByApplication(slugOrUuidOrId, [options]) ⇒ Promise
Kind: static method of service
Summary: Get all services from an application
Access: public
Fulfil: Object[] - services
slugOrUuidOrId
String | Number
application slug (string), uuid (string) or id (number)
[options]
Object
{}
extra pine options to use
Example
balena.models.service.getAllByApplication('myorganization/myapp').then(function(services) {
console.log(services);
});Example
balena.models.service.getAllByApplication(123).then(function(services) {
console.log(services);
});var
balena.models.service.var : object
Kind: static namespace of service
get
balena.models.service.var.get(serviceIdOrNaturalKey, key) ⇒ Promise
Kind: static method of var
Summary: Get the value of a specific service variable
Access: public
Fulfil: String|undefined - the variable value (or undefined)
serviceIdOrNaturalKey
Number | Object
service id (number) or appliation-service_name pair
key
String
variable name
Example
Example
getAllByApplication
balena.models.service.var.getAllByApplication(slugOrUuidOrId, [options]) ⇒ Promise
Kind: static method of var
Summary: Get all service variables by application
Access: public
Fulfil: Object[] - service variables
slugOrUuidOrId
String | Number
application slug (string), uuid (string) or id (number)
[options]
Object
{}
extra pine options to use
Example
Example
getAllByService
balena.models.service.var.getAllByService(serviceIdOrNaturalKey, [options]) ⇒ Promise
Kind: static method of var
Summary: Get all variables for a service
Access: public
Fulfil: Object[] - service variables
serviceIdOrNaturalKey
Number | Object
service id (number) or appliation-service_name pair
[options]
Object
{}
extra pine options to use
Example
Example
remove
balena.models.service.var.remove(serviceIdOrNaturalKey, key) ⇒ Promise
Kind: static method of var
Summary: Clear the value of a specific service variable
Access: public
serviceIdOrNaturalKey
Number | Object
service id (number) or appliation-service_name pair
key
String
variable name
Example
Example
set
balena.models.service.var.set(serviceIdOrNaturalKey, key, value) ⇒ Promise
Kind: static method of var
Summary: Set the value of a specific service variable
Access: public
serviceIdOrNaturalKey
Number | Object
service id (number) or appliation-service_name pair
key
String
variable name
value
String
variable value
Example
Example
Last updated
Was this helpful?