HTTP Yönlendirmeleri
HTTP uç noktaları GraphQL isteklerini, dosya aktarımlarını ve cihaz bağlantılarını işler. İstek biçimi ve kimlik doğrulama gereksinimleri için aşağıdaki uç noktaları inceleyin.
Tip Tanımları
# HTTP
https://<device-host>:<https-port>
POST /graphql
POST /guest_graphql
POST /peer_graphql
GET /fs?id=<resource-id>&action=PREVIEW&size=SM
GET /zip/dir?id=<directory-resource-id>
GET /zip/files?id=<selection-archive-id>
POST /upload
POST /upload_chunk
POST /init
GET /health
POST /nearby
ANY /proxy/:peer/*path
# DLNA
GET/HEAD /dlna/description.xml
GET/HEAD /dlna/av-transport/scpd.xml
GET/HEAD /dlna/rendering-control/scpd.xml
POST /dlna/av-transport/control
POST /dlna/rendering-control/control
SUBSCRIBE/UNSUBSCRIBE /dlna/av-transport/event
SUBSCRIBE/UNSUBSCRIBE /dlna/rendering-control/event
GET/HEAD /dlna/media/:id
NOTIFY /dlna/callback
# WebSocket
wss://<device-host>:<https-port>/graphql?cid=<client-id>
wss://<device-host>:<https-port>/auth?cid=<client-id>
wss://<device-host>:<https-port>/screen?cid=<client-id>
wss://<device-host>:<https-port>/status?cid=<client-id>
wss://<device-host>:<https-port>/image_editor?cid=<client-id>İşlemler
POST /graphql
Ana GraphQL uç noktası. API-token modu JSON ile c-id ve Authorization: Bearer başlıklarını; oturum açma modu şifreli gövdeleri kullanır.
curl 'https://<device-host>:<https-port>/graphql' \
-H 'c-id: <client-id>' -H ': Bearer <api-token>' \
-H 'Content-Type: application/json' \
--data '{"query":"{ app { deviceName capabilities access } }"}'GET /fs
Şifreli kaynak kimliğini okur: oturum için c.CLIENT_ID.PAYLOAD, etkin paylaşım için s.SHARE_ID.PAYLOAD. Oturum bağlantıları çağıranın GraphQL doğrulama belirtecini değil app.urlToken değerini kullanır. Bağlantıları gizli tutun; oturumu iptal etmek onları geçersiz kılar. Eylemler: PREVIEW, DOWNLOAD, PROBE veya TRANSCODE; önizleme boyutu: SM veya LG; bayt aralıkları: HTTP Range. DESCRIBE, erişimine izin verilen dosya meta verilerini ve dizin öğelerini döndürür.
curl 'https://<device-host>:<https-port>/fs?id=<resource-id>&action=PREVIEW&size=SM' -o thumbnail
curl 'https://<device-host>:<https-port>/fs?id=<resource-id>&action=DOWNLOAD' -OJ
curl 'https://<device-host>:<https-port>/fs?id=<resource-id>&action=DESCRIBE'
# describe JSON: {"entry":{"url":"/fs?id=<resource-id>&action=DOWNLOAD","name":"example.txt","isDir":false,"sizeBytes":10},"children":[]}
# action: DESCRIBE | PREVIEW | DOWNLOAD | PROBE | TRANSCODE
# size: SM | LG (PREVIEW only); v: optional cache version
# Byte ranges use the HTTP Range header.
# id: c.<client-id>.<payload> or s.<share-id>.<payload>
# Session links use app.urlToken, not the GraphQL authentication token.
# Keep resource URLs private; revoking the owning session invalidates its links.GET /zip/dir
Erişimine izin verilen dizini ZIP olarak indirir. Oturuma ait normal /fs kaynak kimliği veya etkin bir paylaşımdaki dizin kimliği kullanılabilir. Eşzamanlı işlem sınırına ulaşıldığında HTTP 429 dönebilir.
curl 'https://<device-host>:<https-port>/zip/dir?id=<directory-resource-id>' -o directory.zipGET /zip/files
Seçilen dosyaları ZIP olarak indirir. Yalnızca oturuma ait ayrı bir ZIP_FILES kimliği gerekir. Normal /fs veya paylaşım kimlikleri kabul edilmez.
curl 'https://<device-host>:<https-port>/zip/files?id=<selection-archive-id>' -o selection.zipGET /health
Kimlik doğrulamasız erişilebilirlik denetimi. Düz metin OK gövdesini döndürür.
curl 'https://<device-host>:<https-port>/health'POST /init
c-id ve etkin uzaktan erişim gerektirir. Boş gövde yapılandırmayı keşfeder ve authenticated=false döndürür. Mevcut oturumu denetlemek için POST /init istek zarfını oturumun doğrulama belirteciyle şifreleyin. Yanıt httpsPort içerir (HTTPS dinleyicisi yoksa 0); opaquePublicKey ve TLS kanıt alanları koşulludur.
curl 'https://<device-host>:<https-port>/init' -X POST -H 'c-id: <client-id>'
# An empty body discovers configuration; it does not prove session authentication.
# To check a session, send an encrypted request envelope bound to POST /init.POST /guest_graphql
Kendi misafir sözleşmesine sahip, paylaşım kapsamlı şifreli API. c-id etkin paylaşımı tanımlar; API belirteci misafir isteğine yetki vermez.
# Share-scoped encrypted GraphQL, not an API-token request.
# c-id: <share-id>; request bound to POST /guest_graphql.
# Contract: plain-core/schema/guest-api.graphqls
query { sharedInfo { name readOnly requiresPassword entries { name relativePath isDir size } } }POST /peer_graphql
c-id: gönderen istemci kimliği. c-cid: sohbet kanalı kimliği. Kanal iletileri c-cid içerir ve kanal anahtarını kullanır; doğrudan eş istekleri bunu atlar ve eşleştirilmiş anahtarı kullanır.
curl 'https://<device-host>:<https-port>/peer_graphql' \
-H 'c-id: <sender-client-id>' \
-H 'c-cid: <channel-id>' \
-H 'Content-Type: application/octet-stream' \
--data-binary @peer-request.bin \
--output peer-response.bin