Configure ECMS in a property
After you created a database and a data set, configure your property using Property Manager to set the default database and data set.
You can use the Edge Connect Message Store application to upload and manage content in your data sets. Accessing, downloading, and managing objects using the ECMS API requires that you configure the default database and data set for incoming requests.
The Message Store database selection and Message Store data set selection behaviors let you choose the default database and data set. You can also dynamically map request endpoint URLs. This way you can override the default settings and adjust them to specific use cases - for instance, when the device downloads content from a fixed path.
When the request endpoint URL or header doesn’t match the database and data set you provide in the behaviors, the ECMS API returns a 404 not found error. See URL mapping for more details and path examples.
Additionally, you can configure data object caching using the Caching behavior.
Before you begin
Before you configure the Edge Connect Message Store behaviors in a property, make sure you:
- Created at least one database with at least one data set in the ECMS application. See Create a database and Create a data set.
- Created a property with the IoT Edge Connect Message Store product enabled for the hostname you want to use as your ECMS API endpoint. See Create a brand new property in the Property Manager guide.
How to
-
In the Control Center dashboard, use the top-right menu in the header to select the account with access to the Edge Connect Message Store product.
-
Go to ☰ > CDN > Properties or enter Properties in the search box.
The Property Groups page opens.
-
Click the Property Name link for your property.
-
On the Property Details page, click the Version of your configuration that you want to access in Manage Versions and Activations.
The Property Manager Editor appears.
-
In the default rule, click Add Behavior, select IoT, and Message Store database selection from the list.
-
Click Insert Behavior.
The Message Store database selection appears in your rule.
-
In the default rule, edit the Message Store database selection behavior:
-
In Default database, choose the main database you want to manage content in from the drop-down list. In case the name you provided in Location doesn’t match with the request, the request will be redirected to the default location.
-
In Location, choose where the overriding database name should be placed in the incoming requests: Request header or Query string parameter in the request URL. You can also choose Regex to use PCRE-style regular expressions to filter requests. See URL mapping.
-
If you choose Request header, enter the header with the database name you want to pass in the request, e. g.
X-KV-Database
. -
If you choose Query string parameter, enter the URL query parameter with the database name, e. g.
Database
. -
If you choose Regex, enter the database name with PCRE-style regular expressions, e. g.
^\/datastore\/[^\/]+\/[^\/]+[\/]{0,1}(.*)$
. See URL mapping for examples.
-
-
In the default rule, click Add Behavior, select IoT, and Message Store data set selection from the list.
-
Click Insert Behavior.
The Message Store data set selection appears in your rule.
-
In the default rule, edit the Message Store data set selection behavior for data sets, according to the previous steps. The data set must be a part of the default database you chose in the previous behavior.
-
Optional: In the default rule, click Add Behavior, and select Caching from the list. Click Insert Behavior.
The Caching behavior appears in your rule. See Caching for details on how to configure this behavior.
-
Click Save.
-
On the Activate tab, click Activate v# on production.
Overriding new URLs
You can override URLs for new databases and data sets only after you activate your new property settings.
Next steps
Once you configured Edge Connect Message Store in your property, you can use the application or the ECMS API to upload and manage data objects to the database and data set of your choice. See Upload an object.
Updated over 1 year ago