Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The operator specifies the relation between the key and value. The available operators are:

OperatorDefinition
==Exact match
!=Exact mismatch (for a fully specified string)
=+Regular expression match, case-insensitive
!+Regular expression mismatch, case-insensitive
<Less than (for numbers and timestamps)
<=Less than or equal (for numbers and timestamps)
=>Equal or greater than (for numbers and timestamps)
>Greater than (for numbers and timestamps

Value

The value specifies the value of the property to be used to identify selected resources. The value can be: 

...

Device, Block and datapoint names with special characters have to be encoded before sending them to the SmartServer. For example, in the following datapoint XIF path the space in "TeslTest 1", and the "[" and "]" in "nviLamp[1]" have to be encoded.

Datapoint XIF path:  TeslaTest 1/device/0/nviLamp[1]

after After encodingTeslaTest%201:  TeslaTest%201/device/0/nviLamp%5B1%5D


Regular expressions cannot include characters that are not allowed in URI paths.  Any such characters must be percent encoded as described in https://en.wikipedia.org/wiki/Percent-encoding.  For example, the following characters that are reserved in RFC 3986 must be encoded as shown below each character:

...

When you add use XIF names in the path parameter you need to add "*+xifName==" for  for exact match which is not encoded.

if you want to do additional test criteria for instance names then you need to add "*+name=" which  which is not encoded.

Examples

1. This  This is a simple request for a named datapoint sp within device with Id myDevice: no encoding necessary

GET  iap/devs/myDevice/if/Light/0/sp


2.
This addresses all datapoints named sp within any device whose type property matches a regular expression, and whose block type (the profile) is reported as a particular and specific value. All matching blocks are considered regardless of their handle.

...

GET  iap/devs/*+type=+^90000146164[0-4]85/if/*+type==0000000000000000-0%2FSFPTopenLoopActuator%2F/*/sp


3.
To get a datapoint value using  XIF names:

...

GET  /iap/devs/*+name==TeslaTest%201/if/*+xifName==device/0/*+xifName==nviLamp%5B1%5D/value


4.
Writing to a datapoint value using  XIF names:

...

PUT  /iap/devs/*+name==TeslaTest%201/if/device/0/*+xifName==nviLamp%5B0%5D/overrides/17/localization/value
Payload {"state":1,"value":56}


5.
To do a Subscribe GET request for a list of datapoints which is used for IAP/WS:

...

PUT  /iap/dp/updates/subscribe
Payload ["17qam77/lon/1/device/0/nvoLuxLevel","17qam77/lon/2/device/0/nvoLamp[1]"]


6.
To do an On-Demand GET request for a list of datapoints:

...