SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

``/v1.0/devices/`` endpoint - device list functionality errored

Open ThatProgrammerr opened this issue 9 months ago • 9 comments

Analysis

Suddenly I can't get a list of devices at https://api.switch-bot.com/v1.0/devices/ - I have had an existing piece of software using this endpoint fine for over a month and suddenly it just sends this, killing my ability to pull dynamic data. I am still able to use the same endpoint with the device id to get that sensors' data, but dynamically grabbing that data via a device list is no-longer possible.

{
  "statusCode": 190,
  "body": { },
  "message": "Cannot read properties of undefined (reading 'device_type')"
}

Expected Behavior

Provides a list of devices in json format

Steps To Reproduce

Visit https://api.switch-bot.com/v1.0/devices/ with your valid Authorization header.

Logs

{'statusCode': 190, 'body': {}, 'message': "Cannot read properties of undefined (reading 'device_type')"}

Configuration

N/A

Environment

Issue also possible in browser, unrelated to any of the below.

  • OS: Ubuntu 20.04
  • Software: Python
  • Node: v12.22.9
  • npm: 8.5.1

Additional Context

I believe this is an issue on the API side, likely caused by a misconfiguration. Unless somehow the endpoint was recently deprecated.

ThatProgrammerr avatar May 23 '24 13:05 ThatProgrammerr