@@ -646,7 +646,8 @@ the resource in question. In the case of NGSI-LD, the metadata is a file in `app
646
646
# ### 5️⃣ Request:
647
647
648
648
` ` ` console
649
- curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:farm001' \
649
+ curl -L -X GET \
650
+ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:farm001' \
650
651
-H 'Accept: application/ld+json' \
651
652
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
652
653
` ` `
@@ -706,7 +707,7 @@ form `type="Building"` with the FQN `https://smartdatamodels.org/dataModel.Build
706
707
707
708
If a reference to the supplied data is supplied, it is possible to return short name data and limit responses to a
708
709
specific `type` of data. For example, the request below returns the data of all `Building` entities within the context
709
- data. Use of the `type` parameter limits the response to `Building` entities only, use of the `options=keyValues ` query
710
+ data. Use of the `type` parameter limits the response to `Building` entities only, use of the `format=simplified ` query
710
711
parameter reduces the response down to standard JSON-LD.
711
712
712
713
# ### 6️⃣ Request:
@@ -717,12 +718,12 @@ curl -G -X GET \
717
718
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
718
719
-H 'Accept: application/ld+json' \
719
720
-d 'type=Building' \
720
- -d 'options=keyValues '
721
+ -d 'format=simplified '
721
722
` ` `
722
723
723
724
# ### Response:
724
725
725
- Because of the use of the `options=keyValues `, the response consists of JSON only without the attribute definitions
726
+ Because of the use of the `format=simplified `, the response consists of JSON only without the attribute definitions
726
727
` type="Property"` or any _properties-of-properties_ elements. You can see that `Link` header from the request has been
727
728
used as the `@context` returned in the response.
728
729
@@ -779,7 +780,7 @@ used as the `@context` returned in the response.
779
780
780
781
This example returns all `Building` entities with the `name` attribute _Big Red Barn_. Filtering can be done using the
781
782
` q` parameter - if a string has spaces in it, it can be URL encoded and held within double quote characters `"` = `%22`.
782
- Since `options=keyValues ` is sent, this will effect the structure of the payload and we will need to supply a different
783
+ Since `format=simplified ` is sent, this will effect the structure of the payload and we will need to supply a different
783
784
` @context` file - `json-context.jsonld`
784
785
785
786
# ### 7️⃣ Request:
@@ -791,12 +792,12 @@ curl -G -X GET \
791
792
-H 'Accept: application/ld+json' \
792
793
-d 'type=Building' \
793
794
-d 'q=name==%22Big%20Red%20Barn%22' \
794
- -d 'options=keyValues '
795
+ -d 'format=simplified '
795
796
` ` `
796
797
797
798
# ### Response:
798
799
799
- The use of the `Link` header and the `options=keyValues ` parameter reduces the response to short form key-values
800
+ The use of the `Link` header and the `format=simplified ` parameter reduces the response to short form key-values
800
801
**JSON-LD** as shown:
801
802
802
803
` ` ` json
@@ -862,7 +863,7 @@ curl -G -X GET \
862
863
-H 'Accept: application/ld+json' \
863
864
-d 'type=Geb%C3%A4ude' \
864
865
-d 'q=name==%22Big%20Red%20Barn%22' \
865
- -d 'options=keyValues '
866
+ -d 'format=simplified '
866
867
` ` `
867
868
868
869
# ### Response:
@@ -916,7 +917,7 @@ curl -G -X GET \
916
917
-H 'Accept: application/ld+json' \
917
918
-d 'type=Building' \
918
919
-d 'q=category==%22barn%22,%22farm_auxiliary%22' \
919
- -d 'options=keyValues ' \
920
+ -d 'format=simplified ' \
920
921
-d 'expandValues=category'
921
922
` ` `
922
923
@@ -961,17 +962,18 @@ Filtering can be done using the `q` parameter - sub-attributes are annotated usi
961
962
# ### 1️⃣0️⃣ Request:
962
963
963
964
` ` ` console
964
- curl -G -X GET 'http://localhost:1026/ngsi-ld/v1/entities/' \
965
+ curl -G -X GET \
966
+ 'http://localhost:1026/ngsi-ld/v1/entities/' \
965
967
-H 'Link: <http://context/json-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
966
968
-H 'Accept: application/ld+json' \
967
969
-d 'type=Building' \
968
970
-d 'q=address%5BaddressLocality%5D==%22Tiergarten%22' \
969
- -d 'options=keyValues '
971
+ -d 'format=simplified '
970
972
` ` `
971
973
972
974
# ### Response:
973
975
974
- Use of the `Link` header and the `options=keyValues ` parameter reduces the response to JSON-LD.
976
+ Use of the `Link` header and the `format=simplified ` parameter reduces the response to JSON-LD.
975
977
976
978
` ` ` json
977
979
[
@@ -1038,12 +1040,12 @@ curl -G -X GET \
1038
1040
-H 'Accept: application/json' \
1039
1041
-d 'type=Building' \
1040
1042
-d 'q=address.verified==true' \
1041
- -d 'options=keyValues '
1043
+ -d 'format=simplified '
1042
1044
` ` `
1043
1045
1044
1046
# ### Response:
1045
1047
1046
- Because of the use of the `options=keyValues ` together with the Accept HTTP header (`application/json`), the response
1048
+ Because of the use of the `format=simplified ` together with the Accept HTTP header (`application/json`), the response
1047
1049
consists of JSON only without the attribute `type` and `metadata` elements.
1048
1050
1049
1051
` ` ` json
@@ -1111,12 +1113,12 @@ curl -G -X GET \
1111
1113
-d 'geometry=Point' \
1112
1114
-d 'coordinates=%5B13.3777,52.5162%5D' \
1113
1115
-d 'georel=near%3BmaxDistance==800' \
1114
- -d 'options=keyValues '
1116
+ -d 'format=simplified '
1115
1117
` ` `
1116
1118
1117
1119
# ### Response:
1118
1120
1119
- Because of the use of the `options=keyValues ` together with the Accept HTTP header (`application/json`), the response
1121
+ Because of the use of the `format=simplified ` together with the Accept HTTP header (`application/json`), the response
1120
1122
consists of JSON only without the attribute `type` and `metadata` elements.
1121
1123
1122
1124
` ` ` json
0 commit comments