@@ -72,7 +72,7 @@ concentrating purely on the values of the first level of attributes only. The pa
7272shorter and to the point, and not all information is returned by the request - second level attributes such as
7373` unitCode ` and ` observedAt ` will not be returned in the payload for example.
7474
75- #### Simplified NGSI-LD using ` options=keyValues `
75+ #### Simplified NGSI-LD using ` format=simplified `
7676
7777``` json
7878{
@@ -114,7 +114,7 @@ representation, where redundant "type" members are omitted and the following rul
114114- Every ** LanguageProperty** is defined by a ` languageMap ` key-value pair.
115115- Every ** Relationship** is defined by an ` object ` key-value pair.
116116
117- #### Concise NGSI-LD using ` options =concise`
117+ #### Concise NGSI-LD using ` format =concise`
118118
119119``` json
120120{
@@ -290,7 +290,8 @@ You can check to see if the new **TemperatureSensor** can be found in the contex
290290the full normalized form:
291291
292292``` bash
293- curl -L -X GET ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
293+ curl -L -X GET \
294+ ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
294295-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
295296```
296297
@@ -332,7 +333,8 @@ Subsequent requests using the same `id` will update the value of the attribute i
332333You can check to see if the new ** TemperatureSensor** can be found in the context by making a GET request.
333334
334335``` bash
335- curl -L -X GET ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
336+ curl -L -X GET \
337+ ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
336338-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
337339```
338340
@@ -476,7 +478,8 @@ format.
476478#### 7 Request:
477479
478480``` bash
479- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
481+ curl -G -iX GET \
482+ ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
480483-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
481484-d ' options=concise,sysAttrs'
482485```
@@ -536,10 +539,11 @@ known `id`.
536539#### 8 Request:
537540
538541``` bash
539- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
542+ curl -G -iX GET \
543+ ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
540544-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
541- -d ' attrs= temperature' \
542- -d ' options =concise'
545+ -d ' pick=id,type, temperature' \
546+ -d ' format =concise'
543547
544548```
545549
@@ -558,7 +562,7 @@ The sensor `urn:ngsi-ld:TemperatureSensor:001` is reading at 25°C. The response
558562}
559563```
560564
561- Because ` options =concise` was used this is response includes the metadata such as ` unitCode ` but not
565+ Because ` format =concise` was used this is response includes the metadata such as ` unitCode ` but not
562566` "type": "Property" ` Context data can be retrieved by making a GET request to the ` /ngsi-ld/v1/entities/<entity-id> `
563567endpoint and selecting the ` attrs ` using a comma separated list.
564568
@@ -570,10 +574,11 @@ known `id`.
570574#### 9 Request:
571575
572576``` bash
573- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
577+ curl -G -iX GET \
578+ ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
574579-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
575580-H ' Accept: application/json' \
576- -d ' options =concise'
581+ -d ' format =concise'
577582```
578583
579584#### Response:
@@ -606,7 +611,7 @@ The response contains an unfiltered list of context data from an entity containi
606611` urn:ngsi-ld:TemperatureSensor:001 ` . The payload body does not contain an ` @context ` attribute since the
607612` Accept: application/json ` was set.
608613
609- Combine the ` options =concise` parameter with the ` attrs ` parameter to retrieve a limited set of key-value pairs.
614+ Combine the ` format =concise` parameter with the ` attrs ` parameter to retrieve a limited set of key-value pairs.
610615
611616### Read Multiple attributes values from a Data Entity
612617
@@ -616,11 +621,12 @@ This example reads the value of two attributes (`category` and `temperature`) fr
616621#### 10 Request:
617622
618623``` bash
619- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
624+ curl -G -iX GET \
625+ ' http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001' \
620626-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
621627-H ' Accept: application/json' \
622- -d ' options =concise' \
623- -d ' attrs= category,temperature'
628+ -d ' format =concise' \
629+ -d ' pick=id,type, category,temperature'
624630```
625631
626632#### Response:
@@ -641,7 +647,7 @@ The sensor `urn:ngsi-ld:TemperatureSensor:001` is reading at 25°C. The response
641647}
642648```
643649
644- Combine the ` options =concise` parameter and the ` attrs ` parameter to return a list of values.
650+ Combine the ` format =concise` parameter and the ` attrs ` parameter to return a list of values.
645651
646652### List all Data Entities (concise)
647653
@@ -650,10 +656,11 @@ This example lists the full context of all **TemperatureSensor** entities.
650656#### 11 Request:
651657
652658``` bash
653- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/' \
659+ curl -G -iX GET \
660+ ' http://localhost:1026/ngsi-ld/v1/entities/' \
654661-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
655662-d ' type=TemperatureSensor' \
656- -d ' options =concise'
663+ -d ' format =concise'
657664```
658665
659666#### Response:
@@ -726,12 +733,13 @@ This example lists the `temperature` attribute of all **TemperatureSensor** enti
726733#### 12 Request:
727734
728735``` bash
729- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/' \
736+ curl -G -iX GET \
737+ ' http://localhost:1026/ngsi-ld/v1/entities/' \
730738-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
731739-H ' Accept: application/json' \
732740-d ' type=TemperatureSensor' \
733- -d ' options =concise' \
734- -d ' attrs= temperature'
741+ -d ' format =concise' \
742+ -d ' pick=id,type, temperature'
735743```
736744
737745#### Response:
@@ -776,7 +784,7 @@ The full context contains four sensors, they are returned in a random order:
776784```
777785
778786Context data for a specified entity type can be retrieved by making a GET request to the ` /ngsi-ld/v1/entities/ `
779- endpoint and supplying the ` type ` parameter, combine this with the ` options=keyValues ` parameter and the ` attrs `
787+ endpoint and supplying the ` type ` parameter, combine this with the ` format=simplified ` parameter and the ` pick `
780788parameter to retrieve key-values.
781789
782790### Filter Data Entities by ID
@@ -787,12 +795,13 @@ unique, so `type` is not required for this request. To filter by `id` add the en
787795#### 13 Request:
788796
789797``` bash
790- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/' \
798+ curl -G -iX GET \
799+ ' http://localhost:1026/ngsi-ld/v1/entities/' \
791800-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
792801-H ' Accept: application/json' \
793802-d ' id=urn:ngsi-ld:TemperatureSensor:001,urn:ngsi-ld:TemperatureSensor:002' \
794- -d ' attrs= temperature' \
795- -d ' options =concise'
803+ -d ' pick=id,type, temperature' \
804+ -d ' format =concise'
796805```
797806
798807#### Response:
@@ -823,17 +832,18 @@ The response details the selected attributes from the selected entities.
823832### Returning data as GeoJSON
824833
825834The concise format is also available for the GeoJSON format which can be requested by setting the ` Accept ` header to
826- ` application/geo+json ` and setting the ` options =concise` parameter.
835+ ` application/geo+json ` and setting the ` format =concise` parameter.
827836
828837#### 14 Request:
829838
830839``` bash
831- curl -G -iX GET ' http://localhost:1026/ngsi-ld/v1/entities/' \
840+ curl -G -iX GET \
841+ ' http://localhost:1026/ngsi-ld/v1/entities/' \
832842-H ' Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
833843-H ' Accept: application/geo+json' \
834844-H ' NGSILD-Tenant: openiot' \
835845-d ' id=urn:ngsi-ld:Animal:pig010,urn:ngsi-ld:Animal:pig006' \
836- -d ' options =concise'
846+ -d ' format =concise'
837847```
838848
839849#### Response:
0 commit comments