You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of #696, but also as a general useful enhancement of Ditto, the "fields" selector which can be used to perform partial requests with field selector shall support the wildcard _ (similarly to MQTT, targeting only 1 level) in order to define "anything" for a certain JSON pointer segment.
In scope of the "desired" project
Such queries are needed in order to get all the (unapplied) "desiredProperties" of a thing, e.g. with such a query:
GET /api/2/things/org.eclipse.ditto:my-thermostat-1?fields=features/_/desiredProperties
When using the search API, also all "desiredProperties" fields may be selected as result of the search:
GET /api/2/search/things?filter=like(attributes/manufacturer,"ACME*")&fields=features/_/desiredProperties
In general
That is very useful when feature names of a thing are unknown and special parts of all features shall be retrieved with one command.
This should be already available via the recently done PR #1277
Syntax:
GET /api/2/things/org.eclipse.ditto:my-thermostat-1?fields=features/*/desiredProperties
GET /api/2/things/org.eclipse.ditto:traffic-light?fields=features/*/properties/on
As part of #696, but also as a general useful enhancement of Ditto, the "fields" selector which can be used to perform partial requests with field selector shall support the wildcard
_
(similarly to MQTT, targeting only 1 level) in order to define "anything" for a certain JSON pointer segment.In scope of the "desired" project
Such queries are needed in order to get all the (unapplied) "desiredProperties" of a thing, e.g. with such a query:
When using the search API, also all "desiredProperties" fields may be selected as result of the search:
In general
That is very useful when feature names of a thing are unknown and special parts of all features shall be retrieved with one command.
Example: For the given thing JSON:
The goal is to get only the "on" properties of all lamps of a traffic light.
That could be done with the following HTTP request:
The text was updated successfully, but these errors were encountered: