PHPackages                             andrewcarteruk/node-red-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. andrewcarteruk/node-red-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

andrewcarteruk/node-red-api
===========================

A package for communicating with the Node-RED API

v0.1.0(9y ago)122MITPHP

Since Jun 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AndrewCarterUK/node-red-api)[ Packagist](https://packagist.org/packages/andrewcarteruk/node-red-api)[ RSS](/packages/andrewcarteruk-node-red-api/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Node-RED API
============

[](#node-red-api)

[![Build Status](https://camo.githubusercontent.com/b4963e6ae1807f1b5e6d133fb5167b37571906ef68666c59549746859040c549/68747470733a2f2f7472617669732d63692e6f72672f416e64726577436172746572554b2f6e6f64652d7265642d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AndrewCarterUK/node-red-api)[![Code Coverage](https://camo.githubusercontent.com/68bfaac79c3a543bd596dddf8460dce56379a3100dc79d7ff01416ca87cc0701/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f416e64726577436172746572554b2f6e6f64652d7265642d6170692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/AndrewCarterUK/node-red-api/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/771ca81423e6603fbbca45111e318011d17de33d8a0c95a37ee8a2178b47a6b0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f416e64726577436172746572554b2f6e6f64652d7265642d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/AndrewCarterUK/node-red-api/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/68d2558fd9fd8b70cc56b98c6cc0cabcddfe16ed518cb27c546c36d182f214f5/68747470733a2f2f706f7365722e707567782e6f72672f616e64726577636172746572756b2f6e6f64652d7265642d6170692f762f737461626c65)](https://packagist.org/packages/andrewcarteruk/node-red-api)[![Total Downloads](https://camo.githubusercontent.com/f0184b75170b08fa210dd5919f6a8409b639c6771b733296fbdfef696425d8b9/68747470733a2f2f706f7365722e707567782e6f72672f616e64726577636172746572756b2f6e6f64652d7265642d6170692f646f776e6c6f616473)](https://packagist.org/packages/andrewcarteruk/node-red-api)[![License](https://camo.githubusercontent.com/3b49463d4af72a1ed51c3fbfad4f7b6de7f4edafa738d79b80587b34c184db8c/68747470733a2f2f706f7365722e707567782e6f72672f616e64726577636172746572756b2f6e6f64652d7265642d6170692f6c6963656e7365)](https://packagist.org/packages/andrewcarteruk/node-red-api)

By [AndrewCarterUK ![(Twitter)](https://camo.githubusercontent.com/6bdedfb2ec11bea20e0fb9720641fd26240465c2361f25955ca995df499d5d20/687474703a2f2f692e696d6775722e636f6d2f77577a583975422e706e67)](https://twitter.com/AndrewCarterUK)

A set of classes for communicating with the Node-RED API. Supports importing flows.

Authentication
--------------

[](#authentication)

```
use NodeRED\Instance;
use NodeRED\OAuth;

$instance = new Instance('http://localhost:1883');

$oAuth = new OAuth($instance);
$token = $oAuth->getToken('username', 'password');
```

Tokens
------

[](#tokens)

```
// Tokens are serializable
$serializedToken = serialize($token);
$token = unserialize($serializedToken);

// Check if a token has expired
if ($token->hasExpired()) {
    // ...
}
```

Instance Methods
----------------

[](#instance-methods)

```
// ::get($path, ? $token)
$authScheme = $instance->get('auth/login');
$flows = $instance->get('flows', $token);

// ::jsonPost($path, $data, ? $token)
$instance->jsonPost('nodes', ['module' => 'node-red-node-suncalc'], $token);
```

Importing Flows
---------------

[](#importing-flows)

```
use NodeRed\Importer;

$importer = new Importer($instance, $token);

$flowJson = '[{"id":"38fb694f.83ac86","type":"inject","z":"7578d4d1.ba2e2c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":602.5,"y":298,"wires":[["f8ac9ac8.c76808"]]},{"id":"f8ac9ac8.c76808","type":"debug","z":"7578d4d1.ba2e2c","name":"","active":true,"console":"false","complete":"false","x":794.5,"y":298,"wires":[]}]';

$flowId = $importer->importFlow('My New Flow', $flowJson);
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3315d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e7abce428a9dc9c76f4275ca8d8d11ad55138d72f3e3e2b01c6b2da5b479cc0?d=identicon)[AndrewCarterUK](/maintainers/AndrewCarterUK)

---

Top Contributors

[![AndrewCarterUK](https://avatars.githubusercontent.com/u/6486835?v=4)](https://github.com/AndrewCarterUK "AndrewCarterUK (15 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andrewcarteruk-node-red-api/health.svg)

```
[![Health](https://phpackages.com/badges/andrewcarteruk-node-red-api/health.svg)](https://phpackages.com/packages/andrewcarteruk-node-red-api)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[dreamfactory/df-core

DreamFactory(tm) Core Components

1652.0k38](/packages/dreamfactory-df-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
