MergenHub Envest
Ana sayfa/Dokümanlar/Kullanıcı Kılavuzu (uygulama içi, tam)

REST API

Genel & Kimlik Doğrulama

endüstriyel standart uyumlu Configuration API. Base URL: http://<host>:8090/config/v1/project.

KimlikHTTP Basic (kullanıcı/şifre) veya UI oturum cookie'si.
BiçimJSON.
YetkiHer uç bir capability ister (bkz. Güvenlik).
Durum kodları201 (hepsi başarılı), 207 (kısmi), 400 (hepsi hatalı), 409 (çakışma).
curl -u admin:PAROLA http://localhost:8090/config/v1/project/channels

Başlıca Uçlar

GET/config/v1/project — proje bilgisi
GET/POST/config/v1/project/channels — kanallar
GET/POST…/channels/{ch}/devices — cihazlar
PUT…/devices/{dev} — cihaz güncelle
POST…/devices/{dev}/tags — tag ekle (tekil/dizi=batch)
GET/runtime/v1/status — sayaçlar
GET/runtime/v1/values?prefix=Kanal.Cihaz — canlı değer
POST/runtime/v1/write{"path":"K.C.Tag","value":1}

Örnekler

# Kanaldaki cihazlar
curl -u admin:PAROLA http://localhost:8090/config/v1/project/channels/Modbus_1/devices

# Değer yaz
curl -u admin:PAROLA -X POST http://localhost:8090/runtime/v1/write \
  -H "Content-Type: application/json" -d '{"path":"Modbus_1.Dev1.Setpoint","value":42}'

# Canlı değer oku
curl -u admin:PAROLA "http://localhost:8090/runtime/v1/values?prefix=Modbus_1.Dev1"