Home > Device Messaging > Parsing Strategies
Parsing from a Path
To extract a value from a path, usually from a URL of a REST type message use search location of Path
. To extract values from
a query string of a REST type message use a search location of Query String.
Name (required)
Textual name to describe the the path locator.
Key (required)
The key is used as the place holder to extract the field from the path.
Search Location (required)
When parsing from a path, the value Path
should be selected
Path Locator (required)
A string that uses the key as a place holder to extract the field. The wild card * may be used.
Storage Type (required for parsing from messages, not used for Message Id and Device Id Parsing) You will also need to add a Storage Type to identify how this field should be stored.
RegEx Value Selector
Can can provide a regular expression to extract values from the returned value.
Additional Validation Fields
After the message has been parsed there are a number of options that can be used to validate the value, if validation fails, the message will be rejected.
Consider the following example
Key was defined as the text deviceid
Path Locator was defined as /deviceadmin/{deviceid}
Input Path = /deviceadmin/device1234
The value device1234
will be parsed and made available to the message, message id or device id
Example using wild cards
Key was defined as the text status
Path Locator was defined as /motion/*/{status}
Input Path = /motion/device001/active
The value active
will be parsed and made available to the message, message id or device id