Skip to content

Latest commit

 

History

History
318 lines (295 loc) · 10.6 KB

list-unmanaged-devices.md

File metadata and controls

318 lines (295 loc) · 10.6 KB
description
Get all unmanaged devices

List Unmanaged Devices

Returns a list of all unmanaged devices. An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any access codes on an unmanaged device are unmanaged. To control an unmanaged device with Seam, convert it to a managed device.

{% swagger src="https://connect.getseam.com/openapi.json" path="/devices/unmanaged/list" method="post" %} https://connect.getseam.com/openapi.json {% endswagger %}

Request

List all unmanaged devices or filter the list of unmanaged devices by including the corresponding filter parameter in the request body.

Request Body Parameters

ParameterTypeDescription
connected_account_idString
Optional
ID of the connected account.
connected_account_idsString[]
Optional
IDs of the connected accounts.
connect_webview_idString
Optional
ID of Connect Webview.
device_typeString
Optional
Type of device.
device_typesString[]
Optional
Types of devices.
manufacturerString
Optional
Device manufacturer.
device_idstype: string[]
Optional
IDs of the devices to include.
limitNumber
Optional
Numerical limit on the number of devices to return.
created_beforeString
Optional
Date threshold for devices to return. If specified, returns only devices created before the specified date.
user_identifier_keyString
Optional
Your own internal user ID for the user by which to filter devices.
custom_metadata_hasJSON object
Optional
Set of key:value custom metadata pairs by which you want to filter devices.

Sample Request

{% tabs %} {% tab title="Python" %}

seam.devices.unmanaged.list()

{% endtab %}

{% tab title="cURL (bash)" %}

