npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

24fire-api

v2.0.0

Published

Einfacher, abhängigkeitsfreier Node.js-Wrapper für die 24fire REST-API v2

Readme

POWERED BY 24FIRE

24fire-api

Ein einfacher Node.js-Wrapper für die 24fire REST-API v2. Verwalte deinen Account, KVM-Server, Domains und Webspaces direkt aus deinem Code.

Features

  • 🔗 Kommunikation über SSL (https://manage.24fire.de/api)
  • 📦 Keine Abhängigkeiten nutzt das eingebaute fetch von Node.js
  • 🧩 Intuitive, verschachtelte Bedienung (fire.kvm(id).backup.list())
  • 🟦 Mitgelieferte TypeScript-Typen
  • ⚡ Schnell & leichtgewichtig

Hinweis: Dies ist Version 2.0. Die API-Struktur hat sich gegenüber v1 komplett geändert (neue Base-URL, neuer Auth-Header, internal_id pro Dienst). Siehe Migration von v1.

Voraussetzungen

  • Node.js 18 oder neuer (wegen des globalen fetch)

Installation

npm install 24fire-api

API-Key erstellen

  1. Logge dich im 24fire Control Panel ein.
  2. Gehe zu Einstellungen → API-Keys und klicke auf „API-Key erstellen“.
  3. Speichere den Key sicher ab – er wird nur einmal angezeigt.

Schnellstart

const FireAPI = require('24fire-api');
// oder:  import FireAPI from '24fire-api';

const fire = new FireAPI('DEIN_API_KEY');

// Account-Infos abrufen
const account = await fire.account.info();
console.log(account.data);

// Alle Dienste anzeigen (hier findest du die internal_id jedes Dienstes)
const services = await fire.account.services();
console.log(services.data);

// Einen Server starten
await fire.kvm('INTERNAL_ID').start();

Jede Methode gibt die API-Antwort im Format { status, message, data } zurück. Bei Fehlern wird ein FireAPIError geworfen (siehe Fehlerbehandlung).


Account

await fire.account.info();        // Account-Informationen (Name, E-Mail, Guthaben …)
await fire.account.services();    // Übersicht aller aktiven Dienste (mit internal_id)
await fire.account.donations();   // Daten zur Spendenseite
await fire.account.affiliate();   // Daten zum Affiliate-System

KVM-Server

Zuerst einen Server über seine internal_id auswählen:

const vm = fire.kvm('INTERNAL_ID');

Allgemein

await vm.config();          // Konfiguration (Hardware, IPs, OS …)
await vm.status();          // Status & Auslastung (running / stopped / …)

await vm.power('start');    // Power-Aktion: 'start' | 'stop' | 'restart'
await vm.start();           // Kurzform für power('start')
await vm.stop();            // Kurzform für power('stop')
await vm.restart();         // Kurzform für power('restart')

Backups

await vm.backup.list();                       // Alle Backups auflisten
await vm.backup.create('Notiz');              // Backup erstellen (24fire+), Notiz optional, max. 24 Zeichen
await vm.backup.createStatus('BACKUP_ID');    // Status der Erstellung abfragen
await vm.backup.restore('BACKUP_ID');         // Backup wiederherstellen (24fire+)
await vm.backup.restoreStatus('BACKUP_ID');   // Status der Wiederherstellung abfragen
await vm.backup.delete('BACKUP_ID');          // Backup löschen

Traffic

await vm.traffic.current();   // Aktueller Traffic-Verbrauch des Monats
await vm.traffic.log();       // Traffic-Log (Messung alle 10 Minuten)

// Traffic-Diagramm generieren (24fire+)
await vm.traffic.chart({
    type: 'both',             // Eingehend / Ausgehend / Beides
    summary: 'DAILY',         // DAILY | HOURLY | NONE
    output: 'apexcharts',     // chartjs | apexcharts | base64
    datapoints: 30,
    size: '900x300',
});

Monitoring

await vm.monitoring.timings();      // Messungen abrufen
await vm.monitoring.incidences();   // Ausfälle abrufen

DDoS (24fire+)

await vm.ddos.get();                // Aktuelle DDoS-Einstellungen abrufen
await vm.ddos.change({
    layer4: 'permanent',
    layer7: 'on',
    ip_address: '88.151.194.253',   // optional; ohne Angabe gilt es für alle IPv4 der VM
});

Domains

const domain = fire.domain('INTERNAL_ID');

await domain.info();        // Domain-Informationen
await domain.dns.list();    // Alle DNS-Einträge

// DNS-Eintrag hinzufügen (24fire+)
await domain.dns.add({ type: 'A', name: '*', data: '1.2.3.4' });

// DNS-Eintrag bearbeiten (24fire+)
await domain.dns.edit({ record_id: 'RECORD_ID', data: '5.6.7.8' });

// DNS-Eintrag entfernen
await domain.dns.remove('RECORD_ID');

Webspace

await fire.webspace('INTERNAL_ID').info();   // Webspace-Daten abrufen

Fehlerbehandlung

Schlägt eine Anfrage fehl (HTTP-Fehler oder status: "error"), wird ein FireAPIError geworfen:

const { FireAPIError } = require('24fire-api');

try {
    await fire.kvm('INTERNAL_ID').start();
} catch (err) {
    if (err instanceof FireAPIError) {
        console.error('API-Fehler:', err.message);
        console.error('HTTP-Status:', err.status);
        console.error('Antwort:', err.response);
    }
}

Migration von v1

| | v1 (alt) | v2 (neu) | |---|---|---| | Base-URL | https://api.24fire.de | https://manage.24fire.de/api | | Auth-Header | X-FIRE-APIKEY | X-Fire-Apikey | | Server-Auswahl | global über den Key | pro Dienst über die internal_id | | Abhängigkeiten | axios | keine (eingebautes fetch) |

Beispiel:

// v1
myFireApi.vm().getVMstatus();
myFireApi.vm().startVM();
myFireApi.backup().listBackups();

// v2
fire.kvm('INTERNAL_ID').status();
fire.kvm('INTERNAL_ID').start();
fire.kvm('INTERNAL_ID').backup.list();

Manche Endpunkte (z. B. DNS-Verwaltung, Backups erstellen/wiederherstellen, DDoS, Traffic-Chart) erfordern ein aktives 24fire+ Abonnement.

Author & Credits

Empfehlenswert

Feedback

Wenn du Feedback hast, wende dich an mich unter [email protected]