Bootstrap

For configuring devices using Pre Shared Keys.

Usage

from mbed_cloud import BootstrapAPI
api = BootstrapAPI()

api.add_psk(endpoint_name='your device name here', secret_hex='0123456789ABCDEF')

Reference

class mbed_cloud.bootstrap.BootstrapAPI(params=None)

API reference for the Bootstrap API.

add_psk(**kwargs)

Add

delete_psk(endpoint_name, **kwargs)

Delete

get_psk(endpoint_name, **kwargs)

Get

list_psks(**kwargs)

List

class mbed_cloud.bootstrap.PreSharedKey(dictionary)

Describes device object from the catalog.

For more information about such keys, have a look at https://cloud.mbed.com/docs/latest/connecting/mbed-client-lite-security-considerations.html

created_at

Gets the created_at of this PreSharedKey.

The date-time (RFC3339) when this pre-shared key was uploaded to Mbed Cloud.

Returns:The created_at of this PreSharedKey.
Return type:datetime
endpoint_name

The endpoint_name of this PreSharedKey.

Endpoint name is the unique ID of the pre-shared key. 16-64 printable (non-control) ASCII characters. It also must be globally unique. Consider using vendor-MAC-ID-device-model. For example “myEndpoint.host.com”

Parameters:endpoint_name – The endpoint_name of this PreSharedKey.
Type:str
secret_hex

The secret_hex of this PreSharedKey.

The secret of the pre-shared key in HEX format. - It is not case sensitive; 4a is same as 4A - It is allowed with or without 0x in the beginning. - The minimum length of the secret is 128 bits and max 512 bits.

For example “4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a”

Returns:The secret_hex of this PreSharedKey.
Return type:str