CREATING A MICROSHARE CONNECTION
Available since ThingPark X IoT Flow 1.7.18.
The Microshare connector sends the uplinks of your devices to your Microshare account, where they are stored with the record type io.microshare.actility.packed.
The data follows this path: LoRaWAN® device → ThingPark Enterprise → ThingPark X IoT Flow connection → Microshare.
You need a Microshare account, on the production or the development environment, before you create the connection.
Collecting Expected Information
Parameters required
| UI Field | Description |
|---|---|
| Name | Name of the connection. |
| ApiKey | API key of the app created in your Microshare account. See API Key. |
| Username | Username of your Microshare account. |
| Password | Password of your Microshare account. |
| Use development environment | On when your account is on the Microshare development environment. Off by default, for the production environment. |
| Description | Optional description of the connection. |
API Key
The ApiKey authenticates ThingPark X IoT Flow with the Microshare services. To create one:
-
Log in to your Production or Dev Microshare account.
-
Go to Manage -> Keys.

-
Click CREATE NEW APP.

-
Once the app is created, copy its API key.

Creating a Connection With UI
-
In ThingPark Enterprise, click Connections -> + Add Connection -> ThingPark X IoT Flow.

-
In ThingPark X IoT Flow, click Microshare in the list of connectors.

-
Fill in the form:
- Name: a clear name for the connection, for example
My Microshare Connection. - ApiKey: the API key of the app created in Manage -> Keys in Microshare.
- Username: the username of your Microshare account.
- Password: the password of your Microshare account.
- Use development environment: turn it on if your account is on the development environment (
dapp.microshare.io). Keep it off for the production environment (app.microshare.io). - Description: optional.

- Name: a clear name for the connection, for example
-
Click Create. A notification confirms that the connection has been created, and the connection details open.
-
In the connection details, check that the connection is OPENED (see Connection States).
Parameters marked with * are mandatory.
Creating a Connection With API
When you click Create in the UI, ThingPark X IoT Flow gets a token from Microshare with your ApiKey, username and password, and creates an HTTP connection that posts the uplinks to the Microshare ingest service with this token. With the API, you get the token yourself, then create the connection.
-
Get a token from the Microshare authentication service. For the development environment, use
https://dauth.microshare.ioinstead ofhttps://auth.microshare.io.curl -X POST "https://auth.microshare.io/oauth2/token?username={YOUR-USERNAME}&password={YOUR-PASSWORD}&client_id={YOUR-API-KEY}&grant_type=pipe&scope=ALL:ALL"The token is the
access_tokenfield of the response. -
Create the connection with this token.
To do this, you need to use the Connections group resource:
POST /connectionsto create a new Connection instancePUT /connectionsto update a Connection instanceDELETE /connectionsto delete a Connection instance
We follow the REST-full API pattern, when updating configuration properties for a connection resource. Thus, you must also provide the whole configuration again.
Example for creation of a new connection instance:
POST /connections
{
"name": "Actility To Microshare",
"connectorId": "actility-http-iot",
"configuration": {
"description": "My first Microshare connection.",
"destinationURL": "https://ingest.microshare.io/share/io%2Emicroshare%2Eactility%2Epacked/token/{YOUR-MICROSHARE-TOKEN}"
},
"brand": "MICROSHARE"
}
The following table lists the properties applicable to a connection instance.
| Field | Description |
|---|---|
connectorId | Must be set to actility-http-iot. |
configuration/description | Description of the connection. |
configuration/destinationURL | Must be set to https://ingest.microshare.io/share/io%2Emicroshare%2Eactility%2Epacked/token/{YOUR-MICROSHARE-TOKEN}, with the token returned by Microshare. For the development environment: https://dingest.microshare.io/share/io%2Emicroshare%2Eactility%2Epacked/token/{YOUR-MICROSHARE-TOKEN}. |
brand | Must be set to MICROSHARE. |
All properties are not present in this example. You can check the rest of these properties in the common parameters section.
Associating Devices With the Connection
In ThingPark Enterprise, open Devices, select a device, and add the connection to the Connections of the device. You can also select the connection when you create a device, or for many devices at once with a CSV file in Devices -> Bulk Operations.
Displaying Information to Know if It Worked
To check the data received by Microshare, create a view as described in the Microshare Views Guide, with this pipeline query:
[
{
"$match": {
"recType": "io.microshare.actility.packed"
}
},
{
"$limit": 100
}
]
Limitations
There is no known limitation of the Microshare connector.
Troubleshooting
- The connection is not created: ThingPark X IoT Flow checks the ApiKey, the username and the password with Microshare when you click Create. Check them, and check that Use development environment matches the environment of your Microshare account.