Skip to content

System Profile

TakayukiHoshi1984 edited this page Mar 27, 2017 · 3 revisions

目次

API 機能概要
System API スマートフォンのシステム情報を提供するAPI Device Connect ManagerのバージョンやサポートするAPI一覧、インストールされているデバイスプラグイン一覧などのアプリケーション情報を取得する。
Device System Wakeup API デバイスプラグインの機能を有効にする。デバイスプラグインによっては、設定画面が起動してデバイスとの接続を行う。
System Events Unregister API 指定されたセッションキーに紐づくイベントを一挙に解除する。
System Show Keyword API Device Connect Managerに対し、ユーザーが登録したキーワードの表示要求をする。

機能概要

スマートフォンまたは周辺機器(デバイスプラグイン)のシステム情報を提供するAPI。

参考API

なし

インターフェース名称 Version 種別
System API 2.0.0 同期I/F

概要

スマートフォンのシステム情報を提供するAPI Device Connect ManagerのバージョンやサポートするAPI一覧、インストールされているデバイスプラグイン一覧などのアプリケーション情報を取得する。

リクエスト

HTTPメソッド URI
GET /gotapi/system

レスポンス

Content-Type 形式 HTTPステータス
application/json JSON 200
論理名 物理名 データ型 省略 設定値
処理結果 result number - 0:正常応答
0以外:異常応答
バージョン version string - Device Connect Manager バージョンの文字列。
サポートプロファイルリスト supports string[] - サポートしているI/Fのプロファイル名一覧を格納する。
プラグイン一覧 plugins object[] - サポートしているプラグインの一覧を格納する。
属性値 id string - デバイスプラグインを識別するID。
属性値 name string - デバイスプラグイン名
属性値 version string - デバイスプラグインのバージョン名
属性値 supports string[] - デバイスプラグインのサポートするプロファイル名の配列。
属性値 packageName string デバイスプラグインのパッケージ名。

リクエストサンプル

GET  http://localhost:4035/gotapi/system?accessToken=yyyyy

レスポンスサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "result":0,
    "version":"1.0",
    "supports":[
        "authorization",
        "availability",
        "servicediscovery",
    	"serviceinfomation",
        "system"
    ],
   "plugins": [
       {
           "id": "xxx1.localhost.deviceconnect.org",
           "name": "Exampleデバイスプラグイン",
           "version": "1.0.0",
           "supports": [
               "authorization",
               "battery",
               "servicediscovery",
               "serviceinfomation",
               "system"
           ],
           "packageName": "com.example.deviceplugin"
       },
       {
           "id": "xxx2.localhost.deviceconnect.org",
           "name": "Sampleデバイスプラグイン",
           "version": "1.0.0",
           "supports": [
               "authorization",
               "light",
               "servicediscovery",
               "serviceinfomation",
               "system"
           ],
           "packageName": "com.sample.deviceplugin"
       }
   ]
}
インターフェース名称 Version 種別
Device System WakeUp API 2.0.0 同期I/F

概要

デバイスプラグインの機能を有効にする。 デバイスプラグインによっては、設定画面が起動してデバイスとの接続を行う。

リクエスト

HTTPメソッド URI
PUT /gotapi/system/device/wakeup
論理名 物理名 データ型 省略 設定値
プラグインID pluginId string - 取得対象デバイスプラグイン

レスポンス

Content-Type 形式 HTTPステータス
application/json JSON 200
論理名 物理名 データ型 省略 設定値
処理結果 result number - 0:正常応答
0以外:異常応答

リクエストサンプル

PUT  http://localhost:4035/gotapi/system/device/wakeup					```
PUTデータ
pluginId=xxxxx.localhost.deviceconnect.org&accessToken=yyyy

レスポンスサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "result":0
}
インターフェース名称 Version 種別
System Event Unregister API 2.0.0 同期I/F

概要

指定されたセッションキーに紐づくイベントを一挙に解除する。

リクエスト

HTTPメソッド URI
DELETE /gotapi/system/events
論理名 物理名 データ型 省略 設定値
セッションID sessionKey string - イベントセッションID

レスポンス

Content-Type 形式 HTTPステータス
application/json JSON 200
論理名 物理名 データ型 省略 設定値
処理結果 result number - 0:正常応答
0以外:異常応答

リクエストサンプル

DELETE  http://localhost:4035/gotapi/system/events?sessionKey=xxx&accessToken=xxxxx

レスポンスサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "result":0
}
インターフェース名称 Version 種別
System Show Keyword API 2.0.0 同期I/F

概要

Device Connect Managerに対し、ユーザーが登録したキーワードの表示要求をする。

リクエスト

HTTPメソッド URI
PUT /gotapi/system/keyword

レスポンス

Content-Type 形式 HTTPステータス
application/json JSON 200
論理名 物理名 データ型 省略 設定値
処理結果 result number - 0:正常応答
0以外:異常応答

リクエストサンプル

PUT  http://localhost:4035/gotapi/system/keyword

レスポンスサンプル

{
    "product":"Device Connect Manager",
    "version":"x.x",
    "result":0
}
Clone this wiki locally