Server (0.1.0)

Download OpenAPI specification:Download

Bath

お風呂デバイス用エンドポイント

Status check

ステータスの取得を行う

ステータスは以下の値を取る

  • in: 入浴中
  • out: 入浴していない
  • danger: 危険
  • unknown: 不明
Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "status": "in"
}

Update status

ステータスの更新を行う

ステータスは以下の値にセット可能

  • in: 入浴中
  • out: 入浴していない
  • danger: 危険
Authorizations:
bearerAuth
Request Body schema: application/json
status
string
Enum: "in" "out" "danger"

Responses

Request samples

Content type
application/json
{
  • "status": "in"
}

Response samples

Content type
application/json
{
  • "status": "in"
}

get sensor data

センサーデータの取得を行う

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "temperature": 28.5,
  • "humidity": 84.2,
  • "pressure": 1000,
  • "lastUpdate": "2019-08-24T14:15:22Z"
}

update sensor data

センサーデータをアップデートする

Authorizations:
bearerAuth
Request Body schema: application/json
temperature
number

温度 (℃)

humidity
number

湿度 (%)

pressure
number

気圧 (hPa)

Responses

Request samples

Content type
application/json
{
  • "temperature": 28.5,
  • "humidity": 84.2,
  • "pressure": 1000
}

Response samples

Content type
application/json
{
  • "temperature": 28.5,
  • "humidity": 84.2,
  • "pressure": 1000,
  • "lastUpdate": "2019-08-24T14:15:22Z"
}

get status history

ステータスの履歴を取得する

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "history": [
    ]
}

Misc

雑多なエンドポイント

Send alart

デバイスからスマホに対してアラートを送信する

デバイスはidによって識別される

json形式で以下のようなメッセージを送信できる

{
  "message": "浴室で大きな音が検知されました"
}
Authorizations:
bearerAuth
Request Body schema: application/json
message
string

Responses

Request samples

Content type
application/json
{
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Set alart token

アラートを送信するためのトークンを設定する

Authorizations:
bearerAuth
Request Body schema: application/json
token
string

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

get phone number

緊急連絡を行うための電話番号を取得する

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "number": "string"
}

Set phone number

緊急連絡を行うための電話番号を設定する

Authorizations:
bearerAuth
Request Body schema: application/json
number
string

Responses

Request samples

Content type
application/json
{
  • "number": "string"
}

Response samples

Content type
application/json
{
  • "number": "string"
}

Check safe

音声から安否確認を行う

Request Body schema: audio/wav
string <binary>

Responses

Response samples

Content type
application/json
{
  • "safe": true,
  • "transcription": "string",
  • "chatBotResponse": { }
}

Device

デバイス管理用エンドポイント

Register device

デバイスを登録する

Responses

Response samples

Content type
application/json
{
  • "token": "string"
}

Verify device

デバイスを認証する Authorizationヘッダーにはデバイスのトークンをセットする

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Firmware

ファームウェア管理用エンドポイント

Get firmware versions

ファームウェアのバージョンを取得する

Authorizations:
bearerAuth
query Parameters
board_revision
required
string

基板のリビジョン

Responses

Response samples

Content type
application/json
{
  • "versions": [
    ]
}

Get firmware versions

最新版ファームウェアのバージョンを取得する

Authorizations:
bearerAuth
query Parameters
board_revision
required
string

基板のリビジョン

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "version": 0,
  • "release_date": "2019-08-24",
  • "download_url": "string"
}

Download firmware

ファームウェアをダウンロードする

path Parameters
file
required
string

ファイル名

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}