Mistake on this page? Email us

Bootstrap API

Bootstrap API allows web applications to control the device bootstrapping process.
Version: 2
Host: https://api.us-east-1.mbedcloud.com

Endpoints

PreSharedKeys

delete /v2/device-shared-keys/{endpoint_name}
Remove a pre-shared key. Show more Show less

Remove a pre-shared key.

Example usage:

curl -H "authorization: Bearer ${API_TOKEN}" -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001
Path parameters
endpoint_name (required)
Path Parameter — The unique endpoint identifier that this pre-shared key applies to. Reserved characters must be percent-encoded.
Responses
status description schema
204 Successfully deleted. Responded even if the endpoint did not have a PSK associated.
400 Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME. String
401 Authentication failure.
get /v2/device-shared-keys/{endpoint_name}
Get a pre-shared key. Show more Show less

Check if a pre-shared key for an endpoint exists or not. The response does not contain the secret itself.

Example usage:

curl -H "authorization: Bearer ${API_TOKEN}" https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001
Path parameters
endpoint_name (required)
Path Parameter — The unique endpoint identifier that this pre-shared key applies to. Reserved characters must be percent-encoded.
Return type
Example data
Content-Type: application/json
{
  "endpoint_name" : "my-endpoint-0001",
  "created_at" : "2017-07-21T17:32:28.012Z"
}
Responses
status description schema
200 Pre-shared key for the device (does not contain secret). PreSharedKeyWithoutSecret
400 Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME. String
401 Authentication failure.
404 The pre-shared key does not exist.
get /v2/device-shared-keys
List pre-shared keys. Show more Show less

List pre-shared keys with pagination and default page size of 50 entries.

Example usage:

curl -H "authorization: Bearer ${API_TOKEN}" https://api.us-east-1.mbedcloud.com/v2/device-shared-keys
Consumes
This API call consumes the following media types via the Content-Type request header:
  • application/json
Query parameters
limit (optional)
Query Parameter — The number of entries per page
after (optional)
Query Parameter — An offset token for fetching a specific page. Provided by the server.
Return type
Example data
Content-Type: application/json
{
  "continuation_marker" : "001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810005",
  "data" : [ {
    "endpoint_name" : "my-endpoint-0001",
    "created_at" : "2017-07-21T17:32:28.012Z"
  } ],
  "limit" : 50,
  "has_more" : true,
  "after" : "001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004",
  "object" : "list",
  "order" : "DESC"
}
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json
Responses
status description schema
200 List of pre-shared keys. ListOfPreSharedKeysWithoutSecret
400 Bad request. Contains the error as a string, either TOKEN_NOT_FOUND or INVALID_LIMIT.
post /v2/device-shared-keys
Upload a pre-shared key to Pelion Device Management. Show more Show less

Upload a pre-shared key (PSK) for an endpoint to allow it to bootstrap. The existing key will not be overwritten but needs to be deleted first in case of re-setting PSK for an endpoint.

Note: The PSK APIs are available only to accounts that have this feature enabled.

Example usage:

curl -H "authorization: Bearer ${API_TOKEN}" -H "content-type: application/json" -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \
     -d '{"endpoint_name": "my-endpoint-0001", "secret_hex": "4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a" }'
Consumes
This API call consumes the following media types via the Content-Type request header:
  • application/json
Request body
body PreSharedKey (required)
Body Parameter — Pre-shared key to be uploaded.
Produces
This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json
Responses
status description schema
201 Successfully created.
400 Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, INVALID_SECRET_HEX and MALFORMED_JSON_CONTENT. String
401 Authentication failure.
403 Forbidden. You need to read and accept the PSK license in Pelion Device Management Portal.
409 Conflict. The pre-shared key for the endpoint already exists and will not be overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT. String

Models

ListOfPreSharedKeysWithoutSecret

object
String The type of this API object is a "list".
limit
Integer The value of limit query parameter from the request, or default if not specified.
order
String The creation time based order of the entries.
has_more
Boolean Are there more results available.
after (optional)
String An offset token for current page.
continuation_marker (optional)
String An offset token for fetching the next page. Note that exactly the same limit needs to be used on the request for fetching the subsequent pages.
data
array[PreSharedKeyWithoutSecret] Array of the pre-shared key entries. The array is empty if there are no pre-shared keys.

PreSharedKey

endpoint_name
String The unique endpoint identifier that this pre-shared key applies to. 16-64 printable (non-control) ASCII characters.
secret_hex
String The secret of the pre-shared key in hexadecimal. It is not case sensitive; 4a is same as 4A, and it is allowed with or without 0x in the beginning. The minimum length of the secret is 128 bits and maximum 256 bits.

PreSharedKeyWithoutSecret

endpoint_name
String The unique endpoint identifier that this pre-shared key applies to. 16-64 printable (non-control) ASCII characters.
created_at (optional)
Date The date-time (RFC3339) when this pre-shared key was uploaded to Pelion device management. format: date-time
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.