BitUp
API Status: Operativt v2.1.0

Officiellt API för
BitUp Hosting

Levererar realtidsdata för monitorer, kategorier, incidenter och systemstatistik – bygg dashboards och integrationer på nolltid.

⚡ Kom igång
Base URL
https://status.bitup.se

Kom igång

Quickstart

API:et använder enkla HTTP GET-anrop. Din personliga API-nyckel krävs för autentisering. Bas-URL enligt OpenAPI-specifikationen.

Base URL · Produktionsserver
https://status.bitup.se /api.php?key={API_KEY} &action={action}

🔒 All kommunikation sker över TLS 1.3

Parametrar

Parameter Typ Krävs Beskrivning
key string Ja Din personliga API-nyckel
action enum Ja
status categories category incidents stats
format enum Nej
full simple grouped
(endast för action=status)
category_id integer Vid action=category ID för kategori att hämta

Endpoints

GET /api.php
Response codes
200 · Success 400 · Bad Request 401 · Unauthorized 404 · Not Found

action=status

Hämtar realtidsstatus för alla aktiva monitorer. Stöder olika format via format-parametern.

{
  "status": "success",
  "api_version": "2.1",
  "data": [
    {
      "id": 1,
      "name": "Web Server 01",
      "type": "http",
      "target": "status.bitup.se",
      "port": 443,
      "status": "up",
      "last_check": "2026-02-14 22:54:01",
      "is_active": 1,
      "category_id": 1,
      "category_name": "Webbhotell"
    }
  ]
}

action=categories

Hämtar alla kategorier med statistik över monitorer.

{
  "status": "success",
  "api_version": "2.1",
  "data": [
    {
      "id": 1,
      "name": "Webbhotell",
      "display_order": 1,
      "monitor_count": 2,
      "up_count": 2,
      "down_count": 0
    },
    {
      "id": 2,
      "name": "Spelservrar",
      "display_order": 2,
      "monitor_count": 1,
      "up_count": 1,
      "down_count": 0
    }
  ]
}

action=category

Hämtar en specifik kategori med dess monitorer. Kräver category_id.

{
  "status": "success",
  "api_version": "2.1",
  "data": {
    "id": 1,
    "name": "Webbhotell",
    "display_order": 1,
    "monitor_count": 2,
    "up_count": 2,
    "monitors": [
      {
        "id": 6,
        "name": "Netbox (dokumentation)",
        "type": "http",
        "target": "netbox.bitup.se",
        "port": null,
        "status": "up",
        "last_check": "2026-02-14 22:54:01"
      },
      {
        "id": 9,
        "name": "Web-node-se01",
        "type": "http",
        "target": "da1.bitup.se",
        "port": null,
        "status": "up",
        "last_check": "2026-02-14 22:54:01"
      }
    ]
  }
}

action=incidents

Returnerar incidenter med tillhörande uppdateringar och kategori-info.

{
  "status": "success",
  "api_version": "2.1",
  "data": [
    {
      "id": 45,
      "title": "Nätverksfördröjning SE-STHLM",
      "type": "down",
      "is_active": 1,
      "created_at": "2026-02-14 10:00:00",
      "monitors": ["Web-node-se01", "Netbox"],
      "categories": ["Webbhotell"],
      "updates": [
        {
          "message": "Vi undersöker problemet",
          "created_at": "2026-02-14 10:30:00"
        },
        {
          "message": "Felet är åtgärdat",
          "created_at": "2026-02-14 11:15:00"
        }
      ]
    }
  ]
}

action=stats

Systemstatistik - totala monitorer, online/offline, uptime och kategoriuppdelning.

{
  "status": "success",
  "api_version": "2.1",
  "data": {
    "total": 10,
    "online": 9,
    "offline": 1,
    "uptime_percent": 98.7,
    "categories": [
      {
        "id": 1,
        "category_name": "Webbhotell",
        "total_in_category": 5,
        "up_in_category": 5,
        "down_in_category": 0,
        "uptime_percent_category": 100
      },
      {
        "id": 2,
        "category_name": "Spelservrar",
        "total_in_category": 5,
        "up_in_category": 4,
        "down_in_category": 1,
        "uptime_percent_category": 80
      }
    ]
  }
}

Schemas

ApiResponse

Fält Typ Beskrivning
statusstring"success" eller "error"
api_versionstring"2.1"
dataarray/objectDynamisk data baserad på action

Monitor (full)

Fält Typ Beskrivning
idintegerUnikt ID
namestringNamn på monitorn
typestringhttp, ping, tcp
targetstringURL eller IP
portinteger/nullPort (om tillämpligt)
statusstringup, down, pending, maintenance
last_checkdate-timeSenaste kontroll
category_idinteger/nullKategori-ID
category_namestring/nullKategorinamn

Stats

Fält Typ Beskrivning
totalintegerTotalt antal monitorer
onlineintegerAntal uppe
offlineintegerAntal nere
uptime_percentnumberTotal uptime %
categoriesarrayStatistik per kategori

Error Responses

401 Unauthorized

Nyckel saknas eller är felaktig

{
  "status": "error",
  "message": "Invalid API key. Access denied."
}
400 Bad Request

Ogiltig action eller saknad parameter

{
  "status": "error",
  "message": "category_id required"
}
404 Not Found

Kategori hittades inte

{
  "status": "error",
  "message": "Category not found"
}
400 Bad Request

Ogiltig action

{
  "status": "error",
  "message": "Invalid action. Supported: status, categories, incidents, stats, category"
}

Testa API:et

# Hämta alla monitorer (grupperade per kategori) curl -X GET "https://status.bitup.se/api.php?key={DIN NYCKEL}&action=status&format=grouped"
# Hämta alla kategorier med statistik curl -X GET "https://status.bitup.se/api.php?key={DIN NYCKEL}&action=categories"
# Hämta specifik kategori med monitorer curl -X GET "https://status.bitup.se/api.php?key={DIN NYCKEL}&action=category&category_id=1"
# Hämta incidenter med kategori-info curl -X GET "https://status.bitup.se/api.php?key={DIN NYCKEL}&action=incidents"
# Hämta utökad statistik med kategoriuppdelning curl -X GET "https://status.bitup.se/api.php?key={DIN NYCKEL}&action=stats"
OpenAPI 3.0.0 · Fullt dokumenterad enligt specifikation Version 2.1.0