In this article:
The Myriota Cloud APIs provide a RESTful interface to integrate your own web applications, analytics pipelines and visualisation platforms with the Myriota Network. The Cloud API's allow you to query and manage Access Times, Destinations and Devices (UltraLite and HyperPulse devices).
The base URL of all public Myriota Cloud APIs is currently https://api.myriota.com/v1. Paths corresponding to specific API endpoints e.g. /modules, must be appended to the base URL.
Documentation
Click on the API heading in the list below to access the API documentation pages.
- Access Times (specific to UltraLite network) - get upcoming satellite pass information and access times for data transmission
- Destinations - configure how and where received message data is sent
- Modules - register and manage Myriota devices on the Myriota Network, including routing of received messages. The devices include all UltraLite and HyperPulse products.
- Downlink Messages for UltraLite and Downlink Messages for HyperPulse - send downlink messages to your devices using the same API. See Device Control Messages section for overview.
Authentication
Access to the Myriota Cloud APIs are authenticated via a JSON Web Token (JWT). The JWT is passed using an Authorization header, which must be included with all API requests. Furthermore, all API requests must be made via HTTPS. Any API request issued over plain HTTP will fail, as will API requests not including a valid token within the Authorization header.
Once you have successfully registered a Device Manager account, you can obtain a JWT by running the python script tools/myriota_auth.py, which is included in the UltraLite SDK. The script will print several tokens to stdout. Only the IdToken is required for API access. You will be asked for the Device Manager credentials when running the script:
python tools/myriota_auth.pyYou shall include the IdToken within the Authorization header of any API requests, as the shown below in the example to list all your account's devices (beware that the results are paginated with ~100 devices):
curl --header "Authorization: <IdToken>" https://api.myriota.com/v1/modulesThe token is only valid for 1 hour. A long term token suitable for server-to-server authentication can be created in Device Manager. Select "Tokens" from the left bar and click "Create" button, a new token will be generated after confirmation. Once created, immediately copy and securely store the generated token. For security reasons, tokens are not retained by Myriota and cannot be retrieved at any point.
Devices Identifier
The identifier of any device when using the API is the Id field, also known as the primary identifier. This is the identifier that will be used in the TerminalId field of the outgoing data to a destination platform. You can list all devices to retrieve this field, or you can access the Device Manager and check the Id column.
In this table there is the primary identifier of each Myriota device:
| Device | Primary identifier |
| UltraLite Module | ModuleID (not the Serial Number) |
| UltraLite DevKit | ModuleID (not the Serial Number) |
| UltraLite FlexSense | ModuleID (not the Serial Number) |
| HyperPulse SIM card | SIM ICCID |
| HyperPulse AssetHawk | SIM ICCID |
| HyperPulse DevKit | SIM ICCID |
Errors
Myriota's Cloud APIs use conventional HTTP response codes for indicating the success or failure of a given request. In general, response codes in the 2xx range indicate success, with typical responses provided within the API documentation. Response codes in the 4xx range indicate an invalid request, with some information provided within the response.
Lastly, response codes in the 5xx range indicate an error within the Myriota Cloud. These are rare, but if you encounter an error of this type, please let us know! You can report the error via Support and by doing so, you'll help us to continue improving the quality of our service.
Note that some APIs support bulk operations, in which case a 2xx response code may be returned even though individual items within the request may fail. In such cases, the API documentation describes how to identify errors.
Examples
View the API documentation and code examples for more information on the format and authentication of message data sent from the Myriota network to your HTTP and AWS Lambda Destination(s).
