Common functions to work on the API side of node red