مرجع API اجزا

دریافت همه اجزای صفحه وضعیت شما

نقطه پایانی:

GET /v2/:page_id/components?page=:page&per_page=:per_page
  • شماره صفحه پیش‌فرض ۱ است.
  • مقدار پیش‌فرض per_page برابر ۵۰ و بیشینه ۱۰۰ آیتم در هر صفحه است.

نمونه پاسخ:

[
{
"id": "ckf01fvnxywz60a35wdbn5gz5",
"name": "App",
"status": "OPERATIONAL",
"uniqueEmail": "nasa-app-1nozrueut@automation.instatus.com",
"description": "",
"showUptime": true,
"order": 0,
"group": null
},
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Website",
"status": "OPERATIONAL",
"description": "",
"showUptime": true,
"order": 0,
"group": null,
"uniqueEmail": "nasa-website-1nozrueut@automation.instatus.com"
}
]

دریافت یک جزء

نقطه پایانی:

GET /v2/:page_id/components/:component_id

نمونه پاسخ

{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Website",
"description": "",
"status": "OPERATIONAL",
"uniqueEmail": "nasa-website-1nozrueut@automation.instatus.com",
"showUptime": true,
"order": 0,
"group": null
}

دریافت زمان فعالیت صفحه وضعیت

نقطه پایانی:

GET /v2/:page_id/uptime?start=:start&end=:end
  • start و end تاریخ‌هایی با قالب ISO 8601 هستند. بدون آن‌ها، ۳۰ روز گذشته را دریافت می‌کنید.
  • بازه حداکثر می‌تواند ۳۹۵ روز باشد و start باید پیش از end باشد.

نمونه پاسخ:

{
"start": "2026-10-01T00:00:00.000Z",
"end": "2026-10-31T00:00:00.000Z",
"uptime": 99.97,
"components": [
{
"id": "ckf01fvnxywz60a35wdbn5gz5",
"name": "App",
"uptime": 99.95,
"isParent": false,
"children": []
},
{
"id": "ckf01fvnxywz40a35p2c1xk7q",
"name": "API",
"uptime": 99.98,
"isParent": true,
"children": [
{
"id": "ckf01fvnxywz50a35nh1qzssm",
"name": "Auth",
"uptime": 99.96,
"isParent": false,
"children": []
},
{
"id": "ckf01fvnxywz70a35r8m2wq4d",
"name": "Search",
"uptime": 100,
"isParent": false,
"children": []
}
]
}
]
}
  • مقدار uptime در سطح بالا مربوط به کل صفحه است: میانگین همه اجزا که مانند زمان فعالیت یک گروه محاسبه می‌شود.
  • گروه‌ها isParent برابر true دارند و اجزای خود را در children فهرست می‌کنند.
  • فقط قطعی‌های منتشرشده حساب می‌شوند، بنابراین اعداد با صفحه وضعیت شما یکسان است.

ساخت یک جزء

نقطه پایانی:

POST /v1/:page_id/components

نمونه درخواست:

{
"name": "Test component",
"description": "Testing",
"status": "OPERATIONAL",
"order": 6,
"showUptime": true,
"grouped": false,
"archived": false,
"translations": {
"name": {
"fr": "Composant de test"
},
"description": {
"fr": "En test"
}
}
}

نمونه پاسخ:

{
"id": "ckf1d4f6a4aaf0a356vqg0rdm",
"name": "Test component",
"description": "Testing",
"uniqueEmail": "nasa-test-component-oomaksikj@automation.instatus.com",
"status": "OPERATIONAL",
"showUptime": true,
"order": 8,
"group": null,
"translations": {
"name": {
"fr": "Composant de test"
},
"description": {
"fr": "En test"
}
}
}

اگر می‌خواهید جزئی را زیر یک گروه اضافه کنید، می‌توانید grouped را true و group را برابر ID گروه دلخواهتان قرار دهید.

به‌روزرسانی یک جزء

نقطه پایانی:

PUT /v2/:page_id/components/:component_id

نمونه درخواست:

{
"name": "Test component 4",
"description": "Test test test",
"status": "OPERATIONAL",
"order": 6,
"showUptime": true,
"grouped": false,
"archived": true,
"translations": {
"name": {
"fr": "Composant de test 4"
},
"description": {
"fr": "Test test test"
}
}
}

نمونه پاسخ:

{
"id": "ckf1d4f6a4aaf0a356vqg0rdm",
"name": "Test component 4",
"uniqueEmail": "nasa-test-component-oomaksikj@automation.instatus.com",
"status": "OPERATIONAL",
"description": "Test test test",
"showUptime": true,
"order": 6,
"group": null,
"translations": {
"name": {
"fr": "Composant de test 4"
},
"description": {
"fr": "Test test test"
}
}
}

اگر می‌خواهید گروه یک جزء را به‌روزرسانی کنید، می‌توانید grouped را true و groupId را برابر ID گروه دلخواهتان قرار دهید.

حذف یک جزء

نقطه پایانی:

DELETE /v1/:page_id/components/:component_id
{
"id": "ckf1d4f6a4aaf0a356vqg0rdm"
}