ServiceInformation - TakayukiHoshi1984/DeviceConnect-Spec GitHub Wiki
DeviceConnectシステム上の特定のサービスに関する情報を提供するAPI。
| API | 概要 |
|---|---|
| GET /gotapi/serviceInformation | DeviceConnectシステム上の特定のサービスに関する情報を提供するAPI。 |
one-shot
DeviceConnectシステム上の特定のサービスに関する情報を提供するAPI。
サポートするプロファイル一覧、ネットワークへの接続状態を取得する。
| 物理名 | データ型 | 必須 | 説明 |
|---|---|---|---|
| serviceId | string | Yes | サービスID。 |
| 論理名 | 物理名 | データ型 | 必須 | 説明 | |
|---|---|---|---|---|---|
| 処理結果 | result | integer | Yes | 0:正常応答 0以外:異常応答 |
|
| システム名 | product | string | Yes | DeviceConnectシステムの名前。 | |
| システムバージョン | version | string | Yes | DeviceConnectシステムのバージョン名。 | |
| 署名 | hmac | string | No | レスポンスに対する署名。 アプリケーション側から事前にHMACキーを共有されていた場合は必須。 | |
| オブジェクト | connect | object | Yes | ネットワークの接続状態 | |
| Wi-Fi接続フラグ | wifi | boolean | No | Wi-Fiの接続を提供しない場合は省略。 | |
| Bluetooth接続フラグ | bluetooth | boolean | No | Bluetoothの接続を提供しない場合は省略。 | |
| BLE接続フラグ | ble | boolean | No | BLEの接続を提供しない場合は省略。 | |
| NFC接続フラグ | NFC | boolean | No | NFCの接続を提供しない場合は省略。 | |
| プロファイル一覧 | supports | array(string) | Yes | サポートしているプロファイル名の配列。 | |
| 各プロファイルのDeviceConnectAPI仕様定義 | supportApis | object | No | 指定されたサービスのサポートするプロファイル名をキーとして、 そのプロファイルのAPIを定義するSwagger 2.0ドキュメントを提供する。 | |
{
"result" : 0,
"product" : "Example System",
"version" : "1.0.0",
"connect" : {
"ble" : true
},
"supports" : [ "example" ],
"supportApis" : {
"example" : {
"swagger" : "2.0",
"basePath" : "/gotapi/example",
"info" : {
"title" : "Example Profile",
"version" : "1.0",
"description" : "Example description"
},
"paths" : {
"/message" : {
"post" : {
"x-type" : "one-shot",
"summary" : "Post a message.",
"parameters" : [ {
"name" : "serviceId",
"in" : "query",
"required" : true,
"type" : "string"
}, {
"name" : "message",
"in" : "query",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "ServiceInformation Response"
}
}
}
}
}
}
}
}