@@ -609,7 +609,8 @@ Three types of measurement attributes can be provisioned:
609
609
# ### 3️⃣ Request:
610
610
611
611
` ` ` console
612
- curl -L -X POST 'http://localhost:4041/iot/devices' \
612
+ curl -L -X POST \
613
+ 'http://localhost:4041/iot/devices' \
613
614
-H 'fiware-service: openiot' \
614
615
-H 'fiware-servicepath: /' \
615
616
-H 'Content-Type: application/json' \
@@ -678,7 +679,8 @@ making the following request
678
679
# ### 4️⃣ Request:
679
680
680
681
` ` ` console
681
- curl -L -X POST 'http://localhost:7896/iot/json?k=4jggokgpepnvsb2uv4s40d59ov&i=temperature001' \
682
+ curl -L -X POST \
683
+ 'http://localhost:7896/iot/json?k=4jggokgpepnvsb2uv4s40d59ov&i=temperature001' \
682
684
-H 'Content-Type: application/json' \
683
685
--data-raw '{ "t": 3}'
684
686
` ` `
@@ -700,11 +702,12 @@ add the `fiware-service` and `fiware-service-path` headers.
700
702
# ### 5️⃣ Request:
701
703
702
704
` ` ` console
703
- curl -G -iX GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:temperature001' \
705
+ curl -G -iX GET \
706
+ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:temperature001' \
704
707
-H 'NGSILD-Tenant: openiot' \
705
708
-H 'Accept: application/ld+json' \
706
709
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
707
- -d 'attrs= temperature'
710
+ -d 'pick=id,type, temperature'
708
711
` ` `
709
712
710
713
# ### Response:
@@ -754,7 +757,8 @@ based on the knowledge of the service group
754
757
# ### 7️⃣ Request:
755
758
756
759
` ` ` console
757
- curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/?type=Device' \
760
+ curl -L -X GET \
761
+ 'http://localhost:1026/ngsi-ld/v1/entities/?type=Device' \
758
762
-H 'NGSILD-Tenant: openiot' \
759
763
-H 'Accept: application/ld+json' \
760
764
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
@@ -805,7 +809,8 @@ communications protocol to be used.
805
809
# ### 8️⃣ Request:
806
810
807
811
` ` ` console
808
- curl -L -X POST 'http://localhost:4041/iot/devices' \
812
+ curl -L -X POST \
813
+ 'http://localhost:4041/iot/devices' \
809
814
-H 'fiware-service: openiot' \
810
815
-H 'fiware-servicepath: /' \
811
816
-H 'Content-Type: application/json' \
@@ -846,7 +851,8 @@ command directly as shown:
846
851
# ### 9️⃣ Request:
847
852
848
853
` ` ` console
849
- curl -L -X PATCH 'http://localhost:4041/ngsi-ld/v1/entities/urn:ngsi-ld:Device:water001/attrs/on' \
854
+ curl -L -X PATCH \
855
+ 'http://localhost:4041/ngsi-ld/v1/entities/urn:ngsi-ld:Device:water001/attrs/on' \
850
856
-H 'fiware-service: openiot' \
851
857
-H 'fiware-servicepath: /' \
852
858
-H 'Content-Type: application/json' \
@@ -867,7 +873,8 @@ The result of the command to turn on the irrigation system can be read by queryi
867
873
# ### 1️⃣0️⃣ Request:
868
874
869
875
` ` ` console
870
- curl -L -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:water001' \
876
+ curl -L -X GET \
877
+ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:water001' \
871
878
-H 'NGSILD-Tenant: openiot' \
872
879
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
873
880
-H 'Accept: application/json'
@@ -914,7 +921,8 @@ both `attributes` and `command` attributes in the body of the request.
914
921
# ### 1️⃣1️⃣ Request:
915
922
916
923
` ` ` console
917
- curl -L -X POST 'http://localhost:4041/iot/devices' \
924
+ curl -L -X POST \
925
+ 'http://localhost:4041/iot/devices' \
918
926
-H 'fiware-service: openiot' \
919
927
-H 'fiware-servicepath: /' \
920
928
-H 'Content-Type: application/json' \
@@ -970,7 +978,8 @@ Similarly, a **Tractor** with two commands (`start` and `stop`) and two attribut
970
978
# ### 1️⃣2️⃣ Request:
971
979
972
980
` ` ` console
973
- curl -L -X POST 'http://localhost:4041/iot/devices' \
981
+ curl -L -X POST \
982
+ 'http://localhost:4041/iot/devices' \
974
983
-H 'fiware-service: openiot' \
975
984
-H 'fiware-servicepath: /' \
976
985
-H 'Content-Type: application/json' \
@@ -1005,7 +1014,8 @@ The full list of provisioned devices can be obtained by making a GET request to
1005
1014
# ### 1️⃣3️⃣ Request:
1006
1015
1007
1016
` ` ` console
1008
- curl -L -X GET 'http://localhost:4041/iot/devices' \
1017
+ curl -L -X GET \
1018
+ 'http://localhost:4041/iot/devices' \
1009
1019
-H 'fiware-service: openiot' \
1010
1020
-H 'fiware-servicepath: /'
1011
1021
` ` `
@@ -1028,7 +1038,8 @@ To invoke the `on` command, the `on` attribute must be updated in the context.
1028
1038
# ### 1️⃣4️⃣ Request:
1029
1039
1030
1040
` ` ` console
1031
- curl -L -X PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:water001/attrs/on' \
1041
+ curl -L -X PATCH \
1042
+ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:water001/attrs/on' \
1032
1043
-H 'NGSILD-Tenant: openiot' \
1033
1044
-H 'Content-Type: application/json' \
1034
1045
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
@@ -1051,7 +1062,8 @@ To invoke the `start` command, the `start` attribute must be updated in the cont
1051
1062
# ### 1️⃣5️⃣ Request:
1052
1063
1053
1064
` ` ` console
1054
- curl -L -X PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:tractor001/attrs/start' \
1065
+ curl -L -X PATCH \
1066
+ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:tractor001/attrs/start' \
1055
1067
-H 'NGSILD-Tenant: openiot' \
1056
1068
-H 'Content-Type: application/json' \
1057
1069
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
@@ -1070,7 +1082,8 @@ Change the state of the **Fillling System**, the `add` attribute must be updated
1070
1082
# ### 1️⃣6️⃣ Request:
1071
1083
1072
1084
` ` ` console
1073
- curl -L -X PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:filling001/attrs/add' \
1085
+ curl -L -X PATCH \
1086
+ 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Device:filling001/attrs/add' \
1074
1087
-H 'NGSILD-Tenant: openiot' \
1075
1088
-H 'Content-Type: application/json' \
1076
1089
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
0 commit comments