# Use GET or POST.
curl -X 'GET' \
  'https://connect.getseam.com/devices/unmanaged/list' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ${API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{}'

{% endtab %}

{% tab title="JavaScript" %}

await seam.devices.unmanaged.list()

{% endtab %}

{% tab title="Ruby" %}

client.unmanaged_devices.list()

{% endtab %}

{% tab title="C#" %}

seam.UnmanagedDevices.List();

{% endtab %}

{% tab title="Java" %}

seam.devices().unmanaged().list();

{% endtab %} {% endtabs %}

Response

Returns an unmanaged devices array, in which each returned unmanaged device (device) contains the set of applicable device properties. For details, see Devices.

Sample Response

{% tabs %} {% tab title="Python" %}

[
  UnmanagedDevice(
    device_id='2339da8d-ce38-4d86-9bb7-573f95af691c',
    device_type='ttlock_lock',
    properties={
      'image_alt_text': 'Placeholder Lock Image',
      'image_url': 'https://connect.getseam.com/assets/images/devices/unknown-lock.png',
      'manufacturer': 'ttlock',
      'model': {
        'accessory_keypad_supported': False,
        'display_name': 'Lock',
        'manufacturer_display_name': 'Ttlock',
        'offline_access_codes_supported': False,
        'online_access_codes_supported': True
      },
      'name': 'Lock 1',
      'online': False
    },
    connected_account_id='1769a182-ec97-4266-ba53-27fdb25d2d96',
    workspace_id='398d80b7-3f96-47c2-b85a-6f8ba21d07be',
    created_at='2023-10-30T08:37:28.852Z',
    errors=[
      {
        'connected_account_id': '1769a182-ec97-4266-ba53-27fdb25d2d96',
        'created_at': '2023-10-31T15:13:58.768Z',
        'error_code': 'account_disconnected',
        'is_connected_account_error': True,
        'message': 'Account Disconnected, you may need to '
          'reconnect the account with a new '
          'webview. This may happen if the '
          'third-party provider triggered an access '
          'token to be revoked (e.g. after a '
          'password change)'
      }
    ],
    warnings=[],
    capabilities_supported=[
      'access_code',
      'lock'
    ],
    is_managed=False
  ),
  ...
]

{% endtab %}

{% tab title="cURL (bash)" %}

{
  "devices": [
    {
      "is_managed": false,
      "device_id": "2339da8d-ce38-4d86-9bb7-573f95af691c",
      "device_type": "ttlock_lock",
      "connected_account_id": "1769a182-ec97-4266-ba53-27fdb25d2d96",
      "capabilities_supported": [
        "access_code",
        "lock"
      ],
      "workspace_id": "398d80b7-3f96-47c2-b85a-6f8ba21d07be",
      "created_at": "2023-10-30T08:37:28.852Z",
      "errors": [
        {
          "error_code": "account_disconnected",
          "message": "Account Disconnected, you may need to reconnect the account with a new webview. This may happen if the third-party provider triggered an access token to be revoked (e.g. after a password change)",
          "created_at": "2023-10-31T15:13:58.768Z",
          "connected_account_id": "1769a182-ec97-4266-ba53-27fdb25d2d96",
          "is_connected_account_error": true
        }
      ],
      "warnings": [],
      "properties": {
        "name": "Lock 1",
        "online": false,
        "manufacturer": "ttlock",
        "image_url": "https://connect.getseam.com/assets/images/devices/unknown-lock.png",
        "image_alt_text": "Placeholder Lock Image",
        "model": {
          "display_name": "Lock",
          "manufacturer_display_name": "Ttlock",
          "accessory_keypad_supported": false,
          "offline_access_codes_supported": false,
          "online_access_codes_supported": true
        }
      }
    },
    ...
  ],
  "ok": true
}

{% endtab %}

{% tab title="JavaScript" %}

[
  {
    is_managed: false,
    device_id: '2339da8d-ce38-4d86-9bb7-573f95af691c',
    device_type: 'ttlock_lock',
    connected_account_id: '1769a182-ec97-4266-ba53-27fdb25d2d96',
    capabilities_supported: [
      'access_code',
      'lock'
    ],
    workspace_id: '398d80b7-3f96-47c2-b85a-6f8ba21d07be',
    created_at: '2023-10-30T08:37:28.852Z',
    errors: [ [Object] ],
    warnings: [],
    properties: {
      name: 'Lock 1',
      online: false,
      manufacturer: 'ttlock',
      image_url: 'https://connect.getseam.com/assets/images/devices/unknown-lock.png',
      image_alt_text: 'Placeholder Lock Image',
      model: [Object]
    }
  },
  ...
]

{% endtab %}

{% tab title="Ruby" %} {% code overflow="wrap" %}

[
  <Seam::UnmanagedDevice:0x00438
    is_managed=false
    device_id="882dd63f-db9b-4210-bac2-68372aa0aff7"
    device_type="august_lock"
    connected_account_id="f72442d2-2c16-4e3f-9882-6bff21828b1b"
    capabilities_supported=[
      "access_code",
      "lock"
    ]
    workspace_id="398d80b7-3f96-47c2-b85a-6f8ba21d07be"
    created_at=2023-10-28 09:13:08.836 UTC
    errors=[]
    warnings=[]
    properties={
      "name"=>"GARAGE",
      "online"=>true,
      "manufacturer"=>"august",
      "image_url"=> "https://connect.getseam.com/assets/images/devices/august_wifi-smart-lock-3rd-gen_silver_front.png",
      "image_alt_text"=>"August Wifi Smart Lock 3rd Gen, Silver, Front",
      "model"=>{
        "display_name"=>"Lock",
        "manufacturer_display_name"=>"August",
        "accessory_keypad_supported"=>true,
        "offline_access_codes_supported"=>false,
        "online_access_codes_supported"=>true
      }
    }
  >,
  ...
]

{% endcode %} {% endtab %}

{% tab title="C#" %}

{
  "device_id": "2339da8d-ce38-4d86-9bb7-573f95af691c",
  "device_type": "ttlock_lock",
  "connected_account_id": "1769a182-ec97-4266-ba53-27fdb25d2d96",
  "capabilities_supported": [
    "access_code",
    "lock"
  ],
  "workspace_id": "398d80b7-3f96-47c2-b85a-6f8ba21d07be",
  "errors": [
    {
      "error_code": "account_disconnected",
      "message": "Account Disconnected, you may need to reconnect the account with a new webview. This may happen if the third-party provider triggered an access token to be revoked (e.g. after a password change)"
    }
  ],
  "warnings": [],
  "created_at": "2023-10-30T08:37:28.852Z",
  "properties": {
    "name": "Lock 1",
    "manufacturer": "ttlock",
    "image_url": "https://connect.getseam.com/assets/images/devices/unknown-lock.png",
    "image_alt_text": "Placeholder Lock Image",
    "model": {
      "display_name": "Lock",
      "manufacturer_display_name": "Ttlock"
    }
  }
}
...

{% endtab %}

{% tab title="Java" %}

{
  "devices": [
    {
      "is_managed": false,
      "device_id": "2339da8d-ce38-4d86-9bb7-573f95af691c",
      "device_type": "ttlock_lock",
      "connected_account_id": "1769a182-ec97-4266-ba53-27fdb25d2d96",
      "capabilities_supported": [
        "access_code",
        "lock"
      ],
      "workspace_id": "398d80b7-3f96-47c2-b85a-6f8ba21d07be",
      "created_at": "2023-10-30T08:37:28.852Z",
      "errors": [
        {
          "error_code": "account_disconnected",
          "message": "Account Disconnected, you may need to reconnect the account with a new webview. This may happen if the third-party provider triggered an access token to be revoked (e.g. after a password change)",
          "created_at": "2023-10-31T15:13:58.768Z",
          "connected_account_id": "1769a182-ec97-4266-ba53-27fdb25d2d96",
          "is_connected_account_error": true
        }
      ],
      "warnings": [],
      "properties": {
        "name": "Lock 1",
        "online": false,
        "manufacturer": "ttlock",
        "image_url": "https://connect.getseam.com/assets/images/devices/unknown-lock.png",
        "image_alt_text": "Placeholder Lock Image",
        "model": {
          "display_name": "Lock",
          "manufacturer_display_name": "Ttlock",
          "accessory_keypad_supported": false,
          "offline_access_codes_supported": false,
          "online_access_codes_supported": true
        }
      }
    },
    ...
  ],
  "ok": true
}

{% endtab %} {% endtabs %}