@node-red/runtime.flows

addFlow(opts) → {Promise.<String>}

Adds a flow configuration

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

flow Object

the flow to add

Returns:
Type:
Promise.<String>
  • the id of the added flow

deleteFlow(opts) → {Promise}

Deletes a flow

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

id Object

the id of the flow to delete

Returns:
Type:
Promise
  • resolves if successful

getFlow(opts) → {Promise.<Flow>}

Gets an individual flow configuration

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

id Object

the id of the flow to retrieve

Returns:
Type:
Promise.<Flow>
  • the active flow configuration

getFlows(opts) → {Promise.<Flows>}

Gets the current flow configuration

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

Returns:
Type:
Promise.<Flows>
  • the active flow configuration

getNodeCredentials(opts) → {Promise.<Object>}

Gets the safe credentials for a node

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

type String

the node type to return the credential information for

id String

the node id

Returns:
Type:
Promise.<Object>
  • the safe credentials

setFlows(opts) → {Promise.<Flows>}

Sets the current flow configuration

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

Returns:
Type:
Promise.<Flows>
  • the active flow configuration

updateFlow(opts) → {Promise.<String>}

Updates an existing flow configuration

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

id Object

the id of the flow to update

flow Object

the flow configuration

Returns:
Type:
Promise.<String>
  • the id of the updated flow