URL mapping

Devices access and download objects in your data sets through requests to endpoint URLs as in the ECMS API.
When you configure ECMS in your property, you can use behaviors to set the default database and data set for incoming requests.

URL mapping allows you to override the default settings, and replace built-in URLs with fully customized ones. This is particularly useful in use cases such as when you already configured a device to get objects from a specific path, or you want to use particular data sets by default.

Endpoint paths depend on the database and data set parameters you configure using the Message Store database selection and Message Store data set selection behaviors.

You can choose the default database and data set, and choose to pass the database and data set names in request headers, endpoint URLs query strings or use PCRE-style regular expressions to override the default path. See Configure ECMS in a property for details.


Caching URLs

If 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. The cache always uses the rewritten URL.

Header and query string parameter

The base for every path consists of a hostname and a /datastore segment. Your hostname, for instance, might be downloads.automotive-company.akamai.com.

If you choose to pass both the database and data set names in your request’s headers, the overriding endpoint HTTP path should follow the {hostname}/datastore/{key} format.

Choosing query string parameters as the location for passing database and data set names requires the {database} and {dataset} names as query parameters in the endpoint path that overrides the default path, as in {hostname}/datastore/{key}?database={database}&dataset={dataset} and downloads.automotive-company.akamai.com/datastore/AAX.dat?database=db1&dataset=ds2. See Object paths in the ECMS API for more examples.

Regular expressions

In the ECMS behaviors, you can also override default paths using PCRE-style regular expressions. You can combine URL patterns and match them to access objects in different databases and data sets. For example, when you set the default database to my-data and the default database to v4, you can set the regex URL to /basic-tiled-data/{[v/d]}/{[.]} to match overriding URLs such as /datastore/my-data/v3/region/local/id.