For the complete documentation index, see llms.txt. This page is also available as Markdown.

Route Access

Route Elements​

A number of things can affect which routes the end users are given. Doors can be locked or there can we wait times along the way. This meta-data is contained in "route elements". A route element often represents a physical element in the real world that affects the routes such as doors and stairs.

The route elements defined can be seen in the CMS in Map -> Route Access

Using the endpoint at /{apiKey}/api/routing/routeelements you can find and change the route elements in your solution.

At the moment 3 things can be modified:

  • WaitTime (in seconds)

  • OnewayDirection (Optional)

  • Restrictions (optional)

WaitTime​

Wait time is set in seconds and affects how long it takes to walk past this point. This is given as a natural number and thus may not be negative (but may be 0 if no extra wait time should occur at this point).

OnewayDirection​

Oneway direction is an absolute_bearing and can be set to any number between 0 and 360 (degrees). Oneway is not mandatory, but can be used in situations where users can only walk in one direction. IF set - end users may only walk in the direction stated within the area (+/- 90 degrees)

Restrictions​

With this setting you can restrict if users are allowed to go though this point. Restriction is not mandatory, but IF used it can used in two ways:

1) It can be set to "locked" which implies that it's not possible to go though this point for anyone 2) It can be set to one or more App User Roles (refered by ID). App User Roles can be defined via the CMS in App Settings -> App Configuration:

Notice that you can get a list of available user roles using this endpoint from the intregrationAPI: /{apiKey}/api/appUserRoles

An example of a route element from the demo dataset looks like this:

Updating Elements

PUT /{apiKey}/api/routing/routeelements replaces WaitTime, Restrictions and OnewayDirection on every element you send. A field you leave out, or send as null, is cleared. A body with only id and waitTime therefore also opens a locked element and removes its oneway direction.

To change an element safely, read it with GET /{apiKey}/api/routing/routeelements, change only the field you want, and send the whole element back. The PUT ignores datasetId, externalId and geometry, so you can send them back as you read them.

To open an element, send "restrictions": []. To close it for everyone, send "restrictions": ["locked"].

This body opens the element from the example above. It is the element as read from the GET, with only the restrictions changed:

Last updated

Was this helpful?