تخطَّ إلى المحتوى
QuenchWorks

API · v1

واجهة JSON البرمجية

imageschartscveswolficosignmultiarchartifacthublicense

واجهة JSON برمجية مجانية للقراءة فقط فوق الكتالوج. تُولَّد مسبقًا كـ JSON ثابت (المجموعة صغيرة والموقع ثابت)، فهي سريعة وقابلة للتخزين المؤقت ولا تحتاج مفتاحًا. المسار الأساسي /api/v1.

تفضّل تجربتها في المتصفح؟ افتح مرجع الواجهة التفاعلي واستخدم «Try it out». افتح مرجع الواجهة ←

المجموعات

تُعيد كل مجموعة قائمتها الكاملة داخل غلاف صغير.

{
  "apiVersion": "v1",
  "resource": "images",
  "total": 195,
  "data": [ /* every item */ ]
}

ترقيم الصفحات

تُولَّد الصفحات مسبقًا بـ 24 عنصرًا لكل صفحة، فيكون رقم الصفحة في المسار (وليس في استعلام ?page). تحمل كل صفحة meta و links.

GET /api/v1/{resource}/{page}.json

{
  "apiVersion": "v1", "resource": "images",
  "page": 2, "perPage": 24, "total": 195, "totalPages": 9,
  "links": { "self": "…/2.json", "first": "…/1.json", "last": "…/9.json", "next": "…/3.json", "collection": "/api/v1/images.json" },
  "data": [ /* this page */ ]
}

الأمان

أعداد ثغرات CVE حيّة من فحص Trivy عبر ArtifactHub لكل بصمة صورة مثبَّتة في المخطط، تُحدَّث مع كل نشر. يعطي الملخص الإجمالي للكتالوج مع تجميع حسب الخطورة؛ كما يحمل كل عنصر images/charts كائن security خاصًا به (225 ثغرة مفتوحة في الكتالوج حاليًا).

GET /api/v1/security.json

{
  "apiVersion": "v1", "resource": "security",
  "total": 225,
  "bySeverity": { "critical": 0, "high": 0, "medium": 0, "low": 0, "unknown": 0 },
  "imagesWithCves": 0,
  "images": { "<name>": { "critical": 0, "high": 0, "medium": 0, "low": 0, "unknown": 0, "total": 0 } }
}

# per-item too: each images/charts entry gains a "security" field
curl https://quench-works.com/api/v1/images.json | jq '.data[] | {slug, security}'

لمعرفة ماهية كل ثغرة فعليًا، اسأل لكل صورة: تحمل نقاط النهاية التفصيلية قائمة الثغرات بعد إزالة التكرار (المعرِّف، الخطورة، الحزمة، الإصدار المثبَّت وإصدار الإصلاح، الوصف، رابط التحذير، الأهداف المتأثرة) للإصدار الأحدث ولكل إصدار منشور. يبقى الملخص أعلاه بالأعداد فقط ويشير إليها عبر حقل href.

{
  "apiVersion": "v1", "resource": "security",
  "slug": "alertmanager", "image": "ghcr.io/quenchworks/images/alertmanager",
  "latest": {
    "version": "0.33.1", "total": 0, "fixable": 0, "grade": "A+", "score": 100,
    "cves": [ { "id": "CVE-0000-0000", "severity": "HIGH", "pkg": "…", "installed": "…",
                "fixed": "…", "title": "…", "url": "…", "targets": [ "…" ] } ]
  },
  "versions": [ /* the same shape per published version */ ]
}

شارات الحالة

شارات endpoint من shields.io لأي ملف README. حيّة (يجلبها shields عند العرض؛ وتُحدَّث مع كل نشر). يأتي النمط والشعار والألوان ضمن حمولة الـ endpoint، فيظهر شكل for-the-badge أدناه دون أي معاملات استعلام إضافية:

![images](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/images.json)
![charts](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/charts.json)
![cves](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/cves.json)
![wolfi](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/wolfi.json)
![cosign](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/cosign.json)
![multiarch](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/multiarch.json)
![artifacthub](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/artifacthub.json)
![license](https://img.shields.io/endpoint?url=https://quench-works.com/api/v1/badge/license.json)

أمثلة

curl https://quench-works.com/api/v1/images.json
curl https://quench-works.com/api/v1/charts/2.json
curl https://quench-works.com/api/v1/security.json
curl https://quench-works.com/api/v1/security/alertmanager.json | jq '.latest.cves'

ملاحظات