Skip to contentSkip to navigationSkip to topbar
Rate this Page:

The Microvisor API


(warning)

Warning

Microvisor Public Beta

Microvisor is in a pre-release phase and the information contained in this document is subject to change. Some features referenced below may not be fully available until Microvisor's General Availability (GA) release.

The Microvisor API allows you to manage Microvisor-empowered devices and the applications they run — and to do so from anywhere in the world.

(warning)

Warning

If you are looking for the Microvisor C language interface for device programming, please see the Microvisor System Calls.


The Microvisor API base URL

the-microvisor-api-base-url page anchor

Almost all URLs in the reference documentation use the following base URL:


_10
https://microvisor.twilio.com/v1

The API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported. All responses are provided in JSON format.

(information)

Info

You don't need to use the .json file extension in API request URIs.


The Microvisor API comprises the following resources:

ResourceSubresourceDescription
AppManage and deploy application firmware
ConfigManage account-level (multi-device) configuration data
DeviceInteract with individual IoT devices
Device ConfigManage per-device configuration data
Device SecretManage per-device confidential data
SecretManage account-level (multi-device) confidential data

When you create or update resources, you indicate the data that is being added or changed by specifying the appropriate resource property. All resource properties are case-sensitive and written in UpperCamelCase(link takes you to an external page). For example, if you want to change a new Device's unique name, you call:


_10
curl https://microvisor.twilio.com/v1/Devices/{Device SID} \
_10
-d 'UniqueName=My Microvisor IoT Device'
_10
-u '{Account_Sid}:{Auth_Token}'

This contrasts with responses from the API, in which properties are referenced using lower_snake_case(link takes you to an external page). For example, getting that same Device's details will return:


_13
{
_13
"sid": "UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_13
"unique_name": "My Microvisor IoT Device",
_13
"logging_enabled": true,
_13
"date_logging_expires": ""2021-10-22T19:00:00Z",
_13
"app_update": null,
_13
"info", null,
_13
"status": "up-to-date",
_13
"date_created": "2021-10-21T19:00:00Z",
_13
"date_updated": "2021-10-21T20:00:00Z",
_13
"url": "https://microvisor.twilio.com/v1/Devices/UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_13
}

The API documentation presents the appropriate parameter formatting for the language or tool that you select in the code column.


HTTPS requests made to the Microvisor API are protected with HTTP Basic authentication(link takes you to an external page). To learn more about how Twilio handles authentication, please refer to our security documentation.

You will use your Twilio Account SID as the username and your Auth Token as the password. For example, using the command line tool curl to get a list of your Device resources, you would use:


_10
curl https://microvisor.twilio.com/v1/Devices \
_10
-u '{Account_Sid}:{Auth_Token}'

You can find your Account SID and Auth Token in the Console(link takes you to an external page).

(information)

Info

To learn more about authentication and interaction with the Twilio REST API, see our documentation for requests to the API and Twilio's response.


Errors are signaled by 4xx and 5xx HTTP response status codes and a JSON response body. The error data is a standard Twilio structure. For example:


_10
{
_10
"code": 20003,
_10
"detail": "Your AccountSid or AuthToken was incorrect.",
_10
"message": "Authentication Error - No credentials provided",
_10
"more_info": "https://www.twilio.com/docs/errors/20003",
_10
"status": 401
_10
}

As you can see, the JSON gives you a human- and machine-readable indication of the nature (detail) and cause (message) of the error, and a reference to a more detailed description of the error in Twilio's documentation. The value of code is a Twilio error code, and is referenced again in the more_info URL.

You can see a list of all such codes in the error code documentation and as a JSON file.


Help integrating the Microvisor API

help-integrating-the-microvisor-api page anchor

The Microvisor API is a flexible building block which can take you from working with your first Microvisor-empowered IoT device to managing a fleet of millions of such devices.

While we hope this page gives a good overview of what you can do with the API, we're only scratching the surface of what the Microvisor API can do.

(information)

Info

Microvisor Help and Support

We welcome all inquiries you may have about Microvisor and its implementation, and any support questions that arise once you've begun developing with Microvisor. Please submit your queries via a KORE Wireless ticket: log in to the Kore console(link takes you to an external page) and click the Contact Support button in the left-hand navbar.


Rate this Page: