Bileşenler API Referansı

Durum sayfanızdaki tüm bileşenleri getirin

Uç nokta:

GET /v2/:page_id/components?page=:page&per_page=:per_page
  • Varsayılan sayfa numarası 1'dir.
  • Varsayılan per_page değeri 50'dir; sayfa başına en fazla 100 öğedir.

Örnek yanıt:

[
{
"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"
}
]

Bir bileşeni getirin

Uç nokta:

GET /v2/:page_id/components/:component_id

Örnek yanıt

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

Bileşen oluşturun

Uç nokta:

POST /v1/:page_id/components

Örnek istek:

{
"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"
}
}
}

Örnek yanıt:

{
"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"
}
}
}

Bir bileşeni bir grubun altına eklemek isterseniz, grouped değerini true, group değerini de istediğiniz grubun ID'si yapabilirsiniz.

Bileşeni güncelleyin

Uç nokta:

PUT /v2/:page_id/components/:component_id

Örnek istek:

{
"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"
}
}
}

Örnek yanıt:

{
"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"
}
}
}

Bir bileşenin grubunu güncellemek isterseniz, grouped değerini true, groupId değerini de istediğiniz grubun ID'si yapabilirsiniz.

Bileşeni silin

Uç nokta:

